@rangka-os/create 0.5.0-alpha.27 → 0.5.0-alpha.29
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 +4 -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/apps/pembukuan/app.rk +3 -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/accounting/flows/gl_asset_disposal_post.rk +68 -0
- package/template/base/modules/accounting/flows/gl_asset_disposal_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_depreciation_run_post.rk +43 -0
- package/template/base/modules/accounting/flows/gl_depreciation_run_reverse.rk +36 -0
- package/template/base/modules/accounting/flows/gl_fixed_asset_post.rk +51 -0
- package/template/base/modules/accounting/flows/gl_fixed_asset_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +2 -2
- package/template/base/modules/accounting/models/gl_entry.rk +2 -0
- package/template/base/modules/accounting/module.rk +2 -2
- 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/fixed_assets/flows/asset_disposal_on_cancel.rk +14 -0
- package/template/base/modules/fixed_assets/flows/asset_disposal_on_submit.rk +21 -0
- package/template/base/modules/fixed_assets/flows/asset_from_vendor_bill.rk +41 -0
- package/template/base/modules/fixed_assets/flows/depreciation_run_fill.rk +28 -0
- package/template/base/modules/fixed_assets/flows/depreciation_run_monthly.rk +36 -0
- package/template/base/modules/fixed_assets/flows/depreciation_run_on_cancel.rk +30 -0
- package/template/base/modules/fixed_assets/flows/depreciation_run_on_submit.rk +34 -0
- package/template/base/modules/fixed_assets/flows/fixed_asset_on_cancel.rk +24 -0
- package/template/base/modules/fixed_assets/flows/fixed_asset_on_submit.rk +69 -0
- package/template/base/modules/fixed_assets/flows/fixed_assets_setup.rk +29 -0
- package/template/base/modules/fixed_assets/flows/opening_balance_asset_guard.rk +15 -0
- package/template/base/modules/fixed_assets/flows/vendor_bill_asset_guard.rk +14 -0
- package/template/base/modules/fixed_assets/imports/asset_list.rk +22 -0
- package/template/base/modules/fixed_assets/models/asset_bill_line.rk +24 -0
- package/template/base/modules/fixed_assets/models/asset_book.rk +83 -0
- package/template/base/modules/fixed_assets/models/asset_category.rk +54 -0
- package/template/base/modules/fixed_assets/models/asset_disposal.rk +97 -0
- package/template/base/modules/fixed_assets/models/asset_guard.rk +90 -0
- package/template/base/modules/fixed_assets/models/depreciation_line.rk +13 -0
- package/template/base/modules/fixed_assets/models/depreciation_run.rk +65 -0
- package/template/base/modules/fixed_assets/models/fixed_asset.rk +165 -0
- package/template/base/modules/fixed_assets/models/fixed_asset_setting.rk +34 -0
- package/template/base/modules/fixed_assets/module.rk +30 -0
- package/template/base/modules/fixed_assets/print/fixed_asset_register.html +45 -0
- package/template/base/modules/fixed_assets/print/fixed_asset_register.rk +17 -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 +21 -2
- 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/models/rental_unit.rk +13 -3
- package/template/base/modules/rental/module.rk +2 -2
- 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.29",
|
|
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,8 @@ modules:
|
|
|
25
25
|
payments: ^1.0
|
|
26
26
|
bank_statement: ^1.0
|
|
27
27
|
procurement: ^1.0
|
|
28
|
-
payroll: ^
|
|
28
|
+
payroll: ^2.0
|
|
29
|
+
fixed_assets: ^1.0
|
|
29
30
|
dashboards: [jasa_overview, ar_aging, project_margin, absen_saya, rekap_absen]
|
|
30
31
|
# field_worker and site_supervisor (field attendance, A2) have their role files in the projects module.
|
|
31
32
|
roles: [sales_manager, finance_manager, purchasing_manager, project_admin, field_worker, site_supervisor]
|
|
@@ -51,6 +52,8 @@ menu:
|
|
|
51
52
|
items: [purchase_request, purchase_order]
|
|
52
53
|
- group: {id: Pembukuan}
|
|
53
54
|
items: [financial_report, gl_entry, opening_balance, period_close]
|
|
55
|
+
- group: {id: Aset tetap}
|
|
56
|
+
items: [asset_book, fixed_asset, depreciation_run, asset_disposal, asset_category, fixed_asset_setting]
|
|
54
57
|
- group: {id: Pajak}
|
|
55
58
|
items: [tax_period]
|
|
56
59
|
- group: {id: Data induk}
|
|
@@ -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.
|
|
@@ -13,7 +13,10 @@ rangka: '>=0.5'
|
|
|
13
13
|
modules:
|
|
14
14
|
users: ^1.0
|
|
15
15
|
accounting: ^1.0
|
|
16
|
+
fixed_assets: ^1.0
|
|
16
17
|
roles: [head_office]
|
|
17
18
|
menu:
|
|
18
19
|
- group: {id: Pembukuan}
|
|
19
20
|
items: [financial_report, gl_entry, opening_balance, period_close]
|
|
21
|
+
- group: {id: Aset tetap}
|
|
22
|
+
items: [asset_book, fixed_asset, depreciation_run, asset_disposal, asset_category, fixed_asset_setting]
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/connector.json
|
|
2
|
+
# Midtrans (Indonesia): Snap makes a payment page for an invoice (QRIS, virtual accounts, e-wallets, whatever the
|
|
3
|
+
# account has enabled); the Core API charges one channel directly (a dynamic QRIS for the counter, a bank transfer
|
|
4
|
+
# virtual account, GoPay). Midtrans sends an HTTP notification on every status change.
|
|
5
|
+
# Every request uses the server key as the Basic auth user name with an empty password.
|
|
6
|
+
# Notifications carry their own signature in the body: signature_key = hex(SHA-512(order_id + status_code +
|
|
7
|
+
# gross_amount + server key)), checked by the kernel before any flow runs (rangka-os contract 0002, body-field
|
|
8
|
+
# signatures, refinement of 19 Nov 2026). Research and sources: rangka (Juragan) reports/keputusan-riset/midtrans-connector.md.
|
|
9
|
+
# Only order_id, status_code and gross_amount are signed: a genuine cancel or refund notification (status code 200 too)
|
|
10
|
+
# could be resent with transaction_status changed to settlement. So the trigger confirms every notification with
|
|
11
|
+
# Midtrans before any flow runs (confirm: get_status, rangka-os contract 0002, confirmed webhooks): paid, the status,
|
|
12
|
+
# the channel and a refunded amount come from Midtrans's answer (`confirmed`), and paid also needs that answer to name
|
|
13
|
+
# the same order id and the same amount as the signed fields. gateway_ref is the order id (one Midtrans transaction
|
|
14
|
+
# per order id, the key Midtrans itself names for idempotent handling) and external_id our invoice number read from it.
|
|
15
|
+
# A notification Midtrans cannot confirm (no answer, unknown order) starts no flow; Midtrans sends it again later.
|
|
16
|
+
# An order id is used once at Midtrans: the first page or charge for an invoice uses the invoice number, a later one
|
|
17
|
+
# (the first expired) uses <number>~<attempt>, attempt 2 to 9, and external_id drops that ending again.
|
|
18
|
+
# The trigger fires for every notification (pending, settlement, expire, refund ...): a flow that records money starts
|
|
19
|
+
# with `if: event.paid` and holds gateway_ref in gateway_ref_claim, as with doku and xendit.
|
|
20
|
+
# Test mode: api_host api.sandbox.midtrans.com and snap_host app.sandbox.midtrans.com with the sandbox server key; the
|
|
21
|
+
# sandbox simulator pays and notifies. Until a sandbox account exists, midtrans/mock/midtrans_mock.py answers Snap, the
|
|
22
|
+
# Core API and the status call, and sends signed notifications locally.
|
|
23
|
+
name: midtrans
|
|
24
|
+
label: {id: Midtrans}
|
|
25
|
+
summary:
|
|
26
|
+
id: Terima pembayaran QRIS, virtual account dan e-wallet lewat Midtrans.
|
|
27
|
+
en: Take QRIS, virtual account and e-wallet payments through Midtrans.
|
|
28
|
+
category: payments
|
|
29
|
+
icon: secure-payment-line
|
|
30
|
+
version: 0.1.0
|
|
31
|
+
vendor: Midtrans
|
|
32
|
+
docs: https://docs.midtrans.com/
|
|
33
|
+
hosts: [api.sandbox.midtrans.com, api.midtrans.com, app.sandbox.midtrans.com, app.midtrans.com]
|
|
34
|
+
auth:
|
|
35
|
+
type: basic
|
|
36
|
+
fields:
|
|
37
|
+
- name: server_key
|
|
38
|
+
label: {id: Server key}
|
|
39
|
+
secret: true
|
|
40
|
+
required: true
|
|
41
|
+
help: {id: 'Dashboard Midtrans > Settings > Access Keys. Kunci sandbox (diawali SB-Mid-server-) untuk uji'}
|
|
42
|
+
- name: api_host
|
|
43
|
+
label: {id: Server Core API}
|
|
44
|
+
required: true
|
|
45
|
+
help: {id: 'api.sandbox.midtrans.com untuk uji, api.midtrans.com untuk transaksi nyata'}
|
|
46
|
+
- name: snap_host
|
|
47
|
+
label: {id: Server Snap}
|
|
48
|
+
required: true
|
|
49
|
+
help: {id: 'app.sandbox.midtrans.com untuk uji, app.midtrans.com untuk transaksi nyata'}
|
|
50
|
+
triggers:
|
|
51
|
+
- name: payment_notified
|
|
52
|
+
label: {id: Notifikasi pembayaran Midtrans}
|
|
53
|
+
via: webhook
|
|
54
|
+
verify:
|
|
55
|
+
signature:
|
|
56
|
+
field: signature_key
|
|
57
|
+
alg: sha512
|
|
58
|
+
key: server_key
|
|
59
|
+
concat: ['{body.order_id}', '{body.status_code}', '{body.gross_amount}', '{auth.server_key}']
|
|
60
|
+
confirm:
|
|
61
|
+
action: get_status
|
|
62
|
+
input: {gateway_ref: order_id}
|
|
63
|
+
emit:
|
|
64
|
+
# the order id (signed): stable per payment, the idempotency key and payment.gateway_ref
|
|
65
|
+
gateway_ref: order_id
|
|
66
|
+
# our invoice number: the order id without the ~<attempt> ending of a second or later page (invoice numbers
|
|
67
|
+
# never hold a ~, so replacing the ending anywhere is safe)
|
|
68
|
+
external_id: >-
|
|
69
|
+
order_id.endsWith('~2') ? order_id.replace('~2', '') : order_id.endsWith('~3') ? order_id.replace('~3', '')
|
|
70
|
+
: order_id.endsWith('~4') ? order_id.replace('~4', '') : order_id.endsWith('~5') ? order_id.replace('~5', '')
|
|
71
|
+
: order_id.endsWith('~6') ? order_id.replace('~6', '') : order_id.endsWith('~7') ? order_id.replace('~7', '')
|
|
72
|
+
: order_id.endsWith('~8') ? order_id.replace('~8', '') : order_id.endsWith('~9') ? order_id.replace('~9', '')
|
|
73
|
+
: order_id
|
|
74
|
+
# gross_amount (signed, and equal to what Midtrans reports when paid) is a text with two decimals ("750000.00")
|
|
75
|
+
paid_amount: gross_amount
|
|
76
|
+
# the status as Midtrans reports it now, not as the notification says
|
|
77
|
+
status: confirmed.status
|
|
78
|
+
status_code: status_code
|
|
79
|
+
# paid only when Midtrans confirms it: status code 200, settlement (or capture with fraud status accept) for this
|
|
80
|
+
# order id and this amount
|
|
81
|
+
paid: "confirmed.paid == true && confirmed.gateway_ref == order_id && confirmed.paid_amount == gross_amount"
|
|
82
|
+
# a refund made in the Midtrans dashboard: money out of the Midtrans balance, never money in
|
|
83
|
+
refunded: "confirmed.status == 'refund' || confirmed.status == 'partial_refund'"
|
|
84
|
+
# Midtrans's payment_type (qris, bank_transfer, echannel, gopay, ...); flows map it to payment.method
|
|
85
|
+
channel: confirmed.channel
|
|
86
|
+
transaction_id: confirmed.transaction_id
|
|
87
|
+
refund_amount: confirmed.refund_amount
|
|
88
|
+
# not signed and not confirmed, for people to read only
|
|
89
|
+
paid_at: transaction_time
|
|
90
|
+
actions:
|
|
91
|
+
- name: create_snap
|
|
92
|
+
label: {id: Buat halaman bayar Midtrans}
|
|
93
|
+
request:
|
|
94
|
+
method: POST
|
|
95
|
+
url: https://{auth.snap_host}/snap/v1/transactions
|
|
96
|
+
body:
|
|
97
|
+
transaction_details:
|
|
98
|
+
order_id: '{input.order_id}'
|
|
99
|
+
gross_amount: '{input.amount}'
|
|
100
|
+
enabled_payments: '{input.methods}'
|
|
101
|
+
expiry:
|
|
102
|
+
unit: minutes
|
|
103
|
+
duration: '{input.due_minutes}'
|
|
104
|
+
customer_details:
|
|
105
|
+
first_name: '{input.customer_name}'
|
|
106
|
+
phone: '{input.customer_phone}'
|
|
107
|
+
callbacks:
|
|
108
|
+
finish: '{input.return_url}'
|
|
109
|
+
input:
|
|
110
|
+
- {name: external_id, type: data, required: true, help: {id: 'Nomor faktur (huruf, angka, - _ . ; maks 48), kembali sebagai external_id. Bayar dicatat ke faktur saja'}}
|
|
111
|
+
- {name: amount, type: currency, required: true, help: {id: Rupiah utuh}}
|
|
112
|
+
- {name: methods, type: json, default: "['other_qris', 'gopay', 'bca_va', 'bni_va', 'bri_va', 'permata_va']", help: {id: 'Saluran yang ditawarkan di halaman bayar (enabled_payments Midtrans)'}}
|
|
113
|
+
- {name: due_minutes, type: int, default: '60'}
|
|
114
|
+
- {name: return_url, type: data}
|
|
115
|
+
- {name: customer_name, type: data}
|
|
116
|
+
- {name: customer_phone, type: data}
|
|
117
|
+
# an order id is used once at Midtrans: a new page for the same invoice after the old one expired is the next
|
|
118
|
+
# attempt (2 to 9), sent as <number>~<attempt>
|
|
119
|
+
- {name: attempt, type: int, default: '1', help: {id: 'Naikkan (2 sampai 9) untuk membuat halaman bayar baru setelah yang lama kedaluwarsa'}}
|
|
120
|
+
# derived, leave it out: the invoice number, or <number>~<attempt> from the second attempt on (a request
|
|
121
|
+
# template only fills placeholders, so the order id is worked out here, as a default)
|
|
122
|
+
- {name: order_id, type: data, default: "input.attempt > 1 ? input.external_id + '~' + string(input.attempt) : input.external_id"}
|
|
123
|
+
output:
|
|
124
|
+
payment_url: redirect_url
|
|
125
|
+
token_id: token
|
|
126
|
+
retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
|
|
127
|
+
idempotency: input.external_id + ':' + string(input.amount) + ':' + string(input.attempt)
|
|
128
|
+
- name: charge_qris
|
|
129
|
+
label: {id: Buat QRIS dinamis}
|
|
130
|
+
request:
|
|
131
|
+
method: POST
|
|
132
|
+
url: https://{auth.api_host}/v2/charge
|
|
133
|
+
body:
|
|
134
|
+
payment_type: qris
|
|
135
|
+
transaction_details:
|
|
136
|
+
order_id: '{input.order_id}'
|
|
137
|
+
gross_amount: '{input.amount}'
|
|
138
|
+
qris:
|
|
139
|
+
acquirer: '{input.acquirer}'
|
|
140
|
+
custom_expiry:
|
|
141
|
+
expiry_duration: '{input.due_minutes}'
|
|
142
|
+
unit: minute
|
|
143
|
+
input:
|
|
144
|
+
- {name: external_id, type: data, required: true, help: {id: Nomor faktur penjualan}}
|
|
145
|
+
- {name: amount, type: currency, required: true, help: {id: Rupiah utuh}}
|
|
146
|
+
- {name: acquirer, type: data, default: "'gopay'", help: {id: 'gopay atau airpay shopee, sesuai yang aktif di akun'}}
|
|
147
|
+
- {name: due_minutes, type: int, default: '15'}
|
|
148
|
+
- {name: attempt, type: int, default: '1'}
|
|
149
|
+
- {name: order_id, type: data, default: "input.attempt > 1 ? input.external_id + '~' + string(input.attempt) : input.external_id"}
|
|
150
|
+
output:
|
|
151
|
+
gateway_ref: order_id
|
|
152
|
+
transaction_id: transaction_id
|
|
153
|
+
status: transaction_status
|
|
154
|
+
status_code: status_code
|
|
155
|
+
# the QR as an image (actions[0], generate-qr-code) and, when Midtrans sends it, the QRIS text itself
|
|
156
|
+
qr_url: "size(actions) > 0 ? actions[0].url : null"
|
|
157
|
+
qr_string: "'qr_string' in response ? qr_string : null"
|
|
158
|
+
expires_at: "'expiry_time' in response ? expiry_time : null"
|
|
159
|
+
retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
|
|
160
|
+
idempotency: input.external_id + ':' + string(input.amount) + ':' + string(input.attempt)
|
|
161
|
+
- name: charge_va
|
|
162
|
+
label: {id: Buat virtual account}
|
|
163
|
+
request:
|
|
164
|
+
method: POST
|
|
165
|
+
url: https://{auth.api_host}/v2/charge
|
|
166
|
+
body:
|
|
167
|
+
payment_type: bank_transfer
|
|
168
|
+
transaction_details:
|
|
169
|
+
order_id: '{input.order_id}'
|
|
170
|
+
gross_amount: '{input.amount}'
|
|
171
|
+
bank_transfer:
|
|
172
|
+
bank: '{input.bank}'
|
|
173
|
+
customer_details:
|
|
174
|
+
first_name: '{input.customer_name}'
|
|
175
|
+
custom_expiry:
|
|
176
|
+
expiry_duration: '{input.due_minutes}'
|
|
177
|
+
unit: minute
|
|
178
|
+
input:
|
|
179
|
+
- {name: external_id, type: data, required: true, help: {id: Nomor faktur penjualan}}
|
|
180
|
+
- {name: amount, type: currency, required: true, help: {id: Rupiah utuh}}
|
|
181
|
+
- {name: bank, type: data, required: true, help: {id: 'bca, bni, bri, permata atau cimb'}}
|
|
182
|
+
- {name: customer_name, type: data}
|
|
183
|
+
- {name: due_minutes, type: int, default: '1440'}
|
|
184
|
+
- {name: attempt, type: int, default: '1'}
|
|
185
|
+
- {name: order_id, type: data, default: "input.attempt > 1 ? input.external_id + '~' + string(input.attempt) : input.external_id"}
|
|
186
|
+
output:
|
|
187
|
+
gateway_ref: order_id
|
|
188
|
+
transaction_id: transaction_id
|
|
189
|
+
status: transaction_status
|
|
190
|
+
status_code: status_code
|
|
191
|
+
# BCA, BNI, BRI and CIMB answer with va_numbers; Permata with permata_va_number
|
|
192
|
+
account_number: "'va_numbers' in response && size(va_numbers) > 0 ? va_numbers[0].va_number : ('permata_va_number' in response ? permata_va_number : null)"
|
|
193
|
+
bank_code: "'va_numbers' in response && size(va_numbers) > 0 ? va_numbers[0].bank : ('permata_va_number' in response ? 'permata' : null)"
|
|
194
|
+
expires_at: "'expiry_time' in response ? expiry_time : null"
|
|
195
|
+
retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
|
|
196
|
+
idempotency: input.external_id + ':' + string(input.amount) + ':' + string(input.attempt)
|
|
197
|
+
- name: charge_gopay
|
|
198
|
+
label: {id: Buat tagihan GoPay}
|
|
199
|
+
request:
|
|
200
|
+
method: POST
|
|
201
|
+
url: https://{auth.api_host}/v2/charge
|
|
202
|
+
body:
|
|
203
|
+
payment_type: gopay
|
|
204
|
+
transaction_details:
|
|
205
|
+
order_id: '{input.order_id}'
|
|
206
|
+
gross_amount: '{input.amount}'
|
|
207
|
+
gopay:
|
|
208
|
+
enable_callback: '{input.use_callback}'
|
|
209
|
+
callback_url: '{input.return_url}'
|
|
210
|
+
input:
|
|
211
|
+
- {name: external_id, type: data, required: true, help: {id: Nomor faktur penjualan}}
|
|
212
|
+
- {name: amount, type: currency, required: true, help: {id: Rupiah utuh}}
|
|
213
|
+
- {name: return_url, type: data, help: {id: 'Alamat kembali setelah bayar di aplikasi Gojek'}}
|
|
214
|
+
# derived, leave it out: GoPay returns to return_url only when there is one
|
|
215
|
+
- {name: use_callback, type: check, default: "'return_url' in input && input.return_url != ''"}
|
|
216
|
+
- {name: attempt, type: int, default: '1'}
|
|
217
|
+
- {name: order_id, type: data, default: "input.attempt > 1 ? input.external_id + '~' + string(input.attempt) : input.external_id"}
|
|
218
|
+
output:
|
|
219
|
+
gateway_ref: order_id
|
|
220
|
+
transaction_id: transaction_id
|
|
221
|
+
status: transaction_status
|
|
222
|
+
status_code: status_code
|
|
223
|
+
# actions: generate-qr-code, deeplink-redirect, get-status, cancel
|
|
224
|
+
qr_url: "size(actions) > 0 ? actions[0].url : null"
|
|
225
|
+
deeplink_url: "size(actions) > 1 ? actions[1].url : null"
|
|
226
|
+
retry: {max: 5, backoff: exponential, on: [429, 500, 502, 503]}
|
|
227
|
+
idempotency: input.external_id + ':' + string(input.amount) + ':' + string(input.attempt)
|
|
228
|
+
- name: get_status
|
|
229
|
+
label: {id: Cek status pembayaran}
|
|
230
|
+
request:
|
|
231
|
+
method: GET
|
|
232
|
+
url: https://{auth.api_host}/v2/{input.gateway_ref}/status
|
|
233
|
+
input:
|
|
234
|
+
- {name: gateway_ref, type: data, required: true, help: {id: 'Order id Midtrans (gateway_ref pembayaran)'}}
|
|
235
|
+
output:
|
|
236
|
+
gateway_ref: "'order_id' in response ? order_id : null"
|
|
237
|
+
status: "'transaction_status' in response ? transaction_status : null"
|
|
238
|
+
# 200 settled, 201 pending, 202 denied, 404 no such transaction, 407 expired
|
|
239
|
+
status_code: status_code
|
|
240
|
+
paid: "status_code == '200' && 'transaction_status' in response && (transaction_status == 'settlement' || transaction_status == 'capture') && (!('fraud_status' in response) || fraud_status == 'accept')"
|
|
241
|
+
paid_amount: "'gross_amount' in response ? gross_amount : null"
|
|
242
|
+
channel: "'payment_type' in response ? payment_type : null"
|
|
243
|
+
transaction_id: "'transaction_id' in response ? transaction_id : null"
|
|
244
|
+
refund_amount: "'refund_amount' in response ? refund_amount : null"
|
|
245
|
+
retry: {max: 3, backoff: exponential, on: [429, 500, 502, 503]}
|
|
246
|
+
idempotency: input.gateway_ref
|
|
247
|
+
limits:
|
|
248
|
+
rate: per Midtrans account
|
|
249
|
+
note: {id: 'Biaya per transaksi dipotong Midtrans sebelum settlement. Refund dibuat di dashboard Midtrans'}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status_code": "201",
|
|
3
|
+
"status_message": "GO-PAY billing created",
|
|
4
|
+
"transaction_id": "231c79c5-e39e-4993-86da-000000000011",
|
|
5
|
+
"order_id": "INV-2026-00011",
|
|
6
|
+
"gross_amount": "85000.00",
|
|
7
|
+
"currency": "IDR",
|
|
8
|
+
"payment_type": "gopay",
|
|
9
|
+
"transaction_time": "2026-11-19 10:30:00",
|
|
10
|
+
"transaction_status": "pending",
|
|
11
|
+
"fraud_status": "accept",
|
|
12
|
+
"actions": [
|
|
13
|
+
{
|
|
14
|
+
"name": "generate-qr-code",
|
|
15
|
+
"method": "GET",
|
|
16
|
+
"url": "https://api.sandbox.midtrans.com/v2/gopay/231c79c5-e39e-4993-86da-000000000011/qr-code"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "deeplink-redirect",
|
|
20
|
+
"method": "GET",
|
|
21
|
+
"url": "https://simulator.sandbox.midtrans.com/gopay/partner/app/payment-pin?id=contoh-0011"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "get-status",
|
|
25
|
+
"method": "GET",
|
|
26
|
+
"url": "https://api.sandbox.midtrans.com/v2/231c79c5-e39e-4993-86da-000000000011/status"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "cancel",
|
|
30
|
+
"method": "POST",
|
|
31
|
+
"url": "https://api.sandbox.midtrans.com/v2/231c79c5-e39e-4993-86da-000000000011/cancel"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status_code": "201",
|
|
3
|
+
"status_message": "QRIS transaction is created",
|
|
4
|
+
"transaction_id": "0d8178e1-c6c7-4ab4-81a6-000000000007",
|
|
5
|
+
"order_id": "INV-2026-00007",
|
|
6
|
+
"merchant_id": "G000000001",
|
|
7
|
+
"gross_amount": "750000.00",
|
|
8
|
+
"currency": "IDR",
|
|
9
|
+
"payment_type": "qris",
|
|
10
|
+
"transaction_time": "2026-11-19 10:12:00",
|
|
11
|
+
"transaction_status": "pending",
|
|
12
|
+
"fraud_status": "accept",
|
|
13
|
+
"acquirer": "gopay",
|
|
14
|
+
"actions": [
|
|
15
|
+
{
|
|
16
|
+
"name": "generate-qr-code",
|
|
17
|
+
"method": "GET",
|
|
18
|
+
"url": "https://api.sandbox.midtrans.com/v2/qris/0d8178e1-c6c7-4ab4-81a6-000000000007/qr-code"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"qr_string": "00020101021226620014COM.GO-JEK.WWW011993600914300000000070210G0000000010303UKE51440014ID.CO.QRIS.WWW0215ID10200000000070303UKE5204581253033605405750005802ID5913Tahu Contoh6007BANDUNG61054011162070703A016304ABCD",
|
|
22
|
+
"expiry_time": "2026-11-19 10:27:00"
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status_code": "201",
|
|
3
|
+
"status_message": "Success, Bank Transfer transaction is created",
|
|
4
|
+
"transaction_id": "be03df7d-2f97-4c8c-a53c-000000000008",
|
|
5
|
+
"order_id": "INV-2026-00008",
|
|
6
|
+
"merchant_id": "G000000001",
|
|
7
|
+
"gross_amount": "400000.00",
|
|
8
|
+
"currency": "IDR",
|
|
9
|
+
"payment_type": "bank_transfer",
|
|
10
|
+
"transaction_time": "2026-11-19 10:20:00",
|
|
11
|
+
"transaction_status": "pending",
|
|
12
|
+
"fraud_status": "accept",
|
|
13
|
+
"va_numbers": [
|
|
14
|
+
{
|
|
15
|
+
"bank": "bca",
|
|
16
|
+
"va_number": "812785002530231"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"expiry_time": "2026-11-20 10:20:00"
|
|
20
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"payment_notified.json": {
|
|
3
|
+
"gateway_ref": "INV-2026-00007",
|
|
4
|
+
"external_id": "INV-2026-00007",
|
|
5
|
+
"paid_amount": "750000.00",
|
|
6
|
+
"status": "settlement",
|
|
7
|
+
"status_code": "200",
|
|
8
|
+
"paid": true,
|
|
9
|
+
"refunded": false,
|
|
10
|
+
"channel": "qris",
|
|
11
|
+
"refund_amount": null
|
|
12
|
+
},
|
|
13
|
+
"payment_notified_pending.json": {
|
|
14
|
+
"external_id": "INV-2026-00008",
|
|
15
|
+
"paid": false,
|
|
16
|
+
"refunded": false,
|
|
17
|
+
"channel": "bank_transfer"
|
|
18
|
+
},
|
|
19
|
+
"payment_notified_va.json": {
|
|
20
|
+
"gateway_ref": "INV-2026-00008~2",
|
|
21
|
+
"external_id": "INV-2026-00008",
|
|
22
|
+
"paid_amount": "400000.00",
|
|
23
|
+
"paid": true,
|
|
24
|
+
"channel": "bank_transfer"
|
|
25
|
+
},
|
|
26
|
+
"payment_notified_expire.json": {
|
|
27
|
+
"status": "expire",
|
|
28
|
+
"status_code": "407",
|
|
29
|
+
"paid": false,
|
|
30
|
+
"refunded": false
|
|
31
|
+
},
|
|
32
|
+
"payment_notified_refund.json": {
|
|
33
|
+
"gateway_ref": "INV-2026-00007",
|
|
34
|
+
"paid": false,
|
|
35
|
+
"refunded": true,
|
|
36
|
+
"refund_amount": "750000.00"
|
|
37
|
+
},
|
|
38
|
+
"payment_notified_partial_refund.json": {
|
|
39
|
+
"paid": false,
|
|
40
|
+
"refunded": true,
|
|
41
|
+
"refund_amount": "250000.00",
|
|
42
|
+
"paid_amount": "750000.00"
|
|
43
|
+
},
|
|
44
|
+
"payment_notified_challenge.json": {
|
|
45
|
+
"status": "capture",
|
|
46
|
+
"paid": false
|
|
47
|
+
},
|
|
48
|
+
"create_snap.json": {
|
|
49
|
+
"payment_url": "https://app.sandbox.midtrans.com/snap/v3/redirection/tok-contoh-0007",
|
|
50
|
+
"token_id": "tok-contoh-0007"
|
|
51
|
+
},
|
|
52
|
+
"charge_qris.json": {
|
|
53
|
+
"gateway_ref": "INV-2026-00007",
|
|
54
|
+
"status": "pending",
|
|
55
|
+
"status_code": "201",
|
|
56
|
+
"qr_url": "https://api.sandbox.midtrans.com/v2/qris/0d8178e1-c6c7-4ab4-81a6-000000000007/qr-code",
|
|
57
|
+
"expires_at": "2026-11-19 10:27:00"
|
|
58
|
+
},
|
|
59
|
+
"charge_va.json": {
|
|
60
|
+
"gateway_ref": "INV-2026-00008",
|
|
61
|
+
"account_number": "812785002530231",
|
|
62
|
+
"bank_code": "bca",
|
|
63
|
+
"expires_at": "2026-11-20 10:20:00"
|
|
64
|
+
},
|
|
65
|
+
"charge_gopay.json": {
|
|
66
|
+
"gateway_ref": "INV-2026-00011",
|
|
67
|
+
"deeplink_url": "https://simulator.sandbox.midtrans.com/gopay/partner/app/payment-pin?id=contoh-0011"
|
|
68
|
+
},
|
|
69
|
+
"get_status.json": {
|
|
70
|
+
"gateway_ref": "INV-2026-00007",
|
|
71
|
+
"status": "settlement",
|
|
72
|
+
"status_code": "200",
|
|
73
|
+
"paid": true,
|
|
74
|
+
"paid_amount": "750000.00",
|
|
75
|
+
"channel": "qris",
|
|
76
|
+
"refund_amount": null
|
|
77
|
+
},
|
|
78
|
+
"payment_notified_relabelled.json": {
|
|
79
|
+
"gateway_ref": "INV-2026-00012",
|
|
80
|
+
"status": "cancel",
|
|
81
|
+
"paid": false,
|
|
82
|
+
"refunded": false
|
|
83
|
+
},
|
|
84
|
+
"payment_notified_other_amount.json": {
|
|
85
|
+
"paid": false,
|
|
86
|
+
"paid_amount": "750000.00"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"transaction_time": "2026-11-19 10:12:40",
|
|
3
|
+
"transaction_status": "settlement",
|
|
4
|
+
"transaction_id": "9f1c7a52-3b8e-4d61-a2f4-000000000007",
|
|
5
|
+
"status_message": "Success, transaction is found",
|
|
6
|
+
"status_code": "200",
|
|
7
|
+
"signature_key": "(hex SHA-512, see signature_vector.txt)",
|
|
8
|
+
"payment_type": "qris",
|
|
9
|
+
"order_id": "INV-2026-00007",
|
|
10
|
+
"merchant_id": "G000000001",
|
|
11
|
+
"gross_amount": "750000.00",
|
|
12
|
+
"fraud_status": "accept",
|
|
13
|
+
"currency": "IDR",
|
|
14
|
+
"settlement_time": "2026-11-19 10:13:05"
|
|
15
|
+
}
|