@rangka-os/create 0.5.0-alpha.32 → 0.5.0-alpha.34
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/absen_karyawan/app.rk +1 -1
- package/template/base/apps/absen_karyawan/dashboards/absen_karyawan_saya.rk +2 -2
- package/template/base/apps/absen_karyawan/dashboards/jadwal_saya.rk +4 -4
- package/template/base/apps/grosir_distribusi/app.rk +1 -1
- package/template/base/apps/karyawan_gaji/app.rk +6 -2
- package/template/base/apps/karyawan_gaji/dashboards/klaim_kasbon_saya.rk +3 -3
- package/template/base/apps/karyawan_gaji/dashboards/saya.rk +20 -0
- package/template/base/apps/karyawan_gaji/skills/rangka-app-karyawan-gaji/SKILL.md +3 -0
- package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +1 -1
- package/template/base/apps/pesanan_whatsapp/app.rk +28 -0
- package/template/base/apps/produksi_pabrik/app.rk +1 -1
- package/template/base/apps/ritel_cabang/app.rk +1 -1
- package/template/base/apps/ritel_cabang/dashboards/ritel_overview.rk +16 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_stock.rk +13 -0
- package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/SKILL.md +3 -3
- package/template/base/connectors/rangka_whatsapp/README.md +3 -2
- package/template/base/connectors/rangka_whatsapp/connector.rk +12 -4
- package/template/base/connectors/rangka_whatsapp/fixtures/expect.json +3 -2
- package/template/base/connectors/rangka_whatsapp/fixtures/message_received.json +1 -1
- package/template/base/connectors/rangka_whatsapp/fixtures/message_received_order.json +1 -0
- package/template/base/connectors/rangka_whatsapp/mock/rangka_whatsapp_mock.py +9 -4
- package/template/base/modules/attendance/models/attendance_summary.rk +2 -4
- package/template/base/modules/attendance/models/staff_attendance.rk +3 -0
- package/template/base/modules/attendance/module.rk +1 -1
- package/template/base/modules/catalogue/defaults/uom.rk +19 -0
- package/template/base/modules/catalogue/models/item.rk +36 -0
- package/template/base/modules/catalogue/module.rk +1 -1
- package/template/base/modules/delivery/models/delivery_note.rk +3 -1
- package/template/base/modules/delivery/models/delivery_note_item.rk +4 -0
- package/template/base/modules/delivery/models/sales_return.rk +2 -2
- package/template/base/modules/delivery/models/sales_return_item.rk +3 -0
- package/template/base/modules/delivery/module.rk +2 -2
- package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +1 -0
- package/template/base/modules/outlets/models/outlet.rk +9 -0
- package/template/base/modules/outlets/module.rk +1 -1
- package/template/base/modules/payroll/models/cash_advance.rk +2 -0
- package/template/base/modules/payroll/models/cash_advance_balance.rk +2 -4
- package/template/base/modules/payroll/models/payroll_run.rk +1 -0
- package/template/base/modules/payroll/models/payslip.rk +43 -12
- package/template/base/modules/payroll/module.rk +1 -1
- package/template/base/modules/payroll/print/payslip.html +4 -4
- package/template/base/modules/pos/models/pos_sale_item.rk +1 -0
- package/template/base/modules/pos/screens/kasir.rk +1 -0
- package/template/base/modules/procurement/models/goods_receipt_item.rk +21 -0
- package/template/base/modules/procurement/module.rk +2 -2
- package/template/base/modules/production/models/production_batch.rk +10 -5
- package/template/base/modules/production/models/production_material.rk +3 -0
- package/template/base/modules/production/models/production_output.rk +12 -0
- package/template/base/modules/production/module.rk +2 -2
- package/template/base/modules/reimbursement/models/claim_settlement.rk +1 -0
- package/template/base/modules/reimbursement/models/expense_claim.rk +4 -1
- package/template/base/modules/reimbursement/module.rk +1 -1
- package/template/base/modules/shifts/models/shift_assignment.rk +2 -3
- package/template/base/modules/shifts/models/shift_swap.rk +2 -0
- package/template/base/modules/shifts/module.rk +1 -1
- package/template/base/modules/stock/flows/item_tracking_lock.rk +37 -0
- package/template/base/modules/stock/flows/lot_expiry_digest.rk +103 -0
- package/template/base/modules/stock/flows/stock_balance_variant_group.rk +26 -0
- package/template/base/modules/stock/models/serial_no.rk +55 -0
- package/template/base/modules/stock/models/stock_adjustment_item.rk +4 -0
- package/template/base/modules/stock/models/stock_balance.rk +1 -0
- package/template/base/modules/stock/models/stock_expiry.rk +47 -0
- package/template/base/modules/stock/models/stock_guard.rk +40 -0
- package/template/base/modules/stock/models/stock_lot.rk +38 -0
- package/template/base/modules/stock/models/stock_lot_balance.rk +30 -0
- package/template/base/modules/stock/models/stock_move.rk +7 -2
- package/template/base/modules/stock/models/stock_transfer_item.rk +4 -0
- package/template/base/modules/stock/models/stock_transfer_receipt_item.rk +3 -0
- package/template/base/modules/stock/module.rk +9 -2
- package/template/base/modules/whatsapp/models/whatsapp_message.rk +2 -0
- package/template/base/modules/whatsapp/module.rk +2 -2
- package/template/base/modules/whatsapp_order/README.md +44 -0
- package/template/base/modules/whatsapp_order/flows/whatsapp_order_intake.rk +118 -0
- package/template/base/modules/whatsapp_order/flows/whatsapp_order_locked.rk +12 -0
- package/template/base/modules/whatsapp_order/flows/whatsapp_order_on_update.rk +124 -0
- package/template/base/modules/whatsapp_order/models/whatsapp_inbound.rk +62 -0
- package/template/base/modules/whatsapp_order/models/whatsapp_order.rk +164 -0
- package/template/base/modules/whatsapp_order/models/whatsapp_order_guard.rk +46 -0
- package/template/base/modules/whatsapp_order/models/whatsapp_order_line.rk +45 -0
- package/template/base/modules/whatsapp_order/module.rk +42 -0
- package/template/base/modules/whatsapp_order/screens/pesanan_wa.rk +22 -0
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.34",
|
|
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/app.json
|
|
2
2
|
name: absen_karyawan
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.1.0
|
|
4
4
|
title: {id: Absen karyawan, en: Staff attendance}
|
|
5
5
|
label: {id: Rangka Absen Karyawan, en: Rangka Staff Attendance}
|
|
6
6
|
summary:
|
|
@@ -5,10 +5,10 @@ description: {id: 'Absen masuk dan pulang kamu, hari hadir dan menit terlambat b
|
|
|
5
5
|
# Every widget filters on the member's own employee record, so head office and outlet supervisors (who read more logs)
|
|
6
6
|
# also see only their own days here. Staff are limited to their own logs anyway (staff_attendance read if:).
|
|
7
7
|
default_period: 31
|
|
8
|
-
roles: [
|
|
8
|
+
roles: [member]
|
|
9
9
|
cache: 1m
|
|
10
10
|
widgets:
|
|
11
11
|
- {name: days_present, type: number, label: {id: Hari hadir}, model: staff_attendance, filter: "employee == user.name && docstatus == 1", period: work_date, compact: true, span: 4}
|
|
12
12
|
- {name: late_min, type: number, label: {id: Menit terlambat}, model: staff_attendance, aggregate: sum, field: late_min, filter: "employee == user.name && docstatus == 1", period: work_date, compact: true, span: 4, good_when: down}
|
|
13
13
|
- {name: waiting, type: number, label: {id: Menunggu}, description: {id: 'Sudah absen pulang tapi belum sah: menunggu persetujuan kepala outlet'}, model: staff_attendance, filter: "employee == user.name && docstatus == 0 && clock_out != ''", compact: true, span: 4, good_when: down}
|
|
14
|
-
- {name: recent, type: list, label: {id: Absen terakhir}, model: staff_attendance, filter: "employee == user.name && docstatus != 2", period: work_date, columns: [work_date, clock_in, clock_out, late_min, outside_site, status], sort: -work_date, limit: 31, span: 12}
|
|
14
|
+
- {name: recent, type: list, empty: {id: 'Belum ada absen di periode ini.'}, label: {id: Absen terakhir}, model: staff_attendance, filter: "employee == user.name && docstatus != 2", period: work_date, columns: [work_date, clock_in, clock_out, late_min, outside_site, status], sort: -work_date, limit: 31, span: 12}
|
|
@@ -7,9 +7,9 @@ description: {id: 'Shift kamu hari ini dan 13 hari ke depan, dan permintaan tuka
|
|
|
7
7
|
# (shift_assignment read if:).
|
|
8
8
|
periods: [1]
|
|
9
9
|
default_period: 1
|
|
10
|
-
roles: [
|
|
10
|
+
roles: [member]
|
|
11
11
|
cache: 1m
|
|
12
12
|
widgets:
|
|
13
|
-
- {name: today, type: list, label: {id: Hari ini}, model: shift_assignment, filter: "employee == user.name && published && work_date == today()", columns: [shift_label, outlet, outcome], limit: 1, span: 12}
|
|
14
|
-
- {name: next, type: list, label: {id: 14 hari ke depan}, model: shift_assignment, filter: "employee == user.name && published && work_date > today() && days_between(today(), work_date) <= 13", columns: [work_date, shift_label, outlet], sort: work_date, limit: 14, span: 12}
|
|
15
|
-
- {name: swaps, type: list, label: {id: Tukar shift menunggu}, model: shift_swap, filter: "requested_by == user.name && docstatus == 0", columns: [work_date, my_shift_name, with_note], sort: work_date, limit: 10, span: 12}
|
|
13
|
+
- {name: today, type: list, empty: {id: 'Tidak ada shift hari ini.'}, label: {id: Hari ini}, model: shift_assignment, filter: "employee == user.name && published && work_date == today()", columns: [shift_label, outlet, outcome], limit: 1, span: 12}
|
|
14
|
+
- {name: next, type: list, empty: {id: 'Belum ada jadwal 14 hari ke depan.'}, label: {id: 14 hari ke depan}, model: shift_assignment, filter: "employee == user.name && published && work_date > today() && days_between(today(), work_date) <= 13", columns: [work_date, shift_label, outlet], sort: work_date, limit: 14, span: 12}
|
|
15
|
+
- {name: swaps, type: list, empty: {id: 'Tidak ada permintaan tukar shift.'}, label: {id: Tukar shift menunggu}, model: shift_swap, filter: "requested_by == user.name && docstatus == 0", columns: [work_date, my_shift_name, with_note], sort: work_date, limit: 10, span: 12}
|
|
@@ -37,7 +37,7 @@ menu:
|
|
|
37
37
|
- group: {id: Pengiriman}
|
|
38
38
|
items: [delivery_note, sales_return, order_fulfilment, return_credit]
|
|
39
39
|
- group: {id: Gudang}
|
|
40
|
-
items: [stock_balance, stock_move, stock_request, stock_transfer, stock_transfer_receipt, stock_count, stock_adjustment]
|
|
40
|
+
items: [stock_balance, stock_lot_balance, stock_expiry, serial_no, stock_move, stock_request, stock_transfer, stock_transfer_receipt, stock_count, stock_adjustment]
|
|
41
41
|
- group: {id: Pembelian}
|
|
42
42
|
items: [purchase_order, goods_receipt, vendor_bill]
|
|
43
43
|
- group: {id: Pembukuan}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/app.json
|
|
2
2
|
name: karyawan_gaji
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
title: {id: Karyawan dan gaji, en: Staff and payroll}
|
|
5
5
|
label: {id: Rangka Karyawan dan Gaji, en: Rangka Staff and Payroll}
|
|
6
6
|
summary:
|
|
@@ -23,7 +23,11 @@ modules:
|
|
|
23
23
|
attendance: ^1.0
|
|
24
24
|
payroll: ^2.2
|
|
25
25
|
reimbursement: ^1.0
|
|
26
|
-
|
|
26
|
+
# shifts (rangka-apps#120) comes with absen_karyawan; the saya dashboard shows the coming shifts where it is installed
|
|
27
|
+
optional:
|
|
28
|
+
shifts: ^1.0
|
|
29
|
+
# saya: the employee app's page (rangka-os#261, contract 0074), open to every employee whatever their role
|
|
30
|
+
dashboards: [gaji_ringkas, transfer_gaji, klaim_kasbon_saya, saya]
|
|
27
31
|
roles: [finance_manager, head_office, outlet_supervisor, cashier, outlet_staff, employee]
|
|
28
32
|
home: {dashboard: gaji_ringkas}
|
|
29
33
|
# rangka-apps#117: staff claim expenses and ask for a kasbon from their phone (Kerja group); the clock stays their home
|
|
@@ -5,11 +5,11 @@ description: {id: 'Klaim biaya kamu yang menunggu disetujui atau dibayar, dan si
|
|
|
5
5
|
# rangka-apps#117. Every widget filters on the member's own employee record, so head office and outlet supervisors (who
|
|
6
6
|
# read more claims) also see only their own here. Staff are limited to their own rows anyway (permission if:).
|
|
7
7
|
default_period: 92
|
|
8
|
-
roles: [
|
|
8
|
+
roles: [member]
|
|
9
9
|
cache: 1m
|
|
10
10
|
widgets:
|
|
11
11
|
- {name: claims_waiting, type: number, label: {id: Klaim menunggu disetujui}, model: expense_claim, filter: "employee == user.name && docstatus == 0", compact: true, span: 4, good_when: down}
|
|
12
12
|
- {name: claims_due, type: number, label: {id: Klaim menunggu dibayar}, description: {id: 'Sudah disetujui, dibayar tunai, transfer, atau bersama gaji berikutnya'}, model: claim_settlement, aggregate: sum, field: amount, filter: "employee == user.name && !paid && !cancelled", compact: true, span: 4}
|
|
13
13
|
- {name: kasbon_left, type: number, label: {id: Sisa kasbon}, model: cash_advance_balance, aggregate: sum, field: remaining, filter: "employee == user.name && !cancelled", compact: true, span: 4, good_when: down}
|
|
14
|
-
- {name: claims, type: list, label: {id: Klaim saya}, model: expense_claim, filter: "employee == user.name && docstatus != 2", period: claim_date, columns: [claim_date, category, amount, pay_with, status], sort: -claim_date, limit: 31, span: 12}
|
|
15
|
-
- {name: kasbon, type: list, label: {id: Kasbon saya}, model: cash_advance_balance, filter: "employee == user.name && !cancelled", columns: [advance_date, amount, installment, repaid_total, remaining, state], sort: -advance_date, limit: 12, span: 12}
|
|
14
|
+
- {name: claims, type: list, empty: {id: 'Belum ada klaim di periode ini.'}, label: {id: Klaim saya}, model: expense_claim, filter: "employee == user.name && docstatus != 2", period: claim_date, columns: [claim_date, category, amount, pay_with, status], sort: -claim_date, limit: 31, span: 12}
|
|
15
|
+
- {name: kasbon, type: list, empty: {id: 'Tidak ada kasbon yang masih dipotong.'}, label: {id: Kasbon saya}, model: cash_advance_balance, filter: "employee == user.name && !cancelled", columns: [advance_date, amount, installment, repaid_total, remaining, state], sort: -advance_date, limit: 12, span: 12}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/dashboard.json
|
|
2
|
+
name: saya
|
|
3
|
+
label: {id: Saya, en: Me}
|
|
4
|
+
description: {id: 'Slip gaji, absen, kasbon, klaim, dan jadwal kamu di satu tempat'}
|
|
5
|
+
# The employee app (rangka-os#261): every employee, whatever their role, opens it from the phone (Lainnya, or the
|
|
6
|
+
# "Slip gaji" shortcut of the installed app). Every widget filters on the person's own employee record, and the member
|
|
7
|
+
# grants (rangka-os contract 0074) let them read only their own rows: payslips once released (submitted, run closed or
|
|
8
|
+
# pay day reached), attendance logs, kasbon, claims and published shifts.
|
|
9
|
+
default_period: 31
|
|
10
|
+
roles: [member]
|
|
11
|
+
cache: 1m
|
|
12
|
+
widgets:
|
|
13
|
+
- {name: pay, type: number, label: {id: Gaji bersih diterima}, description: {id: 'Jumlah slip gaji yang periodenya berakhir di rentang ini'}, model: payslip, aggregate: sum, field: net_pay, filter: "employee == user.name && docstatus == 1", period: run_period_to, compact: true, span: 4}
|
|
14
|
+
- {name: days_present, type: number, label: {id: Hari hadir}, model: staff_attendance, filter: "employee == user.name && docstatus == 1", period: work_date, compact: true, span: 4}
|
|
15
|
+
- {name: late_min, type: number, label: {id: Menit terlambat}, model: staff_attendance, aggregate: sum, field: late_min, filter: "employee == user.name && docstatus == 1", period: work_date, compact: true, span: 4, good_when: down}
|
|
16
|
+
- {name: slips, type: list, empty: {id: 'Belum ada slip gaji. Slip muncul setelah gaji periode itu dibayar.'}, label: {id: Slip gaji saya}, description: {id: 'Slip muncul setelah gaji periode itu dibayar. Buka slip untuk mencetak atau menyimpan PDF.'}, model: payslip, filter: "employee == user.name && docstatus == 1", columns: [run_period_from, net_pay, run_period_to], sort: -run_period_to, limit: 12, span: 12}
|
|
17
|
+
- {name: next_shifts, type: list, empty: {id: 'Belum ada jadwal minggu ini.'}, label: {id: Jadwal 7 hari ke depan}, model: shift_assignment, filter: "employee == user.name && published && work_date >= today() && days_between(today(), work_date) <= 6", columns: [work_date, shift_label, outlet], sort: work_date, limit: 7, span: 12, if: "app_installed('shifts')"}
|
|
18
|
+
- {name: kasbon_left, type: number, label: {id: Sisa kasbon}, model: cash_advance_balance, aggregate: sum, field: remaining, filter: "employee == user.name && !cancelled", compact: true, span: 6, good_when: down}
|
|
19
|
+
- {name: claims_due, type: number, label: {id: Klaim menunggu dibayar}, model: claim_settlement, aggregate: sum, field: amount, filter: "employee == user.name && !paid && !cancelled", compact: true, span: 6}
|
|
20
|
+
- {name: attendance, type: list, empty: {id: 'Belum ada absen di periode ini.'}, label: {id: Absen terakhir}, model: staff_attendance, filter: "employee == user.name && docstatus != 2", period: work_date, columns: [work_date, status], sort: -work_date, limit: 7, span: 12}
|
|
@@ -26,6 +26,9 @@ runs) and `reimbursement`. Install `absen_karyawan` next to it for the clock scr
|
|
|
26
26
|
6. Expense claims: staff claim with a receipt photo (screen `klaim_biaya`); the outlet supervisor or head office
|
|
27
27
|
approves; finance pays it from cash or bank (`claim_payment`) or it rides on the next slip as `reimbursement`,
|
|
28
28
|
outside the taxable gross. docs/reimbursement.md.
|
|
29
|
+
7. Every employee, whatever their role, opens dashboard `saya` from the phone (or the "Slip gaji" shortcut of the
|
|
30
|
+
installed app): their own payslips, attendance, kasbon, claims and coming shifts (member grants, rangka-os contract
|
|
31
|
+
0074). A slip shows there once released: submitted, and its run closed or its pay date reached.
|
|
29
32
|
|
|
30
33
|
## First day (first-day.json)
|
|
31
34
|
|
|
@@ -32,7 +32,7 @@ specific to the cashier.
|
|
|
32
32
|
|
|
33
33
|
## In the studio interview: when the cashier goes on the map
|
|
34
34
|
|
|
35
|
-
For
|
|
35
|
+
For Zafdoz's consultant interview (`rangka-consult`, contract 0042). The deciding fact is the tools the owner uses
|
|
36
36
|
today and whether Juragan replaces them:
|
|
37
37
|
|
|
38
38
|
- A business that serves buyers at a counter (kedai, kafe, restoran, toko) and has **no cashier app yet**, or chose
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/app.json
|
|
2
|
+
name: pesanan_whatsapp
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
title: {id: Pesanan dari WhatsApp, en: WhatsApp orders}
|
|
5
|
+
label: {id: Rangka Pesanan WhatsApp, en: Rangka WhatsApp Orders}
|
|
6
|
+
summary:
|
|
7
|
+
id: Chat pesanan di WhatsApp jadi draf berharga dari data barang; staf konfirmasi sekali ketuk dan pelanggan dibalas totalnya.
|
|
8
|
+
category: sales
|
|
9
|
+
icon: chat-check-line
|
|
10
|
+
rangka: '>=0.5'
|
|
11
|
+
# A piece on top of kasir (module whatsapp_order, its doc has the rules): the work screen pesanan_wa for the cashier and
|
|
12
|
+
# head office, the orders and the messages they came from in the menu. Needs the WhatsApp service from Rangka Cloud
|
|
13
|
+
# (connector rangka_whatsapp on the site), which reads the text into lines; prices always come from the item records.
|
|
14
|
+
modules:
|
|
15
|
+
users: ^1.2
|
|
16
|
+
contacts: ^1.3
|
|
17
|
+
catalogue: ^1.3
|
|
18
|
+
outlets: ^1.8
|
|
19
|
+
pos: ^1.3
|
|
20
|
+
whatsapp: ^1.1
|
|
21
|
+
whatsapp_order: ^1.0
|
|
22
|
+
roles: [cashier, head_office]
|
|
23
|
+
home: {model: whatsapp_order}
|
|
24
|
+
work:
|
|
25
|
+
- {screen: pesanan_wa, roles: [cashier, head_office]}
|
|
26
|
+
menu:
|
|
27
|
+
- group: {id: Pesanan WhatsApp}
|
|
28
|
+
items: [whatsapp_order, whatsapp_inbound, whatsapp_message]
|
|
@@ -34,7 +34,7 @@ menu:
|
|
|
34
34
|
- group: {id: Resep dan tarif}
|
|
35
35
|
items: [bom, production_stage, worker]
|
|
36
36
|
- group: {id: Stok}
|
|
37
|
-
items: [stock_balance, stock_move, stock_request, stock_transfer, stock_transfer_receipt, stock_count, stock_adjustment]
|
|
37
|
+
items: [stock_balance, stock_lot_balance, stock_expiry, serial_no, stock_move, stock_request, stock_transfer, stock_transfer_receipt, stock_count, stock_adjustment]
|
|
38
38
|
- group: {id: Pembelian}
|
|
39
39
|
items: [purchase_order, goods_receipt, vendor_bill, payment]
|
|
40
40
|
- group: {id: Pembukuan}
|
|
@@ -36,7 +36,7 @@ menu:
|
|
|
36
36
|
- group: {id: Penjualan toko}
|
|
37
37
|
items: [outlet_sales, outlet_takings, pos_refund, outlet_return, moka_sale_line, moka_transaction]
|
|
38
38
|
- group: {id: Stok}
|
|
39
|
-
items: [stock_balance, stock_move, stock_request, stock_transfer, stock_transfer_receipt, stock_count, stock_adjustment]
|
|
39
|
+
items: [stock_balance, stock_lot_balance, stock_expiry, stock_move, stock_request, stock_transfer, stock_transfer_receipt, stock_count, stock_adjustment]
|
|
40
40
|
- group: {id: Pembelian}
|
|
41
41
|
items: [purchase_request, purchase_order, goods_receipt, vendor_bill, payment]
|
|
42
42
|
- group: {id: Bank}
|
|
@@ -109,6 +109,22 @@ widgets:
|
|
|
109
109
|
period: date
|
|
110
110
|
sort: -value
|
|
111
111
|
span: 6
|
|
112
|
+
# Terlaris per produk: the sizes and flavours of one product count together (hidden variant_group of the stock move);
|
|
113
|
+
# an item without a group is not in this chart (see Terlaris per barang). Cancelled sales and returns net out.
|
|
114
|
+
- name: best_sellers_by_product
|
|
115
|
+
type: chart
|
|
116
|
+
chart: bar
|
|
117
|
+
label: {id: Terlaris per produk}
|
|
118
|
+
description: {id: 'Jumlah terjual per produk; semua varian satu produk dihitung bersama'}
|
|
119
|
+
model: stock_move
|
|
120
|
+
group_by: variant_group
|
|
121
|
+
aggregate: sum
|
|
122
|
+
field: sold_qty
|
|
123
|
+
filter: "(voucher_type == 'outlet_sales' || voucher_type == 'outlet_return') && variant_group != ''"
|
|
124
|
+
period: posting_date
|
|
125
|
+
sort: -value
|
|
126
|
+
limit: 10
|
|
127
|
+
span: 6
|
|
112
128
|
- name: net_by_day
|
|
113
129
|
type: chart
|
|
114
130
|
chart: line
|
|
@@ -96,6 +96,19 @@ widgets:
|
|
|
96
96
|
limit: 20
|
|
97
97
|
columns: [outlet, item, qty, value]
|
|
98
98
|
span: 12
|
|
99
|
+
- name: stock_by_product
|
|
100
|
+
type: chart
|
|
101
|
+
chart: bar
|
|
102
|
+
label: {id: Stok per produk}
|
|
103
|
+
description: {id: 'Jumlah stok semua varian satu produk (ukuran, rasa) dijumlahkan'}
|
|
104
|
+
model: stock_balance
|
|
105
|
+
group_by: variant_group
|
|
106
|
+
aggregate: sum
|
|
107
|
+
field: qty
|
|
108
|
+
filter: "qty > 0 && variant_group != ''"
|
|
109
|
+
sort: -value
|
|
110
|
+
limit: 10
|
|
111
|
+
span: 6
|
|
99
112
|
- name: stock_value_by_outlet
|
|
100
113
|
type: chart
|
|
101
114
|
chart: bar
|
|
@@ -10,15 +10,15 @@ Read `rangka-compose` first. This draft only adds the first day.
|
|
|
10
10
|
|
|
11
11
|
## First day (first-day.json)
|
|
12
12
|
|
|
13
|
-
`first-day.json` next to this file is read by Rangka Cloud after the build (proposal "First day with
|
|
13
|
+
`first-day.json` next to this file is read by Rangka Cloud after the build (proposal "First day with Zafdoz", draft for rangka-os):
|
|
14
14
|
|
|
15
15
|
- `steps`: 3-5 steps in the order a rental business starts. A step is done when the kernel has at least `done.min`
|
|
16
16
|
records of `done.model`; a step without `done` is ticked by the owner.
|
|
17
|
-
- `seed`: what
|
|
17
|
+
- `seed`: what Zafdoz may prepare from the interview. Only values the owner said, each with the owner's quote (engine
|
|
18
18
|
`/v1/seed` drops the rest). Money fields are marked `money` and shown separately; nothing is written before the
|
|
19
19
|
owner agrees.
|
|
20
20
|
- `rename`: model labels that follow the owner's own word for what they rent (`{Word}` capitalised, `{word}` lower),
|
|
21
21
|
proposed as one low-risk change set of label overlays.
|
|
22
|
-
- `menu`: one sentence per menu item, said by
|
|
22
|
+
- `menu`: one sentence per menu item, said by Zafdoz when the owner first opens it.
|
|
23
23
|
|
|
24
24
|
Say these in the owner's words. Never invent units, plates, rates or fees the owner did not say.
|
|
@@ -34,7 +34,7 @@ What the kernel holds works for this business only and is not Meta's:
|
|
|
34
34
|
|
|
35
35
|
`send_template {to, template, type, components, idempotency_key}` → `{message_id, status}`.
|
|
36
36
|
|
|
37
|
-
- `type` is the business's message type: `receipt`, `reminder`, `order_ready`, `appointment`. Each can be switched off
|
|
37
|
+
- `type` is the business's message type: `receipt`, `reminder`, `order_ready`, `appointment`, `order_reply`. Each can be switched off
|
|
38
38
|
on its own.
|
|
39
39
|
- `components` is one body component with text parameters, in the template's order. The host rebuilds what goes to
|
|
40
40
|
Meta from them; a header, a button or media is refused.
|
|
@@ -74,7 +74,7 @@ Every event is one JSON object, signed over the raw body: `X-Rangka-Signature: s
|
|
|
74
74
|
| Trigger | Fields | When |
|
|
75
75
|
| --- | --- | --- |
|
|
76
76
|
| `message_status` | `message_id`, `idempotency_key`, `type`, `status` (`sent`, `delivered`, `read`, `failed`), `at`, `error` | Meta reported a status, or the host refused a send (`failed`, `message_id` empty, the code in `error`) |
|
|
77
|
-
| `message_received` | `message_id`, `from`, `text`, `profile_name`, `at` | a customer wrote to the number (it only sends in phase 1) |
|
|
77
|
+
| `message_received` | `message_id`, `from`, `text`, `kind`, `profile_name`, `at`, `lines`, `notes`, `order_signal` | a customer wrote to the number (it only sends in phase 1). The host reads a text as an order (deterministic, no catalogue): `lines` are `{qty, qty_given, unit, name, note, text}` with `name` lower-case ASCII words, `notes` the pick-up, delivery or time remarks, `order_signal` true when it reads as an order (an order word, a quantity, or a list of two or more). rangka-apps module `whatsapp_order` matches the lines against the business's items |
|
|
78
78
|
| `opted_out` | `phone`, `at`, `source` (`keyword`, `meta`, `staff`) | a customer replied `BERHENTI` or `STOP`, or Meta reported a block |
|
|
79
79
|
|
|
80
80
|
A status never carries the phone: the flow finds its document by `idempotency_key`.
|
|
@@ -92,6 +92,7 @@ language `id`, and end with *Balas BERHENTI untuk berhenti menerima pesan.*
|
|
|
92
92
|
| `terima_kasih_lunas` | `reminder` | Halo {{1}}, terima kasih. Pembayaran faktur {{2}} sudah kami terima dan faktur ini sudah lunas. |
|
|
93
93
|
| `pesanan_siap` | `order_ready` | Halo {{1}}, pesanan {{2}} di {{3}} sudah siap diambil. Sebutkan nomor pesanan saat mengambil. Terima kasih. |
|
|
94
94
|
| `pengingat_janji` | `appointment` | Halo {{1}}, kami mengingatkan {{2}} di {{3}} pada {{4}}. Kalau perlu mengubah jadwal, hubungi kami sebelum waktunya. Terima kasih. |
|
|
95
|
+
| `pesanan_diterima` | `order_reply` | Halo {{1}}, pesanan {{2}} di {{3}} sudah kami terima: {{4}}. Total {{5}}. Terima kasih. |
|
|
95
96
|
|
|
96
97
|
## Local mock
|
|
97
98
|
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
name: rangka_whatsapp
|
|
13
13
|
label: {id: WhatsApp dari Rangka Cloud, en: WhatsApp from Rangka Cloud}
|
|
14
14
|
summary:
|
|
15
|
-
id: Kirim struk, pengingat
|
|
15
|
+
id: Kirim struk, pengingat dan kabar pesanan, dan terima pesanan pelanggan, lewat nomor WhatsApp bisnismu dari Rangka Cloud.
|
|
16
16
|
en: Send receipts, payment reminders and order updates to customers from the WhatsApp number Rangka Cloud provides for your business.
|
|
17
17
|
category: messaging
|
|
18
18
|
icon: send-plane-line
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.2.0
|
|
20
20
|
vendor: Rangka Cloud
|
|
21
21
|
docs: https://github.com/rangka-os/rangka-connectors/blob/main/rangka_whatsapp/README.md
|
|
22
22
|
# The host's public service address. A placeholder under the reserved .example domain until Rangka Cloud has one:
|
|
@@ -55,7 +55,11 @@ triggers:
|
|
|
55
55
|
status: status
|
|
56
56
|
at: at
|
|
57
57
|
error: error
|
|
58
|
-
# A customer wrote to the number. The number only sends (phase 1), so this is for the business to see.
|
|
58
|
+
# A customer wrote to the number. The number only sends (phase 1), so this is for the business to see. The host
|
|
59
|
+
# also reads a text as an order (Rangka Cloud internal/whatsapp/orderparse, deterministic, no catalogue): `lines`
|
|
60
|
+
# [{qty, qty_given, unit, name, note, text}], `notes` (pick-up, delivery, time) and `order_signal` (an order word,
|
|
61
|
+
# a quantity or a list). rangka-apps module whatsapp_order matches the lines against the business's own items;
|
|
62
|
+
# `kind` is Meta's message type (text, image, …; a non-text message has no text and no lines).
|
|
59
63
|
- name: message_received
|
|
60
64
|
label: {id: Pesan masuk, en: Incoming message}
|
|
61
65
|
via: webhook
|
|
@@ -69,8 +73,12 @@ triggers:
|
|
|
69
73
|
message_id: message_id
|
|
70
74
|
from: from
|
|
71
75
|
text: text
|
|
76
|
+
kind: kind
|
|
72
77
|
profile_name: profile_name
|
|
73
78
|
at: at
|
|
79
|
+
lines: lines
|
|
80
|
+
notes: notes
|
|
81
|
+
order_signal: order_signal
|
|
74
82
|
# A customer asked to stop (they replied BERHENTI or STOP, or Meta reported a block). The host already refuses
|
|
75
83
|
# sends to them; the flow marks the customer so staff see it.
|
|
76
84
|
- name: opted_out
|
|
@@ -102,7 +110,7 @@ actions:
|
|
|
102
110
|
input:
|
|
103
111
|
- {name: to, type: phone, required: true}
|
|
104
112
|
- {name: template, type: data, required: true}
|
|
105
|
-
# receipt | reminder | order_ready | appointment: which of the business's message types this is
|
|
113
|
+
# receipt | reminder | order_ready | appointment | order_reply: which of the business's message types this is
|
|
106
114
|
- {name: type, type: data, required: true}
|
|
107
115
|
- {name: components, type: json}
|
|
108
116
|
# <document>:<type>:<step>, e.g. STRK-KPI-2611-00142:receipt:1. The same key is sent once, by the kernel
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"message_status.json": {"message_id": "wam_contoh0001", "idempotency_key": "STRK-KPI-2611-00142:receipt:1", "type": "receipt", "status": "read", "error": ""},
|
|
3
3
|
"message_status_refused.json": {"message_id": "", "idempotency_key": "INV-2026-00031:reminder:7", "status": "failed", "error": "recipient_opted_out"},
|
|
4
|
-
"message_received.json": {"from": "+6281200000001", "text": "Terima kasih", "profile_name": "Pelanggan Contoh"},
|
|
4
|
+
"message_received.json": {"from": "+6281200000001", "text": "Terima kasih", "profile_name": "Pelanggan Contoh", "kind": "text", "order_signal": false},
|
|
5
5
|
"opted_out.json": {"phone": "+6281200000001", "source": "keyword"},
|
|
6
6
|
"send_template.json": {"message_id": "wam_contoh0001", "status": "accepted"},
|
|
7
7
|
"send_template_duplicate.json": {"message_id": "wam_contoh0001", "status": "delivered"},
|
|
8
|
-
"set_opt_out.json": {"status": "recorded"}
|
|
8
|
+
"set_opt_out.json": {"status": "recorded"},
|
|
9
|
+
"message_received_order.json": {"from": "+6281200000001", "order_signal": true, "notes": ["ambil jam 3"]}
|
|
9
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"message_id": "wamid.CONTOH0002", "from": "+6281200000001", "text": "Terima kasih", "profile_name": "Pelanggan Contoh", "at": "2026-11-19T03:05:00Z"}
|
|
1
|
+
{"message_id": "wamid.CONTOH0002", "from": "+6281200000001", "text": "Terima kasih", "kind": "text", "profile_name": "Pelanggan Contoh", "at": "2026-11-19T03:05:00Z", "lines": [], "notes": [], "order_signal": false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"message_id": "wamid.CONTOH0003", "from": "+6281200000001", "text": "pesan 2 kopi susu, 1 roti bakar coklat, ambil jam 3", "kind": "text", "profile_name": "Pelanggan Contoh", "at": "2026-11-19T03:06:00Z", "lines": [{"qty": 2, "qty_given": true, "unit": "", "name": "kopi susu", "note": "", "text": "pesan 2 kopi susu"}, {"qty": 1, "qty_given": true, "unit": "", "name": "roti bakar coklat", "note": "", "text": "1 roti bakar coklat"}], "notes": ["ambil jam 3"], "order_signal": true}
|
|
@@ -18,8 +18,10 @@ Stdlib only. The request, answer and event shapes follow connector.rk and README
|
|
|
18
18
|
- POST /svc/whatsapp/v1/opt-outs (Bearer token) {phone}: 200 {status: recorded | already}.
|
|
19
19
|
- POST /simulate/status {message_id | idempotency_key, status, error}: the message's status changes (sent, delivered,
|
|
20
20
|
read, failed) and the mock posts the message_status event to --hook-url/message_status, signed.
|
|
21
|
-
- POST /simulate/inbound {from, text}: a customer writes. BERHENTI or STOP opts them out
|
|
22
|
-
else posts message_received.
|
|
21
|
+
- POST /simulate/inbound {from, text[, lines, notes, order_signal]}: a customer writes. BERHENTI or STOP opts them out
|
|
22
|
+
and posts opted_out; anything else posts message_received. The host reads a text as an order with its own parser
|
|
23
|
+
(Rangka Cloud internal/whatsapp/orderparse); this mock has none, so a test passes the lines it wants the kernel to
|
|
24
|
+
hear (none by default).
|
|
23
25
|
- POST /simulate/redeliver[?key=<other>]: posts the last event again (the host retries an event that got no 2xx),
|
|
24
26
|
optionally signed with another key, to test the receiver's dedupe and its signature check.
|
|
25
27
|
- POST /simulate/service {state: active | stopped | paused}, POST /simulate/template {name, approved: true | false},
|
|
@@ -54,8 +56,9 @@ TEMPLATES = {
|
|
|
54
56
|
"terima_kasih_lunas": ("reminder", 2),
|
|
55
57
|
"pesanan_siap": ("order_ready", 3),
|
|
56
58
|
"pengingat_janji": ("appointment", 4),
|
|
59
|
+
"pesanan_diterima": ("order_reply", 5),
|
|
57
60
|
}
|
|
58
|
-
TYPES = {"receipt", "reminder", "order_ready", "appointment"}
|
|
61
|
+
TYPES = {"receipt", "reminder", "order_ready", "appointment", "order_reply"}
|
|
59
62
|
STOP_WORDS = {"BERHENTI", "STOP"}
|
|
60
63
|
KEY_RE = re.compile(r"^[A-Za-z0-9._:/-]{1,200}$")
|
|
61
64
|
SIGNATURE_HEADER = "X-Rangka-Signature"
|
|
@@ -299,7 +302,9 @@ def handler(state: State):
|
|
|
299
302
|
code = deliver(state, "opted_out", {"phone": phone, "at": now_iso(), "source": "keyword"})
|
|
300
303
|
else:
|
|
301
304
|
code = deliver(state, "message_received", {"message_id": "wamid.IN" + uuid.uuid4().hex[:12], "from": phone, "text": text,
|
|
302
|
-
"profile_name": str(b.get("profile_name") or "Pelanggan Contoh"),
|
|
305
|
+
"kind": "text", "profile_name": str(b.get("profile_name") or "Pelanggan Contoh"),
|
|
306
|
+
"at": now_iso(), "lines": b.get("lines") or [], "notes": b.get("notes") or [],
|
|
307
|
+
"order_signal": bool(b.get("order_signal"))})
|
|
303
308
|
return self._json(200, {"hook_status": code})
|
|
304
309
|
if what == "redeliver":
|
|
305
310
|
with state.lock:
|
|
@@ -15,10 +15,8 @@ permissions:
|
|
|
15
15
|
# Finance reads every summary: payroll_run_fill runs as the person ticking "Isi slip dari absen" and fills the payslips
|
|
16
16
|
# from them (rangka-apps#101 slice b). Read only: days, lateness and overtime, no position or selfie (staff_attendance).
|
|
17
17
|
- {role: finance_manager, read: true}
|
|
18
|
-
# Staff read their own.
|
|
19
|
-
- {role:
|
|
20
|
-
- {role: outlet_staff, read: true, if: "employee == user.name"}
|
|
21
|
-
- {role: employee, read: true, if: "employee == user.name"}
|
|
18
|
+
# Staff read their own: every employee whatever their role (member grant, rangka-os contract 0074).
|
|
19
|
+
- {role: member, read: true, if: "employee == user.name"}
|
|
22
20
|
fields:
|
|
23
21
|
- {name: attendance_period, type: link, to: attendance_period, label: {id: Rekap absen}, read_only: true, in_list: true}
|
|
24
22
|
- {name: employee, type: link, to: user, label: {id: Karyawan}, read_only: true}
|
|
@@ -30,6 +30,9 @@ permissions:
|
|
|
30
30
|
- {role: cashier, read: true, create: true, write: true, submit: true, if: "employee == user.name"}
|
|
31
31
|
- {role: outlet_staff, read: true, create: true, write: true, submit: true, if: "employee == user.name"}
|
|
32
32
|
- {role: employee, read: true, create: true, write: true, submit: true, if: "employee == user.name"}
|
|
33
|
+
# Every employee whatever their role reads their own logs (member grant, rangka-os contract 0074). Clocking in stays
|
|
34
|
+
# with the roles above: its flows create guard records those roles are granted.
|
|
35
|
+
- {role: member, read: true, if: "employee == user.name"}
|
|
33
36
|
# The outlet supervisor reads and prints the logs of their outlets and decides the held submits; they clock in too.
|
|
34
37
|
- {role: outlet_supervisor, read: true, print: true}
|
|
35
38
|
- {role: outlet_supervisor, create: true, write: true, submit: true, if: "employee == user.name"}
|
|
@@ -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: attendance
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.2.0
|
|
4
4
|
title: {id: Absen karyawan, en: Staff attendance}
|
|
5
5
|
summary:
|
|
6
6
|
id: Absen masuk dan pulang dari HP di outlet, dengan lokasi GPS dan selfie, terlambat dan lembur, rekap bulanan per karyawan.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Default units (contract 0076): filled into a business's empty Satuan table when the catalogue module is installed,
|
|
2
|
+
# so its first item can be saved. A business that already has a unit gets none of these. Coretax codes only where
|
|
3
|
+
# the model's help names them; the rest stay empty (UM.0033 Lainnya).
|
|
4
|
+
uom:
|
|
5
|
+
- {uom_name: Unit, coretax_unit: UM.0018}
|
|
6
|
+
- {uom_name: Pcs}
|
|
7
|
+
- {uom_name: Buah}
|
|
8
|
+
- {uom_name: Set}
|
|
9
|
+
- {uom_name: Pak}
|
|
10
|
+
- {uom_name: Dus}
|
|
11
|
+
- {uom_name: Lusin}
|
|
12
|
+
- {uom_name: Kg, coretax_unit: UM.0003}
|
|
13
|
+
- {uom_name: Gram}
|
|
14
|
+
- {uom_name: Liter}
|
|
15
|
+
- {uom_name: Meter}
|
|
16
|
+
- {uom_name: Porsi}
|
|
17
|
+
- {uom_name: Jam, coretax_unit: UM.0027}
|
|
18
|
+
- {uom_name: Hari, coretax_unit: UM.0026}
|
|
19
|
+
- {uom_name: Bulan, coretax_unit: UM.0024}
|
|
@@ -48,6 +48,10 @@ fields:
|
|
|
48
48
|
type: data
|
|
49
49
|
label: {id: Varian}
|
|
50
50
|
help: {id: 'Misalnya "M / Hitam" atau "600 ml"'}
|
|
51
|
+
- name: variant_title
|
|
52
|
+
type: data
|
|
53
|
+
label: {id: Nama produk di kasir}
|
|
54
|
+
help: {id: 'Opsional. Nama yang tampil di kotak produk kasir; kalau kosong dipakai awalan nama barang yang sama'}
|
|
51
55
|
- name: kind
|
|
52
56
|
type: select
|
|
53
57
|
label: {id: Jenis}
|
|
@@ -94,6 +98,26 @@ fields:
|
|
|
94
98
|
type: int
|
|
95
99
|
label: {id: Umur simpan (hari)}
|
|
96
100
|
depends_on: app_installed('production')
|
|
101
|
+
# Lots and serials (module stock, rangka-os contract 0070): lot = quantity per batch number (FEFO on the way out),
|
|
102
|
+
# lot_expiry = lot plus an expiry date that goods receipts must give, serial = one serial number per unit. Empty or
|
|
103
|
+
# none moves stock as before. Switching it on for an item with stock puts that stock in the no-lot bucket.
|
|
104
|
+
- name: tracking
|
|
105
|
+
type: select
|
|
106
|
+
label: {id: Pelacakan stok, en: Stock tracking}
|
|
107
|
+
help: {id: 'Per lot untuk barang bernomor batch (obat, makanan, kosmetik). Per nomor seri untuk barang yang tiap unitnya bernomor (HP, mesin)'}
|
|
108
|
+
default: "'none'"
|
|
109
|
+
depends_on: app_installed('stock') && kind != 'service'
|
|
110
|
+
options:
|
|
111
|
+
- {value: none, label: {id: Tidak dilacak}}
|
|
112
|
+
- {value: lot, label: {id: Per lot}}
|
|
113
|
+
- {value: lot_expiry, label: {id: Per lot dengan tanggal kedaluwarsa}}
|
|
114
|
+
- {value: serial, label: {id: Per nomor seri}}
|
|
115
|
+
- name: expiry_warning_days
|
|
116
|
+
type: int
|
|
117
|
+
label: {id: Kabari sebelum kedaluwarsa (hari), en: Expiry warning (days)}
|
|
118
|
+
help: {id: 'Lot yang kedaluwarsa dalam jumlah hari ini masuk daftar Stok hampir kedaluwarsa. 0 = 30 hari'}
|
|
119
|
+
default: '30'
|
|
120
|
+
depends_on: app_installed('stock') && tracking == 'lot_expiry'
|
|
97
121
|
- name: standard_cost
|
|
98
122
|
type: currency
|
|
99
123
|
label: {id: Harga pokok standar}
|
|
@@ -200,6 +224,18 @@ fields:
|
|
|
200
224
|
in_list: true
|
|
201
225
|
in_filter: true
|
|
202
226
|
rules:
|
|
227
|
+
- name: variant_label_needs_group
|
|
228
|
+
on: save
|
|
229
|
+
check: "variant_group == '' || variant_label != ''"
|
|
230
|
+
message: {id: Isi nama varian (misalnya M / Hitam) untuk barang yang punya grup varian}
|
|
231
|
+
- name: variant_title_needs_group
|
|
232
|
+
on: save
|
|
233
|
+
check: "variant_title == '' || variant_group != ''"
|
|
234
|
+
message: {id: Nama produk di kasir hanya dipakai bersama grup varian}
|
|
235
|
+
- name: expiry_warning_not_negative
|
|
236
|
+
on: save
|
|
237
|
+
check: expiry_warning_days >= 0
|
|
238
|
+
message: {id: Hari peringatan kedaluwarsa tidak boleh negatif}
|
|
203
239
|
- name: reorder_not_negative
|
|
204
240
|
on: save
|
|
205
241
|
check: reorder_level >= 0 && reorder_qty >= 0
|
|
@@ -42,7 +42,9 @@ fields:
|
|
|
42
42
|
stock:
|
|
43
43
|
date: delivery_date
|
|
44
44
|
moves:
|
|
45
|
-
-
|
|
45
|
+
# rangka-os contract 0070 §5: a lot item leaves from the lot picked on the line, else earliest expiry first
|
|
46
|
+
# (FEFO), skipping expired lots; a serial item names the units that leave
|
|
47
|
+
- {lines: items, out: outlet, reason: delivery, cogs: cogs, lot: {pick: lot}, serials: serial_nos}
|
|
46
48
|
cogs_total: cogs_total
|
|
47
49
|
# Credit control at the door (module distribution): goods do not leave for a customer on hold, overdue, or whose open
|
|
48
50
|
# invoices + goods delivered and not yet invoiced + this delivery go over its limit, without the sales manager or
|
|
@@ -9,3 +9,7 @@ fields:
|
|
|
9
9
|
# the unit's name for the printed surat jalan (a print reads only top-level links)
|
|
10
10
|
- {name: uom_name, type: data, label: {id: Nama satuan}, hidden: true, compute: "uom != '' ? uom.uom_name : ''"}
|
|
11
11
|
- {name: cogs, type: currency, label: {id: Harga pokok}, read_only: true, hidden_for: [field_sales]}
|
|
12
|
+
# rangka-os contract 0070: the lot to send (empty = the lot that expires first, expired lots skipped) and, for a serial
|
|
13
|
+
# item, the serials that leave, one per line. The lots taken are on the stock moves of this note.
|
|
14
|
+
- {name: lot, type: link, to: stock_lot, label: {id: Lot}, depends_on: "item.tracking in ['lot', 'lot_expiry']", help: {id: 'Kosongkan: lot yang paling dulu kedaluwarsa dikirim'}}
|
|
15
|
+
- {name: serial_nos, type: text, label: {id: Nomor seri}, depends_on: "item.tracking == 'serial'", help: {id: 'Satu nomor seri per baris'}}
|
|
@@ -40,8 +40,8 @@ fields:
|
|
|
40
40
|
stock:
|
|
41
41
|
date: return_date
|
|
42
42
|
moves:
|
|
43
|
-
- {lines: items, in: outlet, if: "line.condition == 'good'", reason: return_in, cost: {source: delivery_note}}
|
|
44
|
-
- {lines: items, in: damaged_outlet, if: "line.condition == 'damaged'", reason: return_in, cost: {source: delivery_note}}
|
|
43
|
+
- {lines: items, in: outlet, if: "line.condition == 'good'", reason: return_in, cost: {source: delivery_note}, serials: serial_nos}
|
|
44
|
+
- {lines: items, in: damaged_outlet, if: "line.condition == 'damaged'", reason: return_in, cost: {source: delivery_note}, serials: serial_nos}
|
|
45
45
|
rules:
|
|
46
46
|
- name: qty_positive
|
|
47
47
|
on: save
|
|
@@ -14,3 +14,6 @@ fields:
|
|
|
14
14
|
options:
|
|
15
15
|
- {value: good, label: {id: Baik (bisa dijual lagi)}}
|
|
16
16
|
- {value: damaged, label: {id: Rusak}}
|
|
17
|
+
# rangka-os contract 0070: a lot item goes back into the lot its delivery note took (when that was one lot); a serial
|
|
18
|
+
# item names the units that came back, one per line
|
|
19
|
+
- {name: serial_nos, type: text, label: {id: Nomor seri}, depends_on: "item.tracking == 'serial'", help: {id: 'Satu nomor seri per baris'}}
|
|
@@ -5,12 +5,12 @@
|
|
|
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.
|
|
8
|
+
version: 1.2.0
|
|
9
9
|
title: {id: Pengiriman dan retur, en: Delivery and returns}
|
|
10
10
|
summary:
|
|
11
11
|
id: Surat jalan, pemenuhan pesanan dan retur penjualan.
|
|
12
12
|
en: Delivery notes, order fulfilment and sales returns.
|
|
13
13
|
category: operations
|
|
14
14
|
icon: truck-line
|
|
15
|
-
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.
|
|
15
|
+
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.6, outlets: ^1.0, stock: ^1.6, orders: ^1.0, invoicing: ^1.0, payments: ^1.0}
|
|
16
16
|
hooks: [stock.reverse_moves]
|
|
@@ -126,6 +126,15 @@ fields:
|
|
|
126
126
|
label: {id: Modal kas kasir}
|
|
127
127
|
help: {id: 'Uang kembalian di laci tiap sesi kasir dibuka. Kosongkan kalau kasir yang mengisi'}
|
|
128
128
|
depends_on: app_installed('pos') && (location_type == '' || location_type == 'store' || location_type == 'vehicle')
|
|
129
|
+
# module whatsapp_order: the store that takes the orders customers write on WhatsApp (their drafts get this outlet,
|
|
130
|
+
# so its cashiers see and confirm them). With none ticked, a business with one store uses it; with several and none
|
|
131
|
+
# ticked, head office sets the outlet on each order.
|
|
132
|
+
- name: wa_orders
|
|
133
|
+
type: check
|
|
134
|
+
label: {id: Terima pesanan WhatsApp}
|
|
135
|
+
help: {id: 'Pesanan yang ditulis pelanggan di WhatsApp masuk ke outlet ini'}
|
|
136
|
+
default: 'false'
|
|
137
|
+
depends_on: app_installed('whatsapp_order') && (location_type == '' || location_type == 'store')
|
|
129
138
|
# module attendance (staff clock-in per outlet): the outlet's point and radius are the geofence of the clock screen
|
|
130
139
|
# (screens/absen_outlet.rk), and the default hours are the schedule lateness is measured against when the employee has
|
|
131
140
|
# no shift. Decimal degrees, as a phone's GPS or a map gives them (Bandung is about -6.9, 107.6).
|
|
@@ -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: outlets
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.8.0
|
|
4
4
|
title: {id: Outlet dan gudang, en: Outlets and warehouses}
|
|
5
5
|
summary:
|
|
6
6
|
id: Daftar cabang, gudang, dan lokasi stok usaha kamu.
|