@rangka-os/create 0.5.0-alpha.15 → 0.5.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/base/apps/grosir_distribusi/app.rk +2 -1
- package/template/base/apps/langganan_jasa/app.rk +3 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +1 -1
- package/template/base/apps/ritel_cabang/app.rk +3 -0
- package/template/base/connectors/doku/mock/doku_mock.py +16 -5
- package/template/base/connectors/moka/mock/moka_mock.py +210 -0
- package/template/base/connectors/xendit/mock/xendit_mock.py +231 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked.rk +12 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked_released.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +11 -1
- package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +23 -5
- package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +56 -14
- package/template/base/modules/bank_statement/models/bank_transaction.rk +27 -4
- package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +1 -1
- package/template/base/modules/catalogue/models/item_category.rk +2 -0
- package/template/base/modules/coretax/module.rk +2 -2
- package/template/base/modules/coretax/print/coretax_faktur.rk +1 -1
- package/template/base/modules/coretax/print/coretax_faktur.xml +13 -7
- package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +1 -1
- package/template/base/modules/delivery/module.rk +1 -1
- package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +2 -2
- package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +2 -2
- package/template/base/modules/distribution/module.rk +1 -1
- package/template/base/modules/invoicing/models/sales_invoice.rk +31 -4
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +7 -0
- package/template/base/modules/invoicing/module.rk +1 -1
- package/template/base/modules/invoicing/print/sales_invoice.html +15 -2
- package/template/base/modules/orders/models/customer_order.rk +2 -0
- package/template/base/modules/orders/models/customer_order_item.rk +10 -0
- package/template/base/modules/orders/module.rk +1 -1
- package/template/base/modules/payments/flows/payment_refund_from_doku.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +2 -2
- package/template/base/modules/payroll/module.rk +2 -2
- package/template/base/modules/production/models/production_batch.rk +3 -0
- package/template/base/modules/production/module.rk +1 -1
- package/template/base/modules/quotation/models/quotation.rk +14 -4
- package/template/base/modules/quotation/models/quotation_item.rk +13 -0
- package/template/base/modules/quotation/module.rk +1 -1
- package/template/base/modules/quotation/print/quotation.html +16 -2
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
name: bank_transaction_confirm
|
|
9
9
|
label: {id: Mutasi dikonfirmasi jadi pembayaran}
|
|
10
10
|
on: bank_transaction.updated
|
|
11
|
-
if: event.status == 'confirmed' && event.payment == '' && event.suggested_invoice != ''
|
|
11
|
+
if: event.status == 'confirmed' && event.payment == '' && event.suggested_invoice != '' && event.booked_payment == ''
|
|
12
12
|
steps:
|
|
13
13
|
- {find: payment, where: "docstatus == 0 && bank_transaction == event.name", as: draft}
|
|
14
14
|
# a live payment already names the line (it is matched then, or a payment typed by hand carries the line in its
|
|
@@ -16,14 +16,32 @@ steps:
|
|
|
16
16
|
- {find: payment, where: "docstatus == 1 && direction == 'receive' && (bank_transaction == event.name || reference == event.name)", as: paid}
|
|
17
17
|
- {find: sales_invoice, where: name == event.suggested_invoice, as: inv}
|
|
18
18
|
- {find: bank_transaction, where: name == event.name, as: line}
|
|
19
|
+
# Checked again now (audit rel-uang-e2e r7 H10): a payment of this amount from the invoice's customer booked after the
|
|
20
|
+
# suggestion was made, which no statement line holds yet, may be this very money. Then nothing is drafted: a non-cash
|
|
21
|
+
# one becomes the line's Sudah tercatat suggestion, a cash one leaves the line Belum cocok for the owner.
|
|
22
|
+
- {find_all: bank_transaction, where: "status == 'booked'", as: held}
|
|
23
|
+
- {find_all: bank_transaction, where: "booked_payment != '' && name != event.name", as: elsewhere}
|
|
24
|
+
# (a draft finance made for it and has not submitted yet counts too: audit r8 H11 S2)
|
|
25
|
+
- find_all: payment
|
|
26
|
+
where: >-
|
|
27
|
+
inv != null && docstatus != 2 && direction == 'receive' && method != 'sales_return' && amount == event.amount &&
|
|
28
|
+
customer == inv.customer && bank_transaction == '' && !(name in held.map(l, l.booked_payment))
|
|
29
|
+
as: same
|
|
30
|
+
- update: line
|
|
31
|
+
if: "inv != null && size(same) > 0"
|
|
32
|
+
set:
|
|
33
|
+
suggested_invoice: "''"
|
|
34
|
+
booked_payment: "size(same) == 1 && same[0].docstatus == 1 && same[0].method != 'cash' && !(same[0].name in elsewhere.map(l, l.booked_payment)) ? same[0].name : ''"
|
|
35
|
+
draft_payment: "''"
|
|
36
|
+
status: "size(same) == 1 && same[0].docstatus == 1 && same[0].method != 'cash' && !(same[0].name in elsewhere.map(l, l.booked_payment)) ? 'suggested' : 'unmatched'"
|
|
19
37
|
- update: draft
|
|
20
|
-
if: inv != null && draft != null
|
|
38
|
+
if: inv != null && draft != null && size(same) == 0
|
|
21
39
|
set:
|
|
22
40
|
customer: inv.customer
|
|
23
41
|
amount: event.amount
|
|
24
42
|
allocations: "[{'sales_invoice': inv.name, 'amount': min(event.amount, inv.outstanding)}]"
|
|
25
43
|
- create: payment
|
|
26
|
-
if: inv != null && draft == null && paid == null
|
|
44
|
+
if: inv != null && draft == null && paid == null && size(same) == 0
|
|
27
45
|
set:
|
|
28
46
|
direction: "'receive'"
|
|
29
47
|
customer: inv.customer
|
|
@@ -36,8 +54,8 @@ steps:
|
|
|
36
54
|
notes: "'Dari mutasi ' + event.name + ': ' + event.description"
|
|
37
55
|
as: pay
|
|
38
56
|
- update: line
|
|
39
|
-
if: inv != null && draft != null && draft.name != event.draft_payment
|
|
57
|
+
if: inv != null && draft != null && draft.name != event.draft_payment && size(same) == 0
|
|
40
58
|
set: {draft_payment: draft.name}
|
|
41
59
|
- update: line
|
|
42
|
-
if: inv != null && draft == null && paid == null
|
|
60
|
+
if: inv != null && draft == null && paid == null && size(same) == 0
|
|
43
61
|
set: {draft_payment: pay.name}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
-
# A new statement line with money in looks for
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
2
|
+
# A new statement line with money in looks for what it is. It only suggests; nothing is paid before the owner confirms.
|
|
3
|
+
# 1. Money already on the books (booked_payment): a submitted non-cash payment of the same amount that no statement line
|
|
4
|
+
# holds yet, whose reference (giro number, gateway reference) is in the note -> that payment. A giro is booked to the
|
|
5
|
+
# bank when it is received and a QRIS or VA through a gateway when the gateway reports it, so their clearing or
|
|
6
|
+
# settlement line must not pay an invoice again (audit rel-uang-e2e H1: a clearing line of one giro was suggested to
|
|
7
|
+
# another open invoice of the same amount and paid it twice).
|
|
8
|
+
# 2. An open invoice whose number is in the transfer note (written loosely, see below), only when no received payment
|
|
9
|
+
# of the line's amount (cash too) waits for its line and the note is not a cash deposit (SETOR, TUNAI, CRM, CDM).
|
|
10
|
+
# 3. Never an invoice by the amount alone (audit rel-uang-e2e r1-r5 H1, H3, H4, H6, H7, M2): money reaches the bank
|
|
11
|
+
# from too many places that carry no invoice (a giro or gateway payment already booked, a shop's takings settled in
|
|
12
|
+
# sums of the bank's own, cash collected and deposited, a transfer between the business's own accounts), and an
|
|
13
|
+
# amount can never tell them from a customer's transfer. A wrong suggestion, once confirmed, pays an invoice nobody
|
|
14
|
+
# paid. The owner picks the invoice of such a line by hand.
|
|
15
|
+
# 4. Else exactly one booked payment of that amount waiting for its line -> that payment.
|
|
16
|
+
# Anything else: no suggestion (the owner picks). outstanding is already net of PPh 23, so a customer who withheld tax
|
|
17
|
+
# still matches.
|
|
6
18
|
name: bank_transaction_suggest
|
|
7
19
|
label: {id: Usulan cocok mutasi ke faktur}
|
|
8
20
|
on: bank_transaction.created
|
|
@@ -12,20 +24,50 @@ steps:
|
|
|
12
24
|
# "INV-2026-00012", "inv 2026 00012", "INV202600012", "INV/2026/00012" all match, compared without case, spaces,
|
|
13
25
|
# dashes, slashes and dots on both sides. The number decides only when the line fits what the invoice still owes
|
|
14
26
|
# (a part payment fits, an overpayment does not): "0004 2" typed for invoice 00042 must not pull a larger line
|
|
15
|
-
# to invoice 0004; such a line
|
|
27
|
+
# to invoice 0004; such a line gets no invoice suggestion.
|
|
16
28
|
- find_all: sales_invoice
|
|
17
29
|
where: >-
|
|
18
30
|
docstatus == 1 && outstanding >= event.amount && (event.description.contains(name) ||
|
|
19
31
|
event.description.upperAscii().replace(' ', '').replace('-', '').replace('/', '').replace('.', '')
|
|
20
32
|
.contains(name.upperAscii().replace(' ', '').replace('-', '').replace('/', '').replace('.', '')))
|
|
21
33
|
as: by_number
|
|
22
|
-
|
|
34
|
+
# held: lines with a booked payment, suggested or confirmed (a payment is suggested on one line at a time, booked_payment
|
|
35
|
+
# is unique); done: lines whose booking the owner confirmed. Money counts as waiting for its line until a line is
|
|
36
|
+
# confirmed against it: a suggestion alone, maybe wrong, does not free the invoice named in another line (audit r9 H12).
|
|
37
|
+
- {find_all: bank_transaction, where: "booked_payment != ''", as: held}
|
|
38
|
+
- {find_all: bank_transaction, where: "status == 'booked'", as: done}
|
|
39
|
+
- find_all: payment
|
|
40
|
+
where: >-
|
|
41
|
+
docstatus == 1 && direction == 'receive' && method != 'cash' && method != 'sales_return' && amount == event.amount &&
|
|
42
|
+
bank_transaction == '' && !(name in held.map(l, l.booked_payment))
|
|
43
|
+
as: booked
|
|
44
|
+
- find_all: payment
|
|
45
|
+
where: >-
|
|
46
|
+
docstatus == 1 && direction == 'receive' && method != 'cash' && method != 'sales_return' && amount == event.amount &&
|
|
47
|
+
bank_transaction == '' && !(name in held.map(l, l.booked_payment)) && reference != '' &&
|
|
48
|
+
event.description.upperAscii().contains(reference.upperAscii())
|
|
49
|
+
as: booked_ref
|
|
50
|
+
# Any received payment of this amount (cash too) no line holds yet: the line may be that money reaching the bank
|
|
51
|
+
# (an instalment by transfer or giro booked without a reference, cash collected and deposited). Then the invoice
|
|
52
|
+
# named in the note is not suggested (audit rel-uang-e2e r6 H8, H9): a booked non-cash payment is suggested as Sudah
|
|
53
|
+
# tercatat instead (step 3), a cash one leaves the line to the owner.
|
|
54
|
+
- find_all: payment
|
|
55
|
+
where: >-
|
|
56
|
+
docstatus == 1 && direction == 'receive' && method != 'sales_return' && amount == event.amount &&
|
|
57
|
+
bank_transaction == '' && !(name in done.map(l, l.booked_payment))
|
|
58
|
+
as: same
|
|
23
59
|
- {find: bank_transaction, where: name == event.name, as: line}
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
60
|
+
- update: line
|
|
61
|
+
if: size(booked_ref) == 1
|
|
62
|
+
set: {booked_payment: "booked_ref[0].name", status: "'suggested'"}
|
|
63
|
+
# a cash deposit names no customer's transfer, whatever number it carries
|
|
64
|
+
- update: line
|
|
65
|
+
if: >-
|
|
66
|
+
size(booked_ref) != 1 && size(by_number) == 1 && size(same) == 0 &&
|
|
67
|
+
['SETOR', 'TUNAI', 'CRM', 'CDM', 'CASH DEP', 'CASH IN', 'DEP CASH'].map(w, event.description.upperAscii().contains(w) ? 1 : 0).sum() == 0
|
|
68
|
+
set: {suggested_invoice: "by_number[0].name", status: "'suggested'"}
|
|
69
|
+
- update: line
|
|
70
|
+
if: >-
|
|
71
|
+
size(booked_ref) != 1 && size(booked) == 1 && !(size(by_number) == 1 && size(same) == 0 &&
|
|
72
|
+
['SETOR', 'TUNAI', 'CRM', 'CDM', 'CASH DEP', 'CASH IN', 'DEP CASH'].map(w, event.description.upperAscii().contains(w) ? 1 : 0).sum() == 0)
|
|
73
|
+
set: {booked_payment: "booked[0].name", status: "'suggested'"}
|
|
@@ -68,6 +68,7 @@ fields:
|
|
|
68
68
|
- {value: suggested, label: {id: Ada usulan}}
|
|
69
69
|
- {value: confirmed, label: {id: Dikonfirmasi}}
|
|
70
70
|
- {value: matched, label: {id: Cocok, en: Matched}}
|
|
71
|
+
- {value: booked, label: {id: Sudah tercatat, en: Already booked}}
|
|
71
72
|
- {value: ignored, label: {id: Abaikan}}
|
|
72
73
|
- name: suggested_invoice
|
|
73
74
|
type: link
|
|
@@ -87,6 +88,16 @@ fields:
|
|
|
87
88
|
to: payment
|
|
88
89
|
label: {id: Pembayaran}
|
|
89
90
|
read_only: true
|
|
91
|
+
# Money that is already on the books before it shows on the statement: a giro (booked to the bank when received),
|
|
92
|
+
# a QRIS or VA paid through a gateway, a QRIS settlement. Its line is "Sudah tercatat" against that payment and never
|
|
93
|
+
# becomes a second payment of an invoice. unique: one payment is on one statement line only.
|
|
94
|
+
- name: booked_payment
|
|
95
|
+
type: link
|
|
96
|
+
to: payment
|
|
97
|
+
label: {id: Pembayaran yang sudah tercatat}
|
|
98
|
+
help: {id: 'Uang yang sudah dicatat sebelum muncul di mutasi (giro, QRIS, VA, gateway). Baris ini tidak membuat pembayaran baru.'}
|
|
99
|
+
unique: true
|
|
100
|
+
peek: [customer, method, reference, amount]
|
|
90
101
|
rules:
|
|
91
102
|
- name: one_side_only
|
|
92
103
|
on: save
|
|
@@ -94,8 +105,20 @@ rules:
|
|
|
94
105
|
message: {id: 'Isi Masuk atau Keluar saja, tidak boleh negatif'}
|
|
95
106
|
- name: confirm_needs_invoice
|
|
96
107
|
on: save
|
|
97
|
-
check: status != 'confirmed' || suggested_invoice != ''
|
|
98
|
-
message: {id: Pilih faktur sebelum konfirmasi}
|
|
108
|
+
check: status != 'confirmed' || suggested_invoice != '' || booked_payment != ''
|
|
109
|
+
message: {id: Pilih faktur (atau pembayaran yang sudah tercatat) sebelum konfirmasi}
|
|
110
|
+
- name: invoice_or_booked
|
|
111
|
+
on: save
|
|
112
|
+
check: suggested_invoice == '' || booked_payment == ''
|
|
113
|
+
message: {id: 'Pilih salah satu: faktur yang dibayar, atau pembayaran yang sudah tercatat'}
|
|
114
|
+
- name: booked_needs_payment
|
|
115
|
+
on: save
|
|
116
|
+
check: status != 'booked' || booked_payment != ''
|
|
117
|
+
message: {id: Pilih pembayaran yang sudah tercatat}
|
|
118
|
+
- name: booked_payment_fits
|
|
119
|
+
on: save
|
|
120
|
+
check: "booked_payment == '' || (booked_payment.docstatus == 1 && booked_payment.direction == 'receive' && booked_payment.method != 'cash' && booked_payment.method != 'sales_return' && booked_payment.amount == amount && booked_payment.bank_transaction == '')"
|
|
121
|
+
message: {id: 'Pembayaran yang sudah tercatat harus pembayaran masuk non-tunai yang diajukan, sebesar baris ini, dan belum dicocokkan ke mutasi lain'}
|
|
99
122
|
- name: confirm_only_money_in
|
|
100
123
|
on: save
|
|
101
124
|
check: status != 'confirmed' || amount > 0
|
|
@@ -110,7 +133,7 @@ rules:
|
|
|
110
133
|
message: {id: Urutan mulai dari 1}
|
|
111
134
|
views:
|
|
112
135
|
list:
|
|
113
|
-
columns: [date, description, amount, status, suggested_invoice, payment]
|
|
136
|
+
columns: [date, description, amount, status, suggested_invoice, payment, booked_payment]
|
|
114
137
|
sort: -date
|
|
115
138
|
form:
|
|
116
139
|
layout:
|
|
@@ -120,5 +143,5 @@ views:
|
|
|
120
143
|
- [credit, debit, amount, balance]
|
|
121
144
|
- section: {id: Pencocokan}
|
|
122
145
|
columns:
|
|
123
|
-
- [status, suggested_invoice]
|
|
146
|
+
- [status, suggested_invoice, booked_payment]
|
|
124
147
|
- [draft_payment, payment]
|
|
@@ -43,7 +43,7 @@ rules:
|
|
|
43
43
|
- name: own_payment_only
|
|
44
44
|
on: save
|
|
45
45
|
check: valid
|
|
46
|
-
message: {id: 'Mutasi
|
|
46
|
+
message: {id: 'Mutasi ini hanya dibayar oleh drafnya sendiri sebesar nilainya. Kalau pembayaran pelanggan ini sudah tercatat, pilih Sudah tercatat.'}
|
|
47
47
|
views:
|
|
48
48
|
list:
|
|
49
49
|
columns: [bank_transaction, payment, released_line]
|
|
@@ -15,6 +15,8 @@ permissions:
|
|
|
15
15
|
- {role: outlet_staff, read: true}
|
|
16
16
|
- {role: sales_rep, read: true}
|
|
17
17
|
- {role: field_sales, read: true}
|
|
18
|
+
# the cashier's catalogue groups by category: without read the tabs show codes (KTG-001), not names
|
|
19
|
+
- {role: cashier, read: true}
|
|
18
20
|
fields:
|
|
19
21
|
- name: category_name
|
|
20
22
|
type: data
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
# (TaxInvoiceBulk) and the unified withholding slips the firm issues (BPPU, BpuBulk), checked before download.
|
|
4
4
|
# Decisions and sources: reports/keputusan-riset/09-pajak-coretax.md in the project folder.
|
|
5
5
|
name: coretax
|
|
6
|
-
version: 1.0
|
|
6
|
+
version: 1.1.0
|
|
7
7
|
title: {id: Lapor pajak Coretax, en: Coretax tax filing}
|
|
8
8
|
summary:
|
|
9
9
|
id: Siapkan masa pajak dan berkas unduhan untuk lapor di Coretax.
|
|
10
10
|
en: Prepare tax periods and the files to report in Coretax.
|
|
11
11
|
category: tax
|
|
12
12
|
icon: file-list-3-line
|
|
13
|
-
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.2, catalogue: ^1.2, invoicing: ^1.
|
|
13
|
+
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.2, catalogue: ^1.2, invoicing: ^1.7, procurement: ^1.1, payments: ^1.4}
|
|
@@ -11,7 +11,7 @@ related:
|
|
|
11
11
|
invoices:
|
|
12
12
|
model: sales_invoice
|
|
13
13
|
range: {posting_date: [period_start, period_end]}
|
|
14
|
-
filter: docstatus == 1 && tax_rate > 0 && kind != 'retention'
|
|
14
|
+
filter: docstatus == 1 && tax_rate > 0 && ppn > 0 && kind != 'retention'
|
|
15
15
|
sort: name
|
|
16
16
|
children: true
|
|
17
17
|
limit: 1000
|
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
{{- /* Element names and order follow the DJP sample "Sample Faktur PK Template v.1.4.xml" (pajak.go.id Coretax
|
|
3
3
|
templates). Per line: TaxBase = the line's share of the invoice DPP (header discount and down payment spread in
|
|
4
4
|
proportion, the rounding rest on the last line, so the lines add up to the invoice DPP); TotalDiscount = Price x Qty
|
|
5
|
-
- TaxBase; OtherTaxBase = TaxBase x DPP factor; VAT = OtherTaxBase x rate. Amounts in rupiah, at most 2 decimals.
|
|
5
|
+
- TaxBase; OtherTaxBase = TaxBase x DPP factor; VAT = OtherTaxBase x rate. Amounts in rupiah, at most 2 decimals.
|
|
6
|
+
PPN on the fee only (config tax.ppn_fee_only, PMK 83/2012): an invoice whose PPN base is below its DPP was submitted
|
|
7
|
+
that way; its wage lines (ppn_exclude) stay off the faktur pajak and the fee lines share the PPN base instead. */}}
|
|
6
8
|
<TaxInvoiceBulk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="TaxInvoice.xsd">
|
|
7
9
|
<TIN>{{.Doc.seller_tin}}</TIN>
|
|
8
10
|
<ListOfTaxInvoice>
|
|
9
11
|
{{- $seller := .Doc.seller_nitku}}
|
|
10
12
|
{{- range .Related.invoices}}{{$inv := .}}
|
|
11
13
|
{{- $fx := and .currency (ne .currency "IDR")}}
|
|
12
|
-
{{-
|
|
13
|
-
|
|
14
|
+
{{- /* an invoice submitted before ppn_base existed has none (the kernel leaves such computes empty on frozen documents):
|
|
15
|
+
its PPN was taken on the whole DPP */}}
|
|
16
|
+
{{- $pb := .dpp}}{{if .ppn_base}}{{$pb = .ppn_base}}{{end}}
|
|
17
|
+
{{- $fee := ne (dec $pb 2) (dec .dpp 2)}}
|
|
18
|
+
{{- $s := "0"}}{{$n := "0"}}{{range .items}}{{if not (and $fee .ppn_exclude)}}{{$n = add $n 1}}{{if $fx}}{{$s = add $s .amount_fx_idr}}{{else}}{{$s = add $s .amount}}{{end}}{{end}}{{end}}
|
|
19
|
+
{{- $r := sub $s $pb}}{{$k := "0"}}{{$acc := "0"}}
|
|
14
20
|
<TaxInvoice>
|
|
15
21
|
<TaxInvoiceDate>{{isodate .posting_date}}</TaxInvoiceDate>
|
|
16
22
|
<TaxInvoiceOpt>Normal</TaxInvoiceOpt>
|
|
@@ -18,7 +24,7 @@
|
|
|
18
24
|
<AddInfo/>
|
|
19
25
|
<CustomDoc/>
|
|
20
26
|
<CustomDocMonthYear/>
|
|
21
|
-
<RefDesc>{{.name}}{{if .dp_invoice}}; uang muka {{.dp_invoice}}{{end}}</RefDesc>
|
|
27
|
+
<RefDesc>{{.name}}{{if .dp_invoice}}; uang muka {{.dp_invoice}}{{end}}{{if $fee}}; upah tenaga kerja di luar DPP (PMK 83/2012){{end}}</RefDesc>
|
|
22
28
|
<FacilityStamp/>
|
|
23
29
|
<SellerIDTKU>{{$seller}}</SellerIDTKU>
|
|
24
30
|
<BuyerTin>{{.buyer_tin}}</BuyerTin>
|
|
@@ -30,10 +36,10 @@
|
|
|
30
36
|
<BuyerEmail>{{.buyer_email}}</BuyerEmail>
|
|
31
37
|
<BuyerIDTKU>{{.buyer_idtku}}</BuyerIDTKU>
|
|
32
38
|
<ListOfGoodService>
|
|
33
|
-
{{- range $i, $l := .items}}
|
|
39
|
+
{{- range $i, $l := .items}}{{if not (and $fee $l.ppn_exclude)}}{{$k = add $k 1}}
|
|
34
40
|
{{- $b := $l.amount}}{{$p := $l.rate}}{{if $fx}}{{$b = $l.amount_fx_idr}}{{$p = round (mul $l.rate_fx $inv.exchange_rate) 2}}{{end}}
|
|
35
41
|
{{- $q := round $l.qty 2}}
|
|
36
|
-
{{- $tb := round (sub $b (div (mul $r $b) $s)) 2}}{{if eq
|
|
42
|
+
{{- $tb := round (sub $b (div (mul $r $b) $s)) 2}}{{if eq $k $n}}{{$tb = sub $pb $acc}}{{end}}{{$acc = add $acc $tb}}
|
|
37
43
|
{{- $otb := round (div (mul $tb $inv.dpp_num) $inv.dpp_den) 2}}
|
|
38
44
|
{{- /* Line amounts are whole rupiah while Price x Qty has 2 decimals, so Price x Qty can fall a few sen under TaxBase:
|
|
39
45
|
then Price is raised to TaxBase / Qty (rounded up to the sen) and TotalDiscount stays 0 or a few sen, never negative
|
|
@@ -54,7 +60,7 @@
|
|
|
54
60
|
<STLGRate>0</STLGRate>
|
|
55
61
|
<STLG>0</STLG>
|
|
56
62
|
</GoodService>
|
|
57
|
-
{{- end}}
|
|
63
|
+
{{- end}}{{end}}
|
|
58
64
|
</ListOfGoodService>
|
|
59
65
|
</TaxInvoice>
|
|
60
66
|
{{- end}}
|
|
@@ -17,4 +17,4 @@ steps:
|
|
|
17
17
|
- update: inv
|
|
18
18
|
if: f != null
|
|
19
19
|
set:
|
|
20
|
-
items: "event.items.filter(l, f.items.map(b, b.item == l.item ? b.delivered_qty - b.invoiced_qty : 0).sum() > 0.0005).map(l, {'name': l.name, 'item': l.item, 'description': l.description, 'uom': l.uom, 'rate': l.rate, 'discount': l.discount, 'pph23_exclude': l.pph23_exclude, 'rate_fx': l.rate_fx, 'qty': min(l.qty, f.items.map(b, b.item == l.item ? b.delivered_qty - b.invoiced_qty : 0).sum())})"
|
|
20
|
+
items: "event.items.filter(l, f.items.map(b, b.item == l.item ? b.delivered_qty - b.invoiced_qty : 0).sum() > 0.0005).map(l, {'name': l.name, 'item': l.item, 'description': l.description, 'uom': l.uom, 'rate': l.rate, 'discount': l.discount, 'pph23_exclude': l.pph23_exclude, 'ppn_exclude': l.ppn_exclude, 'rate_fx': l.rate_fx, 'qty': min(l.qty, f.items.map(b, b.item == l.item ? b.delivered_qty - b.invoiced_qty : 0).sum())})"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# it. order_fulfilment keeps per order what was ordered, delivered, returned and invoiced, because a submitted order
|
|
6
6
|
# cannot be written (K-p, contract 0022, will move this into the kernel's conversions).
|
|
7
7
|
name: delivery
|
|
8
|
-
version: 1.1.
|
|
8
|
+
version: 1.1.1
|
|
9
9
|
title: {id: Pengiriman dan retur, en: Delivery and returns}
|
|
10
10
|
summary:
|
|
11
11
|
id: Surat jalan, pemenuhan pesanan dan retur penjualan.
|
|
@@ -11,7 +11,7 @@ steps:
|
|
|
11
11
|
- {find: customer_order, where: name == event.name, as: so}
|
|
12
12
|
- update: so
|
|
13
13
|
set:
|
|
14
|
-
items: "event.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'rate': i.rate, 'tier_applied': i.tier_applied, 'price_tier': event.price_tier})"
|
|
14
|
+
items: "event.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'pph23_exclude': i.pph23_exclude, 'ppn_exclude': i.ppn_exclude, 'rate': i.rate, 'tier_applied': i.tier_applied, 'price_tier': event.price_tier})"
|
|
15
15
|
- update: so
|
|
16
16
|
set:
|
|
17
|
-
items: "so.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'rate': i.tier_applied == i.price_tier ? i.rate : i.list_rate, 'tier_applied': i.price_tier, 'price_tier': i.price_tier})"
|
|
17
|
+
items: "so.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'pph23_exclude': i.pph23_exclude, 'ppn_exclude': i.ppn_exclude, 'rate': i.tier_applied == i.price_tier ? i.rate : i.list_rate, 'tier_applied': i.price_tier, 'price_tier': i.price_tier})"
|
|
@@ -11,7 +11,7 @@ steps:
|
|
|
11
11
|
- {find: customer_order, where: name == event.name, as: so}
|
|
12
12
|
- update: so
|
|
13
13
|
set:
|
|
14
|
-
items: "event.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'rate': i.rate, 'tier_applied': i.tier_applied, 'price_tier': event.price_tier})"
|
|
14
|
+
items: "event.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'pph23_exclude': i.pph23_exclude, 'ppn_exclude': i.ppn_exclude, 'rate': i.rate, 'tier_applied': i.tier_applied, 'price_tier': event.price_tier})"
|
|
15
15
|
- update: so
|
|
16
16
|
set:
|
|
17
|
-
items: "so.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'rate': i.tier_applied == i.price_tier ? i.rate : i.list_rate, 'tier_applied': i.price_tier, 'price_tier': i.price_tier})"
|
|
17
|
+
items: "so.items.map(i, {'name': i.name, 'item': i.item, 'description': i.description, 'qty': i.qty, 'uom': i.uom, 'pph23_exclude': i.pph23_exclude, 'ppn_exclude': i.ppn_exclude, 'rate': i.tier_applied == i.price_tier ? i.rate : i.list_rate, 'tier_applied': i.price_tier, 'price_tier': i.price_tier})"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# this module switches on live in their own models (customer, item, customer_order, sales_invoice, payment) behind
|
|
5
5
|
# app_installed('distribution'); the flows here keep them current.
|
|
6
6
|
name: distribution
|
|
7
|
-
version: 1.0.
|
|
7
|
+
version: 1.0.1
|
|
8
8
|
title: {id: Distribusi, en: Distribution}
|
|
9
9
|
summary:
|
|
10
10
|
id: Catat giro masuk dari pelanggan grosir sampai cair.
|
|
@@ -128,10 +128,32 @@ fields:
|
|
|
128
128
|
# Not read_only: a generic amend zeroes read-only fields, and a zero dpp_den would break ppn (kernel follow-up).
|
|
129
129
|
- {name: dpp_num, type: int, label: {id: DPP nilai lain (pembilang)}, default: 'tax.dpp_num'}
|
|
130
130
|
- {name: dpp_den, type: int, label: {id: DPP nilai lain (penyebut)}, default: 'tax.dpp_den'}
|
|
131
|
+
# The PPN base: the DPP, or with config tax.ppn_fee_only (kernel contract 0010 §8, default off) the fee part of it:
|
|
132
|
+
# a manpower firm that bills the workers' wages on their own line charges PPN on its fee only (DPP nilai lain, PMK
|
|
133
|
+
# 83/2012 art. 4). Like PPh 23 (pph23_lines_base / pph23_dp_base): the lines not marked ppn_exclude, as a share of
|
|
134
|
+
# subtotal less the header discount, minus the PPN base already taxed on the down-payment invoice this one deducts
|
|
135
|
+
# (that invoice's own ppn_base in proportion to down_payment; its DPP when it predates the field and charged PPN). Foreign documents
|
|
136
|
+
# take the share from the lines' rupiah twins. 'in': a kernel without the setting reads it as off, never as an
|
|
137
|
+
# error that would zero the PPN. Frozen at submit with the setting of that day; the ratio (11/12) and rate still apply.
|
|
138
|
+
- name: ppn_lines_base
|
|
139
|
+
type: currency
|
|
140
|
+
label: {id: Dasar PPN baris}
|
|
141
|
+
hidden: true
|
|
142
|
+
compute: "currency != '' && currency != 'IDR' ? (items.map(i, i.amount_fx_idr).sum() == 0 ? 0 : round((subtotal - discount_amount) * 1.0 * items.map(i, i.ppn_exclude ? 0 : i.amount_fx_idr).sum() / items.map(i, i.amount_fx_idr).sum())) : (subtotal == 0 ? 0 : round((subtotal - discount_amount) * 1.0 * items.map(i, i.ppn_exclude ? 0 : i.amount).sum() / subtotal))"
|
|
143
|
+
- name: ppn_dp_base
|
|
144
|
+
type: currency
|
|
145
|
+
label: {id: Dasar PPN di faktur uang muka}
|
|
146
|
+
hidden: true
|
|
147
|
+
# a DP invoice from before ppn_base existed reads 0 there although it charged PPN: its whole DPP was the base
|
|
148
|
+
compute: "dp_invoice == '' || dp_invoice.dpp == 0 ? 0 : round((dp_invoice.ppn_base == 0 && dp_invoice.ppn != 0 ? dp_invoice.dpp : dp_invoice.ppn_base) * 1.0 * down_payment / dp_invoice.dpp)"
|
|
149
|
+
- name: ppn_base
|
|
150
|
+
type: currency
|
|
151
|
+
label: {id: Dasar PPN}
|
|
152
|
+
compute: "!('ppn_fee_only' in tax && tax.ppn_fee_only) ? dpp : (ppn_lines_base > ppn_dp_base ? ppn_lines_base - ppn_dp_base : 0)"
|
|
131
153
|
- name: ppn
|
|
132
154
|
type: currency
|
|
133
|
-
label: {id: PPN (
|
|
134
|
-
compute: "round(
|
|
155
|
+
label: {id: PPN (dasar PPN x rasio DPP nilai lain x tarif)}
|
|
156
|
+
compute: "round(ppn_base * dpp_num / dpp_den * tax_rate / 100)"
|
|
135
157
|
- name: grand_total
|
|
136
158
|
type: currency
|
|
137
159
|
label: {id: Total}
|
|
@@ -214,7 +236,7 @@ fields:
|
|
|
214
236
|
# Adjustments (discount_amount, down_payment) are entered in rupiah only, also on a foreign document: the ledger, the DP checks
|
|
215
237
|
# and PPN read the IDR fields. Their foreign twins are derived here (IDR / exchange_rate), never entered.
|
|
216
238
|
- {name: dpp_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: DPP (valas)}, compute: "currency != '' && currency != 'IDR' ? round(subtotal_fx - (discount_amount + down_payment) / exchange_rate, 2) : 0"}
|
|
217
|
-
- {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "round(dpp_fx * dpp_num / dpp_den * tax_rate / 100, 2)"}
|
|
239
|
+
- {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "dpp == 0 ? 0 : round(dpp_fx * (ppn_base * 1.0 / dpp) * dpp_num / dpp_den * tax_rate / 100, 2)"}
|
|
218
240
|
- {name: grand_total_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Total (valas)}, compute: "dpp_fx + ppn_fx"}
|
|
219
241
|
- {name: retention_amount_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Retensi ditahan (valas)}, compute: "round(dpp_fx * retention_percent / 100, 2)"}
|
|
220
242
|
- {name: pph23_amount_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPh 23 dipotong (valas)}, compute: "pph23_applies && dpp != 0 ? round(dpp_fx * (pph23_dpp * 1.0 / dpp * pph23_rate / 100), 2) : 0"}
|
|
@@ -378,6 +400,11 @@ rules:
|
|
|
378
400
|
on: save
|
|
379
401
|
check: billing_milestone == '' || billing_milestone.state != 'invoiced' || billing_milestone.sales_invoice == name
|
|
380
402
|
message: {id: Termin ini sudah ditagih di faktur lain}
|
|
403
|
+
- name: ppn_dp_base_above_lines
|
|
404
|
+
on: save
|
|
405
|
+
level: warn
|
|
406
|
+
check: "!('ppn_fee_only' in tax && tax.ppn_fee_only) || ppn_dp_base <= ppn_lines_base"
|
|
407
|
+
message: {id: 'Dasar PPN di faktur uang muka lebih besar dari dasar PPN baris faktur ini; pisahkan baris upah di faktur uang muka juga'}
|
|
381
408
|
- name: dp_base_above_lines
|
|
382
409
|
on: save
|
|
383
410
|
level: warn
|
|
@@ -467,7 +494,7 @@ views:
|
|
|
467
494
|
fields: [items]
|
|
468
495
|
- section: {id: Pajak & potongan}
|
|
469
496
|
columns:
|
|
470
|
-
- [discount_amount, dp_invoice, down_payment, tax_rate, dpp_num, dpp_den, ppn]
|
|
497
|
+
- [discount_amount, dp_invoice, down_payment, tax_rate, dpp_num, dpp_den, ppn_base, ppn]
|
|
471
498
|
- [pph23_applies, pph23_rate, pph23_amount, retention_percent, retention_of, retention_amount]
|
|
472
499
|
- section: {id: Ringkasan}
|
|
473
500
|
columns:
|
|
@@ -43,6 +43,13 @@ fields:
|
|
|
43
43
|
label: {id: Bukan dasar PPh 23}
|
|
44
44
|
help: {id: 'Centang untuk baris gaji tenaga kerja yang dirinci terpisah atau penggantian biaya'}
|
|
45
45
|
default: 'false'
|
|
46
|
+
# The workers' wages billed on their own line: outside the PPN base when the org charges PPN on its fee only
|
|
47
|
+
# (config tax.ppn_fee_only, PMK 83/2012). "Excluded" for the same reason as pph23_exclude: an old line reads false.
|
|
48
|
+
- name: ppn_exclude
|
|
49
|
+
type: check
|
|
50
|
+
label: {id: Upah tenaga kerja (di luar dasar PPN)}
|
|
51
|
+
help: {id: 'Centang untuk baris upah pekerja yang dirinci terpisah; hanya berlaku bila usaha memakai PPN atas fee'}
|
|
52
|
+
default: 'false'
|
|
46
53
|
|
|
47
54
|
- {name: rate_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Harga (valas)}, default: '0'}
|
|
48
55
|
- {name: amount_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Jumlah (valas)}, compute: "round(qty * rate_fx * (1 - discount / 100), 2)"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
2
|
name: invoicing
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.7.0
|
|
4
4
|
title: {id: Faktur, en: Invoicing}
|
|
5
5
|
summary:
|
|
6
6
|
id: Buat faktur penjualan, pilih cara bayar termasuk QRIS, dan kirim pengingat tagihan.
|
|
@@ -120,8 +120,21 @@
|
|
|
120
120
|
<tr><td>Subtotal</td><td class="num">{{rupiah .Doc.subtotal}}</td></tr>
|
|
121
121
|
{{if .Doc.discount_amount}}<tr><td>Diskon</td><td class="num">-{{rupiah .Doc.discount_amount}}</td></tr>{{end}}
|
|
122
122
|
{{if .Doc.down_payment}}<tr><td>Uang muka</td><td class="num">-{{rupiah .Doc.down_payment}}</td></tr>{{end}}
|
|
123
|
-
{{if taxrate .Doc .Tax}}<tr class="small"><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>
|
|
124
|
-
{{
|
|
123
|
+
{{if taxrate .Doc .Tax}}<tr class="small"><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>
|
|
124
|
+
{{- /* As on the faktur pajak (Coretax, PMK 131/2024): the base, then DPP nilai lain, then PPN = rate x DPP nilai lain.
|
|
125
|
+
An invoice of an org with PPN on the fee only (tax.ppn_fee_only, PMK 83/2012) shows the wages left out first; an
|
|
126
|
+
invoice from before ppn_base existed was taxed on its whole DPP. */}}
|
|
127
|
+
{{- /* the DPP only for a document from before ppn_base that charged PPN (as ppn_dp_base reads it); a base of 0 with
|
|
128
|
+
no PPN (wages only, or a settlement whose base the down payment used up) is that 0 */}}
|
|
129
|
+
{{- $pb := .Doc.dpp}}{{if or .Doc.ppn_base (not .Doc.ppn)}}{{$pb = or .Doc.ppn_base 0}}{{end}}
|
|
130
|
+
{{- if ne (dec $pb) (dec .Doc.dpp)}}
|
|
131
|
+
<tr class="small"><td>Upah tenaga kerja di luar dasar PPN (PMK 83/2012)</td><td class="num">-{{rupiah (sub .Doc.dpp $pb)}}</td></tr>
|
|
132
|
+
<tr class="small"><td>Dasar PPN</td><td class="num">{{rupiah $pb}}</td></tr>
|
|
133
|
+
{{- end}}
|
|
134
|
+
{{- if ne .Doc.dpp_num .Doc.dpp_den}}
|
|
135
|
+
<tr class="small"><td>DPP nilai lain {{.Doc.dpp_num}}/{{.Doc.dpp_den}}</td><td class="num">{{rupiah (round (div (mul $pb .Doc.dpp_num) .Doc.dpp_den))}}</td></tr>
|
|
136
|
+
{{- end}}
|
|
137
|
+
<tr class="small"><td>PPN {{number (taxrate .Doc .Tax)}}%</td><td class="num">{{rupiah .Doc.ppn}}</td></tr>{{end}}
|
|
125
138
|
<tr class="grand"><td>Total</td><td class="num">{{rupiah .Doc.grand_total}}</td></tr>
|
|
126
139
|
{{if .Doc.retention_amount}}<tr class="small"><td>Retensi {{number .Doc.retention_percent}}% ditahan</td><td class="num">-{{rupiah .Doc.retention_amount}}</td></tr>{{end}}
|
|
127
140
|
{{if .Doc.pph23_amount}}<tr class="small"><td>PPh 23 dipotong pelanggan{{if .Doc.pph23_dpp}} (dasar {{rupiah .Doc.pph23_dpp}}){{end}}</td><td class="num">-{{rupiah .Doc.pph23_amount}}</td></tr>{{end}}
|
|
@@ -47,3 +47,13 @@ fields:
|
|
|
47
47
|
type: currency
|
|
48
48
|
label: {id: Jumlah}
|
|
49
49
|
compute: round(qty * rate)
|
|
50
|
+
# The workers' wages line, carried from the quotation and on to the invoice by the kernel conversions: outside the
|
|
51
|
+
# PPh 23 base and, with config tax.ppn_fee_only, outside the PPN base (PMK 83/2012).
|
|
52
|
+
- name: pph23_exclude
|
|
53
|
+
type: check
|
|
54
|
+
label: {id: Bukan dasar PPh 23}
|
|
55
|
+
default: 'false'
|
|
56
|
+
- name: ppn_exclude
|
|
57
|
+
type: check
|
|
58
|
+
label: {id: Upah tenaga kerja (di luar dasar PPN)}
|
|
59
|
+
default: 'false'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# A DOKU refund (trigger payment_notified, transaction.type REFUND, status SUCCESS): the money went back to the payer
|
|
3
|
+
# from the DOKU balance. It is never money in (payment_from_doku runs only for paid == true) and it is not booked here
|
|
4
|
+
# either (no credit note or money-out document yet), so the owner is told, with the invoice, the amount and DOKU's id,
|
|
5
|
+
# to record it; before this a refund notification was dropped without a word (audit rel-uang-e2e M1).
|
|
6
|
+
name: payment_refund_from_doku
|
|
7
|
+
label: {id: Refund DOKU diberitahukan ke pemilik}
|
|
8
|
+
on: doku.payment_notified
|
|
9
|
+
if: "'type' in event && event.type == 'REFUND' && 'status' in event && event.status == 'SUCCESS'"
|
|
10
|
+
idempotency: "'gateway_ref' in event ? 'refund:' + event.gateway_ref + ':' + string(event.paid_amount) : ''"
|
|
11
|
+
steps:
|
|
12
|
+
- notify: owner
|
|
13
|
+
channel: email
|
|
14
|
+
template: {id: 'Refund DOKU Rp {event.paid_amount} untuk {event.external_id} ({event.gateway_ref}). Uang keluar dari saldo DOKU: catat pengembaliannya.'}
|
|
@@ -38,7 +38,7 @@ steps:
|
|
|
38
38
|
pph23_applies: event.pph23_applies
|
|
39
39
|
notes: "event.billing_mode == 'fee_only' ? 'Management fee tenaga kerja periode ' + event.period_from + ' s.d. ' + event.period_to + ' (' + event.name + ') [' + event.payroll_run + ']' : 'Tagihan tenaga kerja periode ' + event.period_from + ' s.d. ' + event.period_to + ' (' + event.name + ') [' + event.payroll_run + ']'"
|
|
40
40
|
items: >-
|
|
41
|
-
event.billing_mode == 'fee_only' ? [{'item': event.fee_item, 'description': 'Management fee', 'qty': 1, 'rate': event.fee_amount, 'pph23_exclude': false}] : [{'item': event.wage_item, 'description': 'Gaji, tunjangan, lembur dan THR tenaga kerja', 'qty': 1, 'rate': event.total_cash_gross, 'pph23_exclude': true},
|
|
41
|
+
event.billing_mode == 'fee_only' ? [{'item': event.fee_item, 'description': 'Management fee', 'qty': 1, 'rate': event.fee_amount, 'pph23_exclude': false}] : [{'item': event.wage_item, 'description': 'Gaji, tunjangan, lembur dan THR tenaga kerja', 'qty': 1, 'rate': event.total_cash_gross, 'pph23_exclude': true, 'ppn_exclude': true},
|
|
42
42
|
{'item': event.bpjs_item, 'description': 'Iuran BPJS Ketenagakerjaan dan Kesehatan bagian perusahaan', 'qty': 1, 'rate': event.total_employer_bpjs, 'pph23_exclude': false},
|
|
43
43
|
{'item': event.fee_item, 'description': 'Management fee', 'qty': 1, 'rate': event.fee_amount, 'pph23_exclude': false}]
|
|
44
44
|
- if: event.billing_mode == 'wages_plus_fee' && old == null
|
|
@@ -51,7 +51,7 @@ steps:
|
|
|
51
51
|
pph23_rate: '2'
|
|
52
52
|
notes: "'Tagihan tenaga kerja periode ' + event.period_from + ' s.d. ' + event.period_to + ' (' + event.name + ') [' + event.payroll_run + ']'"
|
|
53
53
|
items: >-
|
|
54
|
-
[{'item': event.wage_item, 'description': 'Gaji, tunjangan, lembur dan THR tenaga kerja', 'qty': 1, 'rate': event.total_cash_gross, 'pph23_exclude': true},
|
|
54
|
+
[{'item': event.wage_item, 'description': 'Gaji, tunjangan, lembur dan THR tenaga kerja', 'qty': 1, 'rate': event.total_cash_gross, 'pph23_exclude': true, 'ppn_exclude': true},
|
|
55
55
|
{'item': event.bpjs_item, 'description': 'Iuran BPJS Ketenagakerjaan dan Kesehatan bagian perusahaan', 'qty': 1, 'rate': event.total_employer_bpjs, 'pph23_exclude': false},
|
|
56
56
|
{'item': event.fee_item, 'description': 'Management fee', 'qty': 1, 'rate': event.fee_amount, 'pph23_exclude': false}]
|
|
57
57
|
- if: event.billing_mode == 'fee_only' && old == null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
2
|
name: payroll
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
title: {id: Penggajian, en: Payroll}
|
|
5
5
|
summary:
|
|
6
6
|
id: Data gaji pekerja, periode gaji, slip gaji dan tutup periode.
|
|
@@ -10,4 +10,4 @@ icon: money-dollar-box-line
|
|
|
10
10
|
# Monthly pay of outsourced workers from the attendance recap (projects.timesheet with period_to): payslips with BPJS and
|
|
11
11
|
# PPh 21 TER, the deposits of the month, the extra employer cost on the project margin and the client invoice (wages +
|
|
12
12
|
# BPJS + fee, or fee only). Rules and sources: docs/payroll.md.
|
|
13
|
-
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, workforce: ^1.0, projects: ^1.0, invoicing: ^1.
|
|
13
|
+
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, workforce: ^1.0, projects: ^1.0, invoicing: ^1.7}
|
|
@@ -36,6 +36,9 @@ fields:
|
|
|
36
36
|
- {name: reject_qty, type: float, label: {id: Qty reject}}
|
|
37
37
|
- {name: labour, type: table, of: production_labour, label: {id: Upah borongan}}
|
|
38
38
|
- {name: good_qty, type: float, label: {id: Hasil baik (produk utama)}, compute: "outputs.map(o, o.item == item ? o.qty : 0).sum()", in_list: true}
|
|
39
|
+
# the unit good_qty is counted in (the product's stock unit), so a list of batches of different products never reads
|
|
40
|
+
# 100 pak and 30 kg as the same kind of number (gladi G10)
|
|
41
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, compute: item.stock_uom, in_list: true}
|
|
39
42
|
- {name: yield_percent, type: float, label: {id: Rendemen aktual (%)}, compute: "planned_qty > 0 ? round(good_qty * 10000 / planned_qty) / 100 : 0"}
|
|
40
43
|
- {name: share_total, type: float, label: {id: Total porsi biaya (%)}, compute: "outputs.map(o, o.cost_share).sum()"}
|
|
41
44
|
- {name: main_share, type: float, label: {id: Porsi biaya produk utama (%)}, compute: "outputs.map(o, o.item == item ? o.cost_share : 0).sum()"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# at the value of those materials through the declarative stock block of contract 0021 (K-o). Wages and overhead are
|
|
6
6
|
# in the batch's actual cost (HPP) but not in the stock value until K-r.
|
|
7
7
|
name: production
|
|
8
|
-
version: 1.
|
|
8
|
+
version: 1.2.0
|
|
9
9
|
title: {id: Produksi, en: Production}
|
|
10
10
|
summary:
|
|
11
11
|
id: Resep produksi, SPK, hasil per batch dan upah borongan.
|