@rangka-os/create 0.5.0-alpha.18 → 0.5.0-alpha.19
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/dashboards/grosir_ar.rk +3 -2
- package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +3 -2
- package/template/base/apps/grosir_distribusi/dashboards/salesman_harian.rk +21 -1
- package/template/base/modules/contacts/models/vendor.rk +1 -1
- package/template/base/modules/contacts/module.rk +1 -1
- package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +1 -0
- package/template/base/modules/courses/module.rk +2 -2
- package/template/base/modules/invoicing/models/sales_invoice.rk +44 -5
- package/template/base/modules/invoicing/module.rk +1 -1
- package/template/base/modules/outlets/models/outlet_day_backfill.rk +2 -0
- package/template/base/modules/outlets/module.rk +1 -1
- package/template/base/modules/pos/flows/outlet_day_backfill_kasir.rk +50 -36
- package/template/base/modules/pos/models/pos_sale.rk +1 -0
- package/template/base/modules/pos/module.rk +2 -2
- package/template/base/modules/procurement/models/purchase_order.rk +7 -1
- package/template/base/modules/procurement/models/vendor_bill.rk +7 -1
- package/template/base/modules/procurement/module.rk +1 -1
- package/template/base/modules/quotation/models/quotation.rk +6 -0
- package/template/base/modules/quotation/module.rk +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rangka-os/create",
|
|
3
|
-
"version": "0.5.0-alpha.
|
|
3
|
+
"version": "0.5.0-alpha.19",
|
|
4
4
|
"description": "Start a Rangka OS project: npm create @rangka-os@latest my-shop",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"homepage": "https://rangka-os.github.io/rangka-os/guide/quick-start",
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: grosir_ar
|
|
3
3
|
label: {id: Piutang dan penagihan, en: Receivables and collections}
|
|
4
4
|
cache: 5m
|
|
5
|
-
# Money of the whole company: managers and the owner (always).
|
|
5
|
+
# Money of the whole company: the sales and finance managers and the owner (always). Head office is the warehouse
|
|
6
|
+
# in a distributor (it reads neither giro nor payments) and lands on gudang_harian (card t_2619c876). Staff land on gudang_harian or salesman_harian
|
|
6
7
|
# (card t_19f909b9: an outlet_staff member landed here and every widget was refused).
|
|
7
|
-
roles: [sales_manager, finance_manager
|
|
8
|
+
roles: [sales_manager, finance_manager]
|
|
8
9
|
widgets:
|
|
9
10
|
- name: ar_by_salesman
|
|
10
11
|
type: chart
|
|
@@ -4,9 +4,10 @@ label: {id: Ringkasan distribusi, en: Distribution overview}
|
|
|
4
4
|
default_period: 30
|
|
5
5
|
cache: 5m
|
|
6
6
|
# The owner's daily questions: what did the salesmen sell, which orders wait, who pays late, which giro is due.
|
|
7
|
-
# Money of the whole company: managers and the owner (always).
|
|
7
|
+
# Money of the whole company: the sales and finance managers and the owner (always). Head office is the warehouse
|
|
8
|
+
# in a distributor (it reads neither giro nor payments) and lands on gudang_harian (card t_2619c876). Staff land on gudang_harian or salesman_harian
|
|
8
9
|
# (card t_19f909b9: an outlet_staff member landed here and every widget was refused).
|
|
9
|
-
roles: [sales_manager, finance_manager
|
|
10
|
+
roles: [sales_manager, finance_manager]
|
|
10
11
|
widgets:
|
|
11
12
|
# riset desain K-A2: "perlu_" lists open the home as "Perlu diurus" rows (P2). Held orders are not listed here:
|
|
12
13
|
# they already wait in Persetujuan, which the same panel shows.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/dashboard.json
|
|
2
2
|
name: salesman_harian
|
|
3
3
|
label: {id: Pelanggan saya, en: My customers}
|
|
4
|
-
description: {id: 'Untuk salesman: pesanan yang belum jalan, pelanggan yang
|
|
4
|
+
description: {id: 'Untuk salesman: pesanan yang belum jalan, piutang dan tagihan, pelanggan yang ditahan kredit, dan giro dari pelanggan kamu'}
|
|
5
5
|
default_period: 30
|
|
6
6
|
cache: 1m
|
|
7
7
|
# The home of a salesman (contract 0030 §3). Every model here is row-scoped to the member's own records (role
|
|
@@ -19,6 +19,8 @@ widgets:
|
|
|
19
19
|
span: 12
|
|
20
20
|
- {name: orders_open, type: number, label: {id: Pesanan belum jalan}, description: {id: Draft dan pesanan yang menunggu persetujuan kredit}, model: customer_order, aggregate: count, filter: docstatus == 0, good_when: down, span: 4}
|
|
21
21
|
- {name: my_sales, type: number, label: {id: Penjualan saya (faktur)}, description: {id: 'Nilai sebelum PPN, faktur pelanggan kamu pada periode ini'}, model: sales_invoice, aggregate: sum, field: subtotal, filter: docstatus == 1, period: posting_date, compact: true, span: 4}
|
|
22
|
+
- {name: my_overdue, type: number, label: {id: Piutang saya lewat jatuh tempo}, model: sales_invoice, aggregate: sum, field: outstanding, filter: "docstatus == 1 && outstanding > 0 && due_date < today()", compact: true, good_when: down, span: 4}
|
|
23
|
+
- {name: my_collected, type: number, label: {id: Tertagih (periode ini)}, model: payment, aggregate: sum, field: amount, filter: "docstatus == 1 && direction == 'receive' && method != 'sales_return'", period: payment_date, compact: true, span: 4}
|
|
22
24
|
- {name: my_ar, type: number, label: {id: Piutang pelanggan saya}, model: sales_invoice, aggregate: sum, field: outstanding, filter: docstatus == 1 && outstanding > 0, compact: true, good_when: down, span: 4}
|
|
23
25
|
- name: giro_due
|
|
24
26
|
type: list
|
|
@@ -29,3 +31,21 @@ widgets:
|
|
|
29
31
|
limit: 10
|
|
30
32
|
columns: [giro_no, customer, effective_date, amount, status]
|
|
31
33
|
span: 12
|
|
34
|
+
# the collection tools a salesman needs on the road (card t_2619c876): who is on hold and which invoices are overdue
|
|
35
|
+
- name: on_hold
|
|
36
|
+
type: list
|
|
37
|
+
label: {id: Pelanggan saya yang ditahan kredit}
|
|
38
|
+
model: customer
|
|
39
|
+
filter: credit_hold
|
|
40
|
+
limit: 20
|
|
41
|
+
columns: [customer_name, credit_hold_reason, outstanding]
|
|
42
|
+
span: 12
|
|
43
|
+
- name: overdue_list
|
|
44
|
+
type: list
|
|
45
|
+
label: {id: Faktur pelanggan saya lewat jatuh tempo}
|
|
46
|
+
model: sales_invoice
|
|
47
|
+
filter: "docstatus == 1 && outstanding > 0 && due_date < today()"
|
|
48
|
+
sort: due_date
|
|
49
|
+
limit: 20
|
|
50
|
+
columns: [name, customer, due_date, outstanding]
|
|
51
|
+
span: 12
|
|
@@ -57,7 +57,7 @@ fields:
|
|
|
57
57
|
- name: pkp
|
|
58
58
|
type: check
|
|
59
59
|
label: {id: Pemasok PKP}
|
|
60
|
-
help: {id: 'PPN pembelian dari pemasok ini dihitung bila PKP'}
|
|
60
|
+
help: {id: 'PPN pembelian dari pemasok ini dihitung bila PKP. Diatur pemilik atau bagian keuangan setelah memeriksa SPPKP pemasok'}
|
|
61
61
|
default: 'false'
|
|
62
62
|
read_only_for: [sales_manager, purchasing_manager, project_admin, head_office]
|
|
63
63
|
- name: payment_days
|
|
@@ -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: contacts
|
|
3
|
-
version: 1.2.
|
|
3
|
+
version: 1.2.6
|
|
4
4
|
title: {id: Kontak, en: Contacts}
|
|
5
5
|
summary:
|
|
6
6
|
id: Catat pelanggan dan pemasok di satu tempat, lengkap dengan batas kredit.
|
|
@@ -45,6 +45,7 @@ steps:
|
|
|
45
45
|
customer: event.customer
|
|
46
46
|
posting_date: event.invoice_date
|
|
47
47
|
tax_rate: '0'
|
|
48
|
+
tax_rate_reason: "'exempt'"
|
|
48
49
|
notes: "'Biaya kursus ' + event.description + ' [' + event.name + ']'"
|
|
49
50
|
items: "[{'item': event.item, 'description': event.description, 'qty': 1, 'rate': event.amount}]"
|
|
50
51
|
- if: "!event.vat_exempt"
|
|
@@ -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: courses
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.3.0
|
|
4
4
|
title: {id: Kursus dan pelatihan, en: Courses and training}
|
|
5
5
|
summary:
|
|
6
6
|
id: Program kursus, angkatan, peserta, pendaftaran, jadwal pertemuan dan tagihannya.
|
|
@@ -11,4 +11,4 @@ icon: graduation-cap-line
|
|
|
11
11
|
# teacher and a weekly schedule, students (a person or an employee of a client company), enrollments, sessions with
|
|
12
12
|
# attendance, and charges (paid in full, in instalments or monthly) that become draft sales invoices. Research and plan:
|
|
13
13
|
# rangka research_notes/kursus, plans/kursus.md.
|
|
14
|
-
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, invoicing: ^1.
|
|
14
|
+
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, invoicing: ^1.8}
|
|
@@ -120,14 +120,33 @@ fields:
|
|
|
120
120
|
type: currency
|
|
121
121
|
label: {id: DPP}
|
|
122
122
|
compute: subtotal - discount_amount - down_payment
|
|
123
|
+
# The output PPN rate and DPP factor are finance's decision (audit tax-rate-config F1, card t_d6461a33): a rate of 0
|
|
124
|
+
# empties the faktur code and drops the invoice from the Coretax XML while the PPN is still owed, so a sales_manager
|
|
125
|
+
# (or any role that only reads invoices) cannot set them; their input is dropped and the company's config applies.
|
|
126
|
+
# read_only_for, not read_only: a generic amend zeroes read-only fields, and a zero dpp_den would break ppn.
|
|
123
127
|
- name: tax_rate
|
|
124
128
|
type: percent
|
|
125
129
|
label: {id: Tarif PPN}
|
|
126
|
-
help: {id: 'Dari
|
|
130
|
+
help: {id: 'Dari pengaturan pajak; 0 bila bukan PKP atau faktur retensi. Hanya pemilik atau bagian keuangan yang dapat mengubahnya.'}
|
|
127
131
|
default: "kind == 'retention' ? 0 : (tax.pkp ? tax.ppn_rate : 0)"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]
|
|
133
|
+
# the legal ground of a PKP invoice at 0% (card t_3106eb6c): without one the PPN owed would leave the Coretax XML
|
|
134
|
+
# unnoticed. Export of BKP/JKP is 0% (UU PPN Pasal 7 ayat 2); not subject to PPN (Pasal 4A) or no delivery carries
|
|
135
|
+
# none; facilities dibebaskan (Pasal 16B, PP 49/2022: education) and tidak dipungut are faktur codes 08 and 07 in
|
|
136
|
+
# Coretax (their XML is a follow-up card), recorded here at 0% with that ground.
|
|
137
|
+
- name: tax_rate_reason
|
|
138
|
+
type: select
|
|
139
|
+
label: {id: Dasar tarif PPN 0}
|
|
140
|
+
help: {id: 'Wajib bila perusahaan PKP mengisi tarif PPN 0. Diisi pemilik atau bagian keuangan.'}
|
|
141
|
+
depends_on: tax_rate == 0 && kind != 'retention'
|
|
142
|
+
read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]
|
|
143
|
+
options:
|
|
144
|
+
- {value: export, label: {id: 'Ekspor BKP/JKP (PPN 0%, Pasal 7 ayat 2)'}}
|
|
145
|
+
- {value: exempt, label: {id: 'Dibebaskan (Pasal 16B, PP 49/2022, mis. jasa pendidikan)'}}
|
|
146
|
+
- {value: not_collected, label: {id: 'Tidak dipungut (Pasal 16B, mis. kawasan berikat)'}}
|
|
147
|
+
- {value: not_taxable, label: {id: 'Bukan objek PPN (Pasal 4A) atau bukan penyerahan'}}
|
|
148
|
+
- {name: dpp_num, type: int, label: {id: DPP nilai lain (pembilang)}, default: 'tax.dpp_num', read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]}
|
|
149
|
+
- {name: dpp_den, type: int, label: {id: DPP nilai lain (penyebut)}, default: 'tax.dpp_den', read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]}
|
|
131
150
|
# The PPN base: the DPP, or with config tax.ppn_fee_only (kernel contract 0010 §8, default off) the fee part of it:
|
|
132
151
|
# a manpower firm that bills the workers' wages on their own line charges PPN on its fee only (DPP nilai lain, PMK
|
|
133
152
|
# 83/2012 art. 4). Like PPh 23 (pph23_lines_base / pph23_dp_base): the lines not marked ppn_exclude, as a share of
|
|
@@ -418,6 +437,18 @@ rules:
|
|
|
418
437
|
on: save
|
|
419
438
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
420
439
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
440
|
+
# a PKP invoice at 0% names its ground (card t_3106eb6c); a ground left on a rate above 0 is ignored (Coretax and
|
|
441
|
+
# ppn read the rate), so raising the rate never trips over the hidden field (audit zero-rate N2)
|
|
442
|
+
- name: zero_rate_needs_reason
|
|
443
|
+
on: save
|
|
444
|
+
check: "!tax.pkp || kind == 'retention' || tax_rate > 0 || tax_rate_reason != ''"
|
|
445
|
+
message: {id: 'Faktur PKP bertarif PPN 0 perlu dasar (ekspor, dibebaskan, tidak dipungut, bukan objek). Diisi pemilik atau bagian keuangan'}
|
|
446
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
447
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
448
|
+
- name: tax_rate_at_most_config
|
|
449
|
+
on: save
|
|
450
|
+
check: "tax_rate <= tax.ppn_rate"
|
|
451
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
421
452
|
- name: ppn_needs_pkp
|
|
422
453
|
on: save
|
|
423
454
|
check: tax.pkp || tax_rate == 0
|
|
@@ -478,6 +509,14 @@ approvals:
|
|
|
478
509
|
when: grand_total > 100000000
|
|
479
510
|
approvers: [finance_manager]
|
|
480
511
|
label: {id: Persetujuan keuangan untuk faktur besar, en: Finance approval for large invoices}
|
|
512
|
+
# a PKP invoice at another rate or DPP factor than the company's waits for finance (audit F5: a 1/10 factor amended) (card t_d6461a33, audit invoice-tax-lock F1/F2):
|
|
513
|
+
# the field lock alone lets a sales_manager reach rate 0 by turning a retention draft into a regular invoice, or by
|
|
514
|
+
# amending a finance export invoice; finance and the owner approve their own (an export at 0%, a pre-2025 document)
|
|
515
|
+
- name: ppn_rate_differs
|
|
516
|
+
on: submit
|
|
517
|
+
when: "tax.pkp && kind != 'retention' && (tax_rate != tax.ppn_rate || dpp_num * tax.dpp_den != tax.dpp_num * dpp_den)"
|
|
518
|
+
approvers: [finance_manager]
|
|
519
|
+
label: {id: 'Tarif PPN atau DPP berbeda dari pengaturan pajak: perlu persetujuan keuangan', en: 'PPN rate or DPP differs from the tax settings: finance approval'}
|
|
481
520
|
|
|
482
521
|
views:
|
|
483
522
|
list:
|
|
@@ -494,7 +533,7 @@ views:
|
|
|
494
533
|
fields: [items]
|
|
495
534
|
- section: {id: Pajak & potongan}
|
|
496
535
|
columns:
|
|
497
|
-
- [discount_amount, dp_invoice, down_payment, tax_rate, dpp_num, dpp_den, ppn_base, ppn]
|
|
536
|
+
- [discount_amount, dp_invoice, down_payment, tax_rate, tax_rate_reason, dpp_num, dpp_den, ppn_base, ppn]
|
|
498
537
|
- [pph23_applies, pph23_rate, pph23_amount, retention_percent, retention_of, retention_amount]
|
|
499
538
|
- section: {id: Ringkasan}
|
|
500
539
|
columns:
|
|
@@ -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.8.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.
|
|
@@ -21,3 +21,5 @@ fields:
|
|
|
21
21
|
- {value: kasir, label: {id: Kasir}}
|
|
22
22
|
- {value: harian, label: {id: 'Penjualan harian (form, Moka, file) atau setoran'}}
|
|
23
23
|
- {name: done, type: check, label: {id: Selesai}, read_only: true}
|
|
24
|
+
# the kasir backfill walks back in windows of days (card t_0dba5917): days before this date are still to check
|
|
25
|
+
- {name: before, type: date, label: {id: Belum diperiksa sebelum}, read_only: true}
|
|
@@ -1,47 +1,61 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
2
|
# Backfill of outlets/outlet_day for days submitted before it existed (audit rangka-apps#77 F3): the kernel has no
|
|
3
|
-
# migrate hook for .rk, so
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# the
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
3
|
+
# migrate hook for .rk, so the run walks back through the days in windows of 30, newest first (card t_0dba5917, audit
|
|
4
|
+
# rangka-apps#79 R2-1: reading every receipt per run grew with the history). The first run records the start in
|
|
5
|
+
# outlet_day_backfill key kasir (before = tomorrow). Every later run checks, for each outlet and each day of the window
|
|
6
|
+
# below `before`, the first submitted receipt of that outlet and day (an SQL read on outlet, date and docstatus, kernel
|
|
7
|
+
# date pushdown, pos_sale.date indexed; first by number, STRK-<outlet>-<YYMM>-<n> is padded) and its marker (day_key,
|
|
8
|
+
# unique); a day without a marker gets one with source kasir and that receipt (audit #79 R2-3). A day already marked
|
|
9
|
+
# (any source, also one freed by a cancel) is left as it is, so the run is safe to repeat and a day never gets two
|
|
10
|
+
# markers. Then `before` moves back 30 days; the run that finds no submitted receipt before it records done, and from
|
|
11
|
+
# then on a run reads only that one row (audit #79 F1). A receipt without an outlet has no day to mark and does not hold
|
|
12
|
+
# the walk back (audit #79 F5), nor does a receipt without a date (audit t_0dba5917 B2).
|
|
11
13
|
name: outlet_day_backfill_kasir
|
|
12
14
|
label: {id: 'Lengkapi sumber penjualan harian dari struk kasir lama'}
|
|
13
15
|
schedule: '*/5 * * * *'
|
|
14
16
|
steps:
|
|
15
|
-
-
|
|
17
|
+
- find: outlet_day_backfill
|
|
16
18
|
where: "key == 'kasir'"
|
|
17
|
-
limit: 1
|
|
18
19
|
as: st
|
|
19
|
-
- find_all: outlet_day
|
|
20
|
-
if: "size(st) == 0"
|
|
21
|
-
as: marked
|
|
22
|
-
- find_all: pos_sale
|
|
23
|
-
if: "size(st) == 0"
|
|
24
|
-
where: "docstatus == 1 && outlet != null && outlet != '' && !marked.exists(m, m.outlet == outlet && m.date == date)"
|
|
25
|
-
limit: 1000
|
|
26
|
-
as: r
|
|
27
|
-
- for_each: "r"
|
|
28
|
-
if: "size(st) == 0"
|
|
29
|
-
as: d
|
|
30
|
-
do:
|
|
31
|
-
- find_all: outlet_day
|
|
32
|
-
where: "day_key == d.outlet + '|' + string(d.date)"
|
|
33
|
-
limit: 1
|
|
34
|
-
as: k
|
|
35
|
-
- create: outlet_day
|
|
36
|
-
if: "size(k) == 0"
|
|
37
|
-
set:
|
|
38
|
-
outlet: "d.outlet"
|
|
39
|
-
date: "d.date"
|
|
40
|
-
source: "'kasir'"
|
|
41
|
-
document: "d.name"
|
|
42
|
-
day_key: "d.outlet + '|' + string(d.date)"
|
|
43
20
|
- create: outlet_day_backfill
|
|
44
|
-
if: "
|
|
21
|
+
if: "st == null"
|
|
45
22
|
set:
|
|
46
23
|
key: "'kasir'"
|
|
47
|
-
|
|
24
|
+
before: "today() + duration(1)"
|
|
25
|
+
done: "false"
|
|
26
|
+
- find_all: outlet
|
|
27
|
+
if: "st != null && !st.done"
|
|
28
|
+
as: outlets
|
|
29
|
+
- for_each: "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30].map(i, st.before - duration(i))"
|
|
30
|
+
if: "st != null && !st.done"
|
|
31
|
+
as: d
|
|
32
|
+
do:
|
|
33
|
+
- for_each: "outlets"
|
|
34
|
+
as: o
|
|
35
|
+
do:
|
|
36
|
+
- find_all: pos_sale
|
|
37
|
+
where: "docstatus == 1 && outlet == o.name && date == d"
|
|
38
|
+
sort: name
|
|
39
|
+
limit: 1
|
|
40
|
+
as: r
|
|
41
|
+
- find: outlet_day
|
|
42
|
+
if: "size(r) > 0"
|
|
43
|
+
where: "day_key == o.name + '|' + d"
|
|
44
|
+
as: k
|
|
45
|
+
- create: outlet_day
|
|
46
|
+
if: "size(r) > 0 && k == null"
|
|
47
|
+
set:
|
|
48
|
+
outlet: "o.name"
|
|
49
|
+
date: "d"
|
|
50
|
+
source: "'kasir'"
|
|
51
|
+
document: "r[0].name"
|
|
52
|
+
day_key: "o.name + '|' + d"
|
|
53
|
+
- find: pos_sale
|
|
54
|
+
if: "st != null && !st.done"
|
|
55
|
+
where: "docstatus == 1 && date != '' && date < st.before - duration(30)"
|
|
56
|
+
as: more
|
|
57
|
+
- update: st
|
|
58
|
+
if: "st != null && !st.done"
|
|
59
|
+
set:
|
|
60
|
+
before: "st.before - duration(30)"
|
|
61
|
+
done: "more == 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: pos
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
title: {id: Kasir, en: Point of sale}
|
|
5
5
|
summary:
|
|
6
6
|
id: Kasir di browser dengan sesi kas, transaksi dan tutup sesi per outlet.
|
|
@@ -17,6 +17,6 @@ icon: shopping-basket-line
|
|
|
17
17
|
# (cancel, then amend without the returned items) only on its own day while its shift is open.
|
|
18
18
|
# Sales of an outlet run either here or through outlet_sales (Jalur A), never both: an outlet whose sales_source is
|
|
19
19
|
# 'kasir' takes no daily form or POS file, and a sale needs that source when outlet_sales is installed.
|
|
20
|
-
requires: {rangka: '>=0.5', users: ^1.2, catalogue: ^1.3, outlets: ^1.
|
|
20
|
+
requires: {rangka: '>=0.5', users: ^1.2, catalogue: ^1.3, outlets: ^1.5, stock: ^1.2}
|
|
21
21
|
hooks: [stock.reverse_moves]
|
|
22
22
|
optional: {accounting: ^1.2, outlet_sales: ^1.1}
|
|
@@ -105,10 +105,16 @@ rules:
|
|
|
105
105
|
on: save
|
|
106
106
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
107
107
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
108
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
109
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
110
|
+
- name: tax_rate_at_most_config
|
|
111
|
+
on: save
|
|
112
|
+
check: "tax_rate <= tax.ppn_rate"
|
|
113
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
108
114
|
- name: ppn_needs_pkp
|
|
109
115
|
on: save
|
|
110
116
|
check: vendor.pkp || tax_rate == 0
|
|
111
|
-
message: {id: Pemasok bukan PKP
|
|
117
|
+
message: {id: 'Pemasok bukan PKP: tarif PPN harus 0. Status PKP pemasok diatur pemilik atau bagian keuangan'}
|
|
112
118
|
- name: delivery_after_order
|
|
113
119
|
on: save
|
|
114
120
|
check: delivery_date == '' || delivery_date >= order_date
|
|
@@ -229,10 +229,16 @@ rules:
|
|
|
229
229
|
on: save
|
|
230
230
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
231
231
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
232
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
233
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
234
|
+
- name: tax_rate_at_most_config
|
|
235
|
+
on: save
|
|
236
|
+
check: "tax_rate <= tax.ppn_rate || (purchase_order != '' && tax_rate == purchase_order.tax_rate)"
|
|
237
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
232
238
|
- name: ppn_needs_pkp
|
|
233
239
|
on: save
|
|
234
240
|
check: "tax_rate == 0 || (purchase_order != '' ? purchase_order.tax_rate > 0 : vendor.pkp)"
|
|
235
|
-
message: {id: Pemasok bukan PKP (atau PO tanpa PPN)
|
|
241
|
+
message: {id: 'Pemasok bukan PKP (atau PO tanpa PPN): tarif PPN harus 0. Status PKP pemasok diatur pemilik atau bagian keuangan'}
|
|
236
242
|
- name: due_after_bill
|
|
237
243
|
on: save
|
|
238
244
|
check: due_date == '' || due_date >= bill_date
|
|
@@ -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: procurement
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.5
|
|
4
4
|
title: {id: Pembelian, en: Procurement}
|
|
5
5
|
summary:
|
|
6
6
|
id: Permintaan dan pesanan pembelian, barang datang dan tagihan pemasok.
|
|
@@ -132,6 +132,12 @@ rules:
|
|
|
132
132
|
on: save
|
|
133
133
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
134
134
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
135
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
136
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
137
|
+
- name: tax_rate_at_most_config
|
|
138
|
+
on: save
|
|
139
|
+
check: "tax_rate <= tax.ppn_rate"
|
|
140
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
135
141
|
- name: ppn_needs_pkp
|
|
136
142
|
on: save
|
|
137
143
|
check: tax.pkp || tax_rate == 0
|