@rangka-os/create 0.5.0-alpha.26 → 0.5.0-alpha.28
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 +37 -0
- package/template/base/apps/absen_karyawan/dashboards/absen_hari_ini.rk +20 -0
- package/template/base/apps/absen_karyawan/dashboards/absen_karyawan_saya.rk +14 -0
- package/template/base/apps/absen_karyawan/dashboards/rekap_absen_karyawan.rk +12 -0
- package/template/base/apps/jasa_proyek/app.rk +1 -1
- package/template/base/apps/kasir/app.rk +5 -1
- package/template/base/apps/kasir/dashboards/kasir_ringkas.rk +4 -0
- package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +20 -0
- package/template/base/connectors/email/connector.rk +144 -0
- package/template/base/connectors/email/fixtures/email_received.json +33 -0
- package/template/base/connectors/email/fixtures/email_received_reply.json +31 -0
- package/template/base/connectors/email/fixtures/expect.json +20 -0
- package/template/base/connectors/email/fixtures/fetch_email.json +66 -0
- package/template/base/connectors/email/fixtures/send_email.json +4 -0
- package/template/base/connectors/midtrans/connector.rk +249 -0
- package/template/base/connectors/midtrans/fixtures/charge_gopay.json +34 -0
- package/template/base/connectors/midtrans/fixtures/charge_qris.json +23 -0
- package/template/base/connectors/midtrans/fixtures/charge_va.json +20 -0
- package/template/base/connectors/midtrans/fixtures/create_snap.json +4 -0
- package/template/base/connectors/midtrans/fixtures/expect.json +88 -0
- package/template/base/connectors/midtrans/fixtures/get_status.json +15 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified.json +28 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_challenge.json +24 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_expire.json +24 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_other_amount.json +28 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_partial_refund.json +34 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_pending.json +31 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_refund.json +34 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_relabelled.json +28 -0
- package/template/base/connectors/midtrans/fixtures/payment_notified_va.json +32 -0
- package/template/base/connectors/midtrans/fixtures/signature_vector.txt +3 -0
- package/template/base/connectors/midtrans/mock/midtrans_mock.py +335 -0
- package/template/base/connectors/rangka_whatsapp/README.md +105 -0
- package/template/base/connectors/rangka_whatsapp/connector.rk +141 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/expect.json +9 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/message_received.json +1 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/message_status.json +1 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/message_status_refused.json +1 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/opted_out.json +1 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/send_template.json +1 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/send_template_duplicate.json +1 -0
- package/template/base/connectors/rangka_whatsapp/fixtures/set_opt_out.json +1 -0
- package/template/base/connectors/rangka_whatsapp/mock/rangka_whatsapp_mock.py +354 -0
- package/template/base/connectors/shopee/connector.rk +360 -0
- package/template/base/connectors/shopee/fixtures/expect.json +119 -0
- package/template/base/connectors/shopee/fixtures/get_models.json +52 -0
- package/template/base/connectors/shopee/fixtures/get_order_detail.json +396 -0
- package/template/base/connectors/shopee/fixtures/get_settlement.json +90 -0
- package/template/base/connectors/shopee/fixtures/get_tracking.json +13 -0
- package/template/base/connectors/shopee/fixtures/list_items.json +29 -0
- package/template/base/connectors/shopee/fixtures/list_orders.json +31 -0
- package/template/base/connectors/shopee/fixtures/list_settlements.json +15 -0
- package/template/base/connectors/shopee/fixtures/order_changed.json +101 -0
- package/template/base/connectors/shopee/fixtures/order_changed_cancelled.json +72 -0
- package/template/base/connectors/shopee/fixtures/order_changed_completed.json +101 -0
- package/template/base/connectors/shopee/fixtures/order_changed_in_cancel.json +72 -0
- package/template/base/connectors/shopee/fixtures/order_changed_unpaid.json +71 -0
- package/template/base/connectors/shopee/fixtures/order_settled.json +92 -0
- package/template/base/connectors/shopee/fixtures/push_received.json +12 -0
- package/template/base/connectors/shopee/fixtures/push_received_tracking.json +11 -0
- package/template/base/connectors/shopee/fixtures/update_stock.json +15 -0
- package/template/base/connectors/shopee/mock/shopee_mock.py +894 -0
- package/template/base/connectors/tiktok_shop/connector.rk +300 -0
- package/template/base/connectors/tiktok_shop/fixtures/expect.json +105 -0
- package/template/base/connectors/tiktok_shop/fixtures/get_order_detail.json +136 -0
- package/template/base/connectors/tiktok_shop/fixtures/get_settlement.json +83 -0
- package/template/base/connectors/tiktok_shop/fixtures/get_tracking.json +28 -0
- package/template/base/connectors/tiktok_shop/fixtures/list_orders.json +242 -0
- package/template/base/connectors/tiktok_shop/fixtures/list_products.json +77 -0
- package/template/base/connectors/tiktok_shop/fixtures/list_settlements.json +22 -0
- package/template/base/connectors/tiktok_shop/fixtures/list_shops.json +17 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_changed.json +129 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_changed_cancelled.json +81 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_changed_completed.json +106 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_changed_on_hold.json +104 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_changed_tokopedia.json +106 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_changed_unpaid.json +79 -0
- package/template/base/connectors/tiktok_shop/fixtures/order_settled.json +73 -0
- package/template/base/connectors/tiktok_shop/fixtures/update_stock.json +6 -0
- package/template/base/connectors/tiktok_shop/fixtures/webhook_received.json +12 -0
- package/template/base/connectors/tiktok_shop/fixtures/webhook_received_cancellation.json +13 -0
- package/template/base/connectors/tiktok_shop/mock/tiktok_shop_mock.py +819 -0
- package/template/base/connectors/whatsapp_business/connector.rk +3 -1
- package/template/base/connectors/whatsapp_business/templates.md +13 -1
- package/template/base/modules/attendance/flows/attendance_missing_digest.rk +30 -0
- package/template/base/modules/attendance/flows/attendance_period_on_cancel.rk +15 -0
- package/template/base/modules/attendance/flows/attendance_period_on_submit.rk +60 -0
- package/template/base/modules/attendance/flows/staff_attendance_cancel_guard.rk +14 -0
- package/template/base/modules/attendance/flows/staff_attendance_guard_created.rk +16 -0
- package/template/base/modules/attendance/flows/staff_attendance_guard_submitted.rk +37 -0
- package/template/base/modules/attendance/flows/staff_attendance_guard_updated.rk +14 -0
- package/template/base/modules/attendance/models/attendance_period.rk +62 -0
- package/template/base/modules/attendance/models/attendance_summary.rk +37 -0
- package/template/base/modules/attendance/models/staff_attendance.rk +281 -0
- package/template/base/modules/attendance/models/staff_attendance_guard.rk +50 -0
- package/template/base/modules/attendance/module.rk +18 -0
- package/template/base/modules/attendance/screens/absen_outlet.rk +22 -0
- package/template/base/modules/catalogue/models/item.rk +69 -0
- package/template/base/modules/catalogue/module.rk +1 -1
- package/template/base/modules/contacts/models/customer.rk +43 -19
- package/template/base/modules/contacts/module.rk +1 -1
- package/template/base/modules/coretax/module.rk +1 -1
- package/template/base/modules/coretax/print/coretax_faktur.rk +3 -2
- package/template/base/modules/coretax/print/coretax_faktur.xml +3 -1
- package/template/base/modules/coretax/print/rekap_ppn.html +9 -7
- package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +15 -0
- package/template/base/modules/courses/module.rk +1 -1
- package/template/base/modules/courses/screens/absen_kelas.rk +1 -0
- package/template/base/modules/invoicing/flows/invoice_due_digest.rk +45 -7
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +4 -1
- package/template/base/modules/invoicing/module.rk +15 -2
- package/template/base/modules/kitchen/screens/dapur.rk +1 -0
- package/template/base/modules/outlets/models/outlet.rk +69 -0
- package/template/base/modules/outlets/module.rk +1 -1
- package/template/base/modules/payments/flows/payment_from_midtrans.rk +85 -0
- package/template/base/modules/payments/flows/payment_refund_from_midtrans.rk +22 -0
- package/template/base/modules/payments/models/payment.rk +2 -1
- package/template/base/modules/payments/module.rk +1 -1
- package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +8 -5
- package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +8 -5
- package/template/base/modules/payroll/flows/payroll_reminder.rk +106 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +5 -3
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +5 -3
- package/template/base/modules/payroll/flows/payslip_from_recap.rk +1 -1
- package/template/base/modules/payroll/imports/payroll_profile_list.rk +27 -0
- package/template/base/modules/payroll/models/payroll_close.rk +10 -6
- package/template/base/modules/payroll/models/payroll_run.rk +64 -15
- package/template/base/modules/payroll/models/payslip.rk +48 -9
- package/template/base/modules/payroll/module.rk +22 -5
- package/template/base/modules/payroll/print/payslip.html +4 -1
- package/template/base/modules/pos/models/pos_sale.rk +136 -9
- package/template/base/modules/pos/models/pos_sale_item.rk +33 -1
- package/template/base/modules/pos/module.rk +5 -3
- package/template/base/modules/pos/print/pos_receipt.html +7 -3
- package/template/base/modules/pos/screens/kasir.rk +7 -2
- package/template/base/modules/procurement/flows/reorder_draft_po.rk +57 -0
- package/template/base/modules/procurement/models/vendor_bill.rk +14 -1
- package/template/base/modules/procurement/module.rk +11 -2
- package/template/base/modules/projects/screens/absen.rk +1 -0
- package/template/base/modules/promotions/flows/promo_code_batch_on_submit.rk +26 -0
- package/template/base/modules/promotions/flows/promotion_apply.rk +110 -0
- package/template/base/modules/promotions/flows/promotion_apply_on_create.rk +110 -0
- package/template/base/modules/promotions/flows/promotion_apply_on_delete.rk +111 -0
- package/template/base/modules/promotions/flows/promotion_apply_on_update.rk +110 -0
- package/template/base/modules/promotions/flows/promotion_on_sale.rk +95 -0
- package/template/base/modules/promotions/flows/promotion_on_sale_cancel.rk +43 -0
- package/template/base/modules/promotions/models/promo_code.rk +27 -0
- package/template/base/modules/promotions/models/promo_code_batch.rk +36 -0
- package/template/base/modules/promotions/models/promo_guard.rk +44 -0
- package/template/base/modules/promotions/models/promotion.rk +197 -0
- package/template/base/modules/promotions/models/promotion_ledger.rk +35 -0
- package/template/base/modules/promotions/module.rk +20 -0
- package/template/base/modules/rental/screens/alat_keluar.rk +1 -0
- package/template/base/modules/rental/screens/alat_kembali.rk +1 -0
- package/template/base/modules/rental/screens/jadwal_alat.rk +1 -0
- package/template/base/modules/stock/flows/stock_low_alert.rk +65 -0
- package/template/base/modules/stock/flows/stock_negative_alert.rk +14 -5
- package/template/base/modules/stock/models/stock_reorder.rk +34 -0
- package/template/base/modules/stock/module.rk +17 -2
- package/template/base/modules/subscriptions/screens/catat_tagih.rk +1 -0
- package/template/base/modules/subscriptions/screens/rute_tagih.rk +1 -0
- package/template/base/modules/users/flows/summary_daily.rk +83 -0
- package/template/base/modules/users/flows/summary_monthly.rk +83 -0
- package/template/base/modules/users/flows/summary_weekly.rk +83 -0
- package/template/base/modules/users/models/business_summary.rk +67 -0
- package/template/base/modules/users/models/summary_setting.rk +35 -0
- package/template/base/modules/users/models/user.rk +11 -3
- package/template/base/modules/users/module.rk +21 -2
- package/template/base/modules/users/roles/employee.rk +8 -0
- package/template/base/modules/users/roles/outlet_supervisor.rk +7 -0
- package/template/base/modules/whatsapp/flows/whatsapp_customer_opt_out.rk +16 -0
- package/template/base/modules/whatsapp/flows/whatsapp_customer_opt_out_new.rk +17 -0
- package/template/base/modules/whatsapp/flows/whatsapp_message_status.rk +24 -0
- package/template/base/modules/whatsapp/flows/whatsapp_opted_out.rk +26 -0
- package/template/base/modules/whatsapp/models/whatsapp_message.rk +99 -0
- package/template/base/modules/whatsapp/models/whatsapp_opt_out.rk +44 -0
- package/template/base/modules/whatsapp/module.rk +23 -0
- package/template/base/modules/whatsapp_booking/flows/whatsapp_booking_tomorrow.rk +48 -0
- package/template/base/modules/whatsapp_booking/module.rk +13 -0
- package/template/base/modules/whatsapp_order_ready/flows/whatsapp_pickup_on_sale.rk +19 -0
- package/template/base/modules/whatsapp_order_ready/flows/whatsapp_ticket_ready.rk +40 -0
- package/template/base/modules/whatsapp_order_ready/models/whatsapp_pickup.rk +22 -0
- package/template/base/modules/whatsapp_order_ready/module.rk +14 -0
- package/template/base/modules/whatsapp_receipt/flows/whatsapp_receipt_on_sale.rk +43 -0
- package/template/base/modules/whatsapp_receipt/module.rk +13 -0
- package/template/base/modules/whatsapp_reminder/flows/whatsapp_invoice_overdue.rk +64 -0
- package/template/base/modules/whatsapp_reminder/module.rk +15 -0
- package/template/base/modules/workforce/imports/worker_list.rk +4 -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.28",
|
|
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",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/app.json
|
|
2
|
+
name: absen_karyawan
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
title: {id: Absen karyawan, en: Staff attendance}
|
|
5
|
+
label: {id: Rangka Absen Karyawan, en: Rangka Staff Attendance}
|
|
6
|
+
summary:
|
|
7
|
+
id: Karyawan outlet absen masuk dan pulang dari HP dengan lokasi dan selfie, terlambat dihitung otomatis, rekap bulanan per karyawan.
|
|
8
|
+
category: people
|
|
9
|
+
icon: time-line
|
|
10
|
+
rangka: '>=0.5'
|
|
11
|
+
# A piece (riset/desain/11-susunan-kepingan.md) next to fnb_cabang, ritel_cabang, produksi_pabrik, kasir or stok_outlet:
|
|
12
|
+
# staff of the outlets clock in from their phones (module attendance, rangka-apps#100). Its dashboards live here once,
|
|
13
|
+
# not copied into each bundle (dashboards are keyed by name across a site). Project field workers keep jasa_proyek's
|
|
14
|
+
# own clock (module projects).
|
|
15
|
+
modules:
|
|
16
|
+
users: ^1.5
|
|
17
|
+
outlets: ^1.6
|
|
18
|
+
attendance: ^1.0
|
|
19
|
+
dashboards: [absen_hari_ini, absen_karyawan_saya, rekap_absen_karyawan]
|
|
20
|
+
roles: [head_office, outlet_supervisor, cashier, outlet_staff, employee]
|
|
21
|
+
home: {dashboard: absen_hari_ini}
|
|
22
|
+
# contract 0030 §3: staff who only clock in land on the clock; the others open it from the Kerja group.
|
|
23
|
+
work:
|
|
24
|
+
- {screen: absen_outlet, roles: [employee], home: true}
|
|
25
|
+
- {screen: absen_outlet, roles: [cashier, outlet_staff, outlet_supervisor, head_office]}
|
|
26
|
+
menu:
|
|
27
|
+
- group: {id: Absen}
|
|
28
|
+
items: [staff_attendance, attendance_period, attendance_summary]
|
|
29
|
+
- group: {id: Pengaturan absen}
|
|
30
|
+
items: [outlet]
|
|
31
|
+
onboarding:
|
|
32
|
+
- ask: {id: 'Di mana titik tiap outlet? Kirim lokasi dari HP saat berada di outlet, atau salin titik dari peta.'}
|
|
33
|
+
sets: outlet.lat
|
|
34
|
+
- ask: {id: 'Jam berapa karyawan outlet masuk dan pulang, dan berapa menit toleransi terlambatnya?'}
|
|
35
|
+
sets: outlet.work_start
|
|
36
|
+
- ask: {id: 'Siapa saja yang tidak wajib absen (misalnya pemilik)?'}
|
|
37
|
+
sets: user.attendance_exempt
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/dashboard.json
|
|
2
|
+
name: absen_hari_ini
|
|
3
|
+
label: {id: Absen hari ini, en: Attendance today}
|
|
4
|
+
description: {id: 'Siapa yang sudah masuk, terlambat, di luar radius dan menunggu persetujuan, per outlet'}
|
|
5
|
+
# Head office sees every outlet; the outlet supervisor only their own outlets (row scope outlet, contract 0010; the
|
|
6
|
+
# dashboard cache key includes the scope).
|
|
7
|
+
# Every widget is about today (or what is still waiting), none reads the period: one choice, "1 hari", so the selector
|
|
8
|
+
# does not offer 7, 30 or 90 days that change nothing. The web app always draws the selector (rangka-os follow-up in
|
|
9
|
+
# rangka workspace reports/follow-up-rangka-os-attendance-ui.md).
|
|
10
|
+
periods: [1]
|
|
11
|
+
default_period: 1
|
|
12
|
+
roles: [head_office, outlet_supervisor]
|
|
13
|
+
cache: 1m
|
|
14
|
+
widgets:
|
|
15
|
+
- {name: present, type: number, label: {id: Sudah masuk}, model: staff_attendance, filter: "work_date == today() && docstatus != 2 && clock_in != ''", compact: true, span: 3}
|
|
16
|
+
- {name: late, type: number, label: {id: Terlambat}, model: staff_attendance, filter: "work_date == today() && docstatus != 2 && late_min > 0", compact: true, span: 3, good_when: down}
|
|
17
|
+
- {name: outside, type: number, label: {id: Di luar radius}, model: staff_attendance, filter: "work_date == today() && docstatus != 2 && outside_site", compact: true, span: 3, good_when: down}
|
|
18
|
+
- {name: waiting, type: number, label: {id: Menunggu persetujuan}, description: {id: 'Sudah absen pulang tapi belum sah'}, model: staff_attendance, filter: "docstatus == 0 && clock_out != ''", compact: true, span: 3, good_when: down}
|
|
19
|
+
- {name: today, type: list, label: {id: Absen hari ini}, model: staff_attendance, filter: "work_date == today() && docstatus != 2", columns: [employee_name, outlet, clock_in, late_min, clock_out, outside_site], sort: outlet, limit: 50, span: 12}
|
|
20
|
+
- {name: held, type: list, label: {id: Menunggu persetujuan}, model: staff_attendance, filter: "docstatus == 0 && clock_out != ''", columns: [employee_name, outlet, work_date, in_site_m, overtime_hours, reason], sort: -work_date, limit: 20, span: 12}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/dashboard.json
|
|
2
|
+
name: absen_karyawan_saya
|
|
3
|
+
label: {id: Absen saya, en: My attendance}
|
|
4
|
+
description: {id: 'Absen masuk dan pulang kamu, hari hadir dan menit terlambat bulan ini, dan yang masih menunggu persetujuan'}
|
|
5
|
+
# Every widget filters on the member's own employee record, so head office and outlet supervisors (who read more logs)
|
|
6
|
+
# also see only their own days here. Staff are limited to their own logs anyway (staff_attendance read if:).
|
|
7
|
+
default_period: 31
|
|
8
|
+
roles: [cashier, outlet_staff, employee, outlet_supervisor, head_office]
|
|
9
|
+
cache: 1m
|
|
10
|
+
widgets:
|
|
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
|
+
- {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
|
+
- {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}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/dashboard.json
|
|
2
|
+
name: rekap_absen_karyawan
|
|
3
|
+
label: {id: Rekap absen karyawan, en: Staff attendance summary}
|
|
4
|
+
description: {id: 'Rekap absen yang sudah diajukan kantor pusat. Hanya absen yang sudah sah yang dihitung.'}
|
|
5
|
+
# Reads attendance_summary, written when head office submits an attendance_period: a summary is a closed period, not a
|
|
6
|
+
# live count (absen_hari_ini is live). The period selector picks the rekap periods that ended in the last N days.
|
|
7
|
+
default_period: 31
|
|
8
|
+
periods: [31, 92, 365]
|
|
9
|
+
roles: [head_office, outlet_supervisor]
|
|
10
|
+
cache: 5m
|
|
11
|
+
widgets:
|
|
12
|
+
- {name: summaries, type: list, label: {id: Ringkasan per karyawan per periode rekap}, description: {id: 'Absen hari ini dan yang menunggu persetujuan belum masuk rekap'}, model: attendance_summary, filter: "!cancelled", period: period_to, columns: [employee_name, outlet, period_from, period_to, days_present, late_min_total], sort: -period_to, limit: 50, span: 12}
|
|
@@ -25,7 +25,7 @@ modules:
|
|
|
25
25
|
payments: ^1.0
|
|
26
26
|
bank_statement: ^1.0
|
|
27
27
|
procurement: ^1.0
|
|
28
|
-
payroll: ^
|
|
28
|
+
payroll: ^2.0
|
|
29
29
|
dashboards: [jasa_overview, ar_aging, project_margin, absen_saya, rekap_absen]
|
|
30
30
|
# field_worker and site_supervisor (field attendance, A2) have their role files in the projects module.
|
|
31
31
|
roles: [sales_manager, finance_manager, purchasing_manager, project_admin, field_worker, site_supervisor]
|
|
@@ -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: kasir
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.1.0
|
|
4
4
|
title: {id: Kasir, en: Cashier}
|
|
5
5
|
label: {id: Rangka Kasir, en: Rangka Cashier}
|
|
6
6
|
summary:
|
|
@@ -19,6 +19,10 @@ modules:
|
|
|
19
19
|
outlets: ^1.2
|
|
20
20
|
stock: ^1.2
|
|
21
21
|
pos: ^1.0
|
|
22
|
+
# promotions (rangka-apps#103) is added per site (config.modules, contract 0032): the kernel lists its models in their
|
|
23
|
+
# own menu group, and the dashboard shows its widgets only where it is installed
|
|
24
|
+
optional:
|
|
25
|
+
promotions: ^1.0
|
|
22
26
|
dashboards: [kasir_ringkas]
|
|
23
27
|
roles: [cashier, head_office]
|
|
24
28
|
home: {model: pos_sale}
|
|
@@ -18,3 +18,7 @@ widgets:
|
|
|
18
18
|
- {name: net_by_day, type: chart, chart: bar, label: {id: Penjualan kasir per hari}, model: pos_sale, group_by: date, grain: day, aggregate: sum, field: grand_total, filter: docstatus == 1, period: date, span: 6}
|
|
19
19
|
- {name: net_by_method, type: chart, chart: donut, label: {id: Cara bayar}, model: pos_sale, group_by: method, aggregate: sum, field: grand_total, filter: docstatus == 1, period: date, span: 6}
|
|
20
20
|
- {name: shifts_short, type: list, label: {id: Sesi dengan selisih kas}, model: pos_shift_close, filter: docstatus == 1 && cash_difference != 0, period: close_date, columns: [name, outlet, close_date, shift, cash_difference], sort: cash_difference, limit: 10, span: 6}
|
|
21
|
+
# module promotions: what promos cost this period (promotion_ledger: post rows minus voided ones) and per promo
|
|
22
|
+
- {name: promo_cost, type: number, label: {id: Biaya promo}, description: {id: 'Potongan dan produk gratis dari promo, struk batal sudah dikurangi'}, model: promotion_ledger, aggregate: sum, field: amount, period: date, compact: true, span: 4, if: "app_installed('promotions')"}
|
|
23
|
+
- {name: promo_uses, type: number, label: {id: Struk dengan promo}, model: promotion_ledger, filter: "entry == 'post'", period: date, compact: true, span: 4, if: "app_installed('promotions')"}
|
|
24
|
+
- {name: promo_by_promotion, type: chart, chart: bar, label: {id: Biaya promo per promo}, model: promotion_ledger, group_by: promotion, aggregate: sum, field: amount, period: date, sort: -value, span: 6, if: "app_installed('promotions')"}
|
|
@@ -78,3 +78,23 @@ dan di outlet mana?". Use the same questions.
|
|
|
78
78
|
- Head office: menu *Kasir* (sales, shifts, shift closes) and the *Kerja* group for the cashier screen.
|
|
79
79
|
|
|
80
80
|
Point the owner there only after `rangka_changeset_status` says the change set is applied (`rangka-changesets`).
|
|
81
|
+
|
|
82
|
+
## Promo (module `promotions`, added next to the cashier)
|
|
83
|
+
|
|
84
|
+
When the owner asks for discounts, happy hour, "beli 2 gratis 1", a voucher code or coupons, the module
|
|
85
|
+
`promotions` adds them to the cashier (the change set names it in `config.modules`). What exists:
|
|
86
|
+
|
|
87
|
+
- **Item promos, applied by themselves:** percent off, rupiah off per item, or buy X get Y of the same item, for one
|
|
88
|
+
item or one category, at one outlet or all, between two dates, on some days and between two hours (happy hour;
|
|
89
|
+
it starts and ends within 5 minutes). If two promos hit one item, the higher *Prioritas* wins.
|
|
90
|
+
- **Bill promos, picked at the counter before paying:** percent off the bill with a cap, rupiah off the bill, or a
|
|
91
|
+
free product, each with a minimum spend. Optionally with one shared voucher code (and a use limit) or with
|
|
92
|
+
single-use coupons made in a batch (*Kiriman kupon*).
|
|
93
|
+
- **What it costs:** *Pemakaian promo* lists every use; the cashier dashboard shows the promo cost of the period.
|
|
94
|
+
|
|
95
|
+
Say clearly: promos are set up by the owner or head office, never by the cashier and never by you. You may explain
|
|
96
|
+
the kinds, suggest one in words ("Mau coba diskon 10% jam 14.00 sampai 16.00?") and open an empty *Promo* form for the
|
|
97
|
+
owner; you never save, switch on or change a promo, and you never decide a price or a discount. A promo the owner set
|
|
98
|
+
up does not wait for head office's approval; a cashier's own discount above 20% still does. A coupon is checked when
|
|
99
|
+
the sale is sent, and the cashier never sees voucher or coupon codes (the buyer brings them), so on a device that is
|
|
100
|
+
offline a voucher or coupon sale is checked once it is back online.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/connector.json
|
|
2
|
+
# Email: the business's own mailbox. New mail is read over IMAP (or POP3) and replies go out over SMTP, with the
|
|
3
|
+
# user name and password (or app password) of that mailbox. Works with any provider that offers IMAP/POP3 and SMTP:
|
|
4
|
+
# the domain's hosting (cPanel, Niagahoster, Rumahweb), Google Workspace and Gmail (with an app password),
|
|
5
|
+
# Microsoft 365, Zoho Mail.
|
|
6
|
+
# Needs rangka-os contract 0068 (mail connectors): the mail: block and mail: actions are run by the kernel, not by HTTP.
|
|
7
|
+
# - Every connection is encrypted: tls (implicit, ports 993/995/465) or starttls (143/110/587); certificates are
|
|
8
|
+
# checked and there is no plain-text mode.
|
|
9
|
+
# - The first poll only notes where the mailbox is: mail already there is not replayed into flows.
|
|
10
|
+
# - Nothing is deleted on the server. IMAP reads with BODY.PEEK (mail stays unread unless mark_seen is true); POP3
|
|
11
|
+
# never sends DELE.
|
|
12
|
+
# - Attachments are kept in Rangka's attachments store; the event carries their ids.
|
|
13
|
+
# fixtures/ are synthetic (no real mailbox): the kernel's fetch answer and the event it emits.
|
|
14
|
+
name: email
|
|
15
|
+
label: {id: Email (IMAP/SMTP), en: Email (IMAP/SMTP)}
|
|
16
|
+
summary:
|
|
17
|
+
id: Terima dan kirim email lewat kotak masuk bisnismu (IMAP/POP3 dan SMTP).
|
|
18
|
+
en: Receive and send email through your business mailbox (IMAP/POP3 and SMTP).
|
|
19
|
+
category: messaging
|
|
20
|
+
icon: mail-line
|
|
21
|
+
version: 0.1.0
|
|
22
|
+
docs: https://www.rfc-editor.org/rfc/rfc9051
|
|
23
|
+
auth:
|
|
24
|
+
type: basic
|
|
25
|
+
fields:
|
|
26
|
+
- name: username
|
|
27
|
+
label: {id: Nama pengguna}
|
|
28
|
+
help: {id: 'Biasanya alamat email lengkap, misalnya toko@usahamu.id'}
|
|
29
|
+
- name: password
|
|
30
|
+
label: {id: Kata sandi}
|
|
31
|
+
secret: true
|
|
32
|
+
help: {id: 'Untuk Gmail dan Microsoft 365 pakai sandi aplikasi (app password), bukan sandi login'}
|
|
33
|
+
- name: from_address
|
|
34
|
+
label: {id: Alamat pengirim}
|
|
35
|
+
help: {id: Alamat yang tampil sebagai pengirim email keluar}
|
|
36
|
+
- name: from_name
|
|
37
|
+
label: {id: Nama pengirim}
|
|
38
|
+
required: false
|
|
39
|
+
help: {id: Misalnya nama usahamu}
|
|
40
|
+
- name: receive_protocol
|
|
41
|
+
label: {id: Cara menerima}
|
|
42
|
+
required: false
|
|
43
|
+
help: {id: imap (disarankan) atau pop3. Kosong berarti imap}
|
|
44
|
+
- name: receive_host
|
|
45
|
+
label: {id: Server email masuk}
|
|
46
|
+
required: false
|
|
47
|
+
help: {id: 'Misalnya imap.gmail.com, outlook.office365.com atau mail.usahamu.id'}
|
|
48
|
+
- name: receive_port
|
|
49
|
+
label: {id: Port email masuk}
|
|
50
|
+
required: false
|
|
51
|
+
help: {id: Kosong berarti 993 (IMAP) atau 995 (POP3)}
|
|
52
|
+
- name: receive_tls
|
|
53
|
+
label: {id: Enkripsi email masuk}
|
|
54
|
+
required: false
|
|
55
|
+
help: {id: tls (bawaan) atau starttls}
|
|
56
|
+
- name: folder
|
|
57
|
+
label: {id: Folder}
|
|
58
|
+
required: false
|
|
59
|
+
help: {id: Folder IMAP yang dibaca. Kosong berarti INBOX}
|
|
60
|
+
- name: mark_seen
|
|
61
|
+
label: {id: Tandai sudah dibaca}
|
|
62
|
+
required: false
|
|
63
|
+
help: {id: true menandai email yang sudah diambil sebagai dibaca (IMAP). Kosong berarti tidak}
|
|
64
|
+
- name: smtp_host
|
|
65
|
+
label: {id: Server email keluar (SMTP)}
|
|
66
|
+
required: false
|
|
67
|
+
help: {id: 'Misalnya smtp.gmail.com, smtp.office365.com atau mail.usahamu.id'}
|
|
68
|
+
- name: smtp_port
|
|
69
|
+
label: {id: Port SMTP}
|
|
70
|
+
required: false
|
|
71
|
+
help: {id: Kosong berarti 465 (tls) atau 587 (starttls)}
|
|
72
|
+
- name: smtp_tls
|
|
73
|
+
label: {id: Enkripsi SMTP}
|
|
74
|
+
required: false
|
|
75
|
+
help: {id: tls (bawaan) atau starttls. Microsoft 365 memakai starttls di port 587}
|
|
76
|
+
mail:
|
|
77
|
+
receive:
|
|
78
|
+
protocol: '{auth.receive_protocol}'
|
|
79
|
+
host: '{auth.receive_host}'
|
|
80
|
+
port: '{auth.receive_port}'
|
|
81
|
+
tls: '{auth.receive_tls}'
|
|
82
|
+
folder: '{auth.folder}'
|
|
83
|
+
mark_seen: '{auth.mark_seen}'
|
|
84
|
+
send:
|
|
85
|
+
host: '{auth.smtp_host}'
|
|
86
|
+
port: '{auth.smtp_port}'
|
|
87
|
+
tls: '{auth.smtp_tls}'
|
|
88
|
+
username: '{auth.username}'
|
|
89
|
+
password: '{auth.password}'
|
|
90
|
+
from: '{auth.from_address}'
|
|
91
|
+
from_name: '{auth.from_name}'
|
|
92
|
+
triggers:
|
|
93
|
+
# Every 2 minutes the kernel reads the mail after the cursor (an IMAP UID, or the POP3 UIDLs seen), at most 25 per
|
|
94
|
+
# poll, oldest first. An event is the message as it arrived; a message read again (a lost cursor) emits the same
|
|
95
|
+
# event and the kernel drops it. Flows that create records set idempotency: event.message_id.
|
|
96
|
+
- name: email_received
|
|
97
|
+
label: {id: Email masuk}
|
|
98
|
+
via: poll
|
|
99
|
+
every: 2m
|
|
100
|
+
action: fetch_email
|
|
101
|
+
input: {cursor: cursor}
|
|
102
|
+
cursor: cursor
|
|
103
|
+
for_each: 'messages[]'
|
|
104
|
+
emit:
|
|
105
|
+
message_id: item.message_id
|
|
106
|
+
from: item.from
|
|
107
|
+
from_name: item.from_name
|
|
108
|
+
to: item.to
|
|
109
|
+
cc: item.cc
|
|
110
|
+
reply_to: item.reply_to
|
|
111
|
+
subject: item.subject
|
|
112
|
+
text: item.text
|
|
113
|
+
html: item.html
|
|
114
|
+
date: item.date
|
|
115
|
+
in_reply_to: item.in_reply_to
|
|
116
|
+
references: item.references
|
|
117
|
+
# [{id, filename, content_type, size, sha256, url}]; a part too large or not kept has skipped: instead of id
|
|
118
|
+
attachments: item.attachments
|
|
119
|
+
truncated: item.truncated
|
|
120
|
+
actions:
|
|
121
|
+
- name: fetch_email
|
|
122
|
+
label: {id: Ambil email baru}
|
|
123
|
+
mail: fetch
|
|
124
|
+
input:
|
|
125
|
+
- {name: cursor, label: {id: Posisi terakhir}}
|
|
126
|
+
- name: send_email
|
|
127
|
+
label: {id: Kirim email}
|
|
128
|
+
mail: send
|
|
129
|
+
input:
|
|
130
|
+
- {name: to, label: {id: Kepada}, required: true, help: {id: Satu alamat atau daftar alamat}}
|
|
131
|
+
- {name: cc, label: {id: Tembusan}}
|
|
132
|
+
- {name: bcc, label: {id: Tembusan tersembunyi}}
|
|
133
|
+
- {name: subject, label: {id: Subjek}, required: true}
|
|
134
|
+
- {name: text, label: {id: Isi (teks)}}
|
|
135
|
+
- {name: html, label: {id: Isi (HTML)}}
|
|
136
|
+
- {name: reply_to, label: {id: Balas ke}}
|
|
137
|
+
- {name: in_reply_to, label: {id: Membalas email}, help: {id: 'message_id email yang dibalas, agar masuk ke utas yang sama'}}
|
|
138
|
+
- {name: references, label: {id: Rujukan utas}}
|
|
139
|
+
- {name: attachments, label: {id: Lampiran}, help: {id: Daftar id lampiran Rangka}}
|
|
140
|
+
output:
|
|
141
|
+
message_id: message_id
|
|
142
|
+
recipients: recipients
|
|
143
|
+
# SMTP 4xx replies and network errors are retried; 5xx (a refused address, a wrong password) are not
|
|
144
|
+
retry: {max: 5, backoff: exponential}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"item": {
|
|
3
|
+
"message_id": "po-0077@pelanggan-contoh.id",
|
|
4
|
+
"from": "budi@pelanggan-contoh.id",
|
|
5
|
+
"from_name": "Budi Contoh",
|
|
6
|
+
"to": [
|
|
7
|
+
"toko@kopi-contoh.id"
|
|
8
|
+
],
|
|
9
|
+
"cc": [
|
|
10
|
+
"sari@kopi-contoh.id"
|
|
11
|
+
],
|
|
12
|
+
"reply_to": [],
|
|
13
|
+
"subject": "PO 77: kopi arabika 10 kg",
|
|
14
|
+
"date": "2026-11-17T02:30:00Z",
|
|
15
|
+
"in_reply_to": "",
|
|
16
|
+
"references": [],
|
|
17
|
+
"text": "Halo, terlampir PO 77 untuk 10 kg arabika. Mohon konfirmasi.\n",
|
|
18
|
+
"html": "<p>Halo, terlampir PO 77 untuk 10 kg arabika. Mohon konfirmasi.</p>",
|
|
19
|
+
"truncated": false,
|
|
20
|
+
"attachments": [
|
|
21
|
+
{
|
|
22
|
+
"id": "att_0123456789abcdef0123",
|
|
23
|
+
"filename": "po-77.pdf",
|
|
24
|
+
"content_type": "application/pdf",
|
|
25
|
+
"size": 18234,
|
|
26
|
+
"sha256": "5f3c0de1a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d5",
|
|
27
|
+
"url": "/api/v1/attachments/att_0123456789abcdef0123"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"uid": "4812",
|
|
31
|
+
"size": 27410
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"item": {
|
|
3
|
+
"message_id": "re-0077@pelanggan-contoh.id",
|
|
4
|
+
"from": "budi@pelanggan-contoh.id",
|
|
5
|
+
"from_name": "Budi Contoh",
|
|
6
|
+
"to": [
|
|
7
|
+
"toko@kopi-contoh.id"
|
|
8
|
+
],
|
|
9
|
+
"cc": [],
|
|
10
|
+
"reply_to": [],
|
|
11
|
+
"subject": "Re: Konfirmasi PO 77",
|
|
12
|
+
"date": "2026-11-17T02:30:00Z",
|
|
13
|
+
"in_reply_to": "3f9a0c1d2e4b6a8c0e1f2a3b@kopi-contoh.id",
|
|
14
|
+
"references": [
|
|
15
|
+
"3f9a0c1d2e4b6a8c0e1f2a3b@kopi-contoh.id"
|
|
16
|
+
],
|
|
17
|
+
"text": "Oke, ditunggu pengirimannya.\n",
|
|
18
|
+
"html": "",
|
|
19
|
+
"truncated": false,
|
|
20
|
+
"attachments": [
|
|
21
|
+
{
|
|
22
|
+
"filename": "foto-gudang.mov",
|
|
23
|
+
"content_type": "video/quicktime",
|
|
24
|
+
"size": 41943040,
|
|
25
|
+
"skipped": "too_large"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"uid": "4813",
|
|
29
|
+
"size": 41960112
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"email_received.json": {
|
|
3
|
+
"message_id": "po-0077@pelanggan-contoh.id",
|
|
4
|
+
"from": "budi@pelanggan-contoh.id",
|
|
5
|
+
"from_name": "Budi Contoh",
|
|
6
|
+
"subject": "PO 77: kopi arabika 10 kg",
|
|
7
|
+
"date": "2026-11-17T02:30:00Z",
|
|
8
|
+
"in_reply_to": "",
|
|
9
|
+
"truncated": false
|
|
10
|
+
},
|
|
11
|
+
"email_received_reply.json": {
|
|
12
|
+
"message_id": "re-0077@pelanggan-contoh.id",
|
|
13
|
+
"in_reply_to": "3f9a0c1d2e4b6a8c0e1f2a3b@kopi-contoh.id",
|
|
14
|
+
"html": ""
|
|
15
|
+
},
|
|
16
|
+
"send_email.json": {
|
|
17
|
+
"message_id": "3f9a0c1d2e4b6a8c0e1f2a3b@kopi-contoh.id",
|
|
18
|
+
"recipients": 2
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"messages": [
|
|
3
|
+
{
|
|
4
|
+
"message_id": "po-0077@pelanggan-contoh.id",
|
|
5
|
+
"from": "budi@pelanggan-contoh.id",
|
|
6
|
+
"from_name": "Budi Contoh",
|
|
7
|
+
"to": [
|
|
8
|
+
"toko@kopi-contoh.id"
|
|
9
|
+
],
|
|
10
|
+
"cc": [
|
|
11
|
+
"sari@kopi-contoh.id"
|
|
12
|
+
],
|
|
13
|
+
"reply_to": [],
|
|
14
|
+
"subject": "PO 77: kopi arabika 10 kg",
|
|
15
|
+
"date": "2026-11-17T02:30:00Z",
|
|
16
|
+
"in_reply_to": "",
|
|
17
|
+
"references": [],
|
|
18
|
+
"text": "Halo, terlampir PO 77 untuk 10 kg arabika. Mohon konfirmasi.\n",
|
|
19
|
+
"html": "<p>Halo, terlampir PO 77 untuk 10 kg arabika. Mohon konfirmasi.</p>",
|
|
20
|
+
"truncated": false,
|
|
21
|
+
"attachments": [
|
|
22
|
+
{
|
|
23
|
+
"id": "att_0123456789abcdef0123",
|
|
24
|
+
"filename": "po-77.pdf",
|
|
25
|
+
"content_type": "application/pdf",
|
|
26
|
+
"size": 18234,
|
|
27
|
+
"sha256": "5f3c0de1a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d5",
|
|
28
|
+
"url": "/api/v1/attachments/att_0123456789abcdef0123"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"uid": "4812",
|
|
32
|
+
"size": 27410
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"message_id": "re-0077@pelanggan-contoh.id",
|
|
36
|
+
"from": "budi@pelanggan-contoh.id",
|
|
37
|
+
"from_name": "Budi Contoh",
|
|
38
|
+
"to": [
|
|
39
|
+
"toko@kopi-contoh.id"
|
|
40
|
+
],
|
|
41
|
+
"cc": [],
|
|
42
|
+
"reply_to": [],
|
|
43
|
+
"subject": "Re: Konfirmasi PO 77",
|
|
44
|
+
"date": "2026-11-17T02:30:00Z",
|
|
45
|
+
"in_reply_to": "3f9a0c1d2e4b6a8c0e1f2a3b@kopi-contoh.id",
|
|
46
|
+
"references": [
|
|
47
|
+
"3f9a0c1d2e4b6a8c0e1f2a3b@kopi-contoh.id"
|
|
48
|
+
],
|
|
49
|
+
"text": "Oke, ditunggu pengirimannya.\n",
|
|
50
|
+
"html": "",
|
|
51
|
+
"truncated": false,
|
|
52
|
+
"attachments": [
|
|
53
|
+
{
|
|
54
|
+
"filename": "foto-gudang.mov",
|
|
55
|
+
"content_type": "video/quicktime",
|
|
56
|
+
"size": 41943040,
|
|
57
|
+
"skipped": "too_large"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"uid": "4813",
|
|
61
|
+
"size": 41960112
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"cursor": "imap:1731800000:4813:INBOX",
|
|
65
|
+
"baseline": false
|
|
66
|
+
}
|