@rangka-os/create 0.5.0-alpha.2 → 0.5.0-alpha.21

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.
Files changed (532) hide show
  1. package/index.js +42 -6
  2. package/package.json +1 -1
  3. package/template/base/apps/crm/app.rk +2 -0
  4. package/template/base/apps/crm/processes/lead_to_cash.rk +8 -0
  5. package/template/base/apps/dapur/app.rk +35 -0
  6. package/template/base/apps/dapur/dashboards/dapur_hari_ini.rk +26 -0
  7. package/template/base/apps/faktur_piutang/app.rk +31 -0
  8. package/template/base/apps/faktur_piutang/dashboards/piutang_ringkas.rk +88 -0
  9. package/template/base/apps/fnb_cabang/app.rk +11 -6
  10. package/template/base/apps/fnb_cabang/dashboards/fnb_overview.rk +38 -14
  11. package/template/base/apps/fnb_cabang/dashboards/outlet_harian.rk +36 -0
  12. package/template/base/apps/fnb_cabang/dashboards/stock_recap.rk +19 -16
  13. package/template/base/apps/grosir_distribusi/app.rk +57 -0
  14. package/template/base/apps/grosir_distribusi/dashboards/grosir_ar.rk +66 -0
  15. package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +91 -0
  16. package/template/base/apps/grosir_distribusi/dashboards/gudang_harian.rk +33 -0
  17. package/template/base/apps/grosir_distribusi/dashboards/salesman_harian.rk +51 -0
  18. package/template/base/apps/jasa_proyek/app.rk +24 -5
  19. package/template/base/apps/jasa_proyek/dashboards/absen_saya.rk +15 -0
  20. package/template/base/apps/jasa_proyek/dashboards/jasa_overview.rk +65 -38
  21. package/template/base/apps/jasa_proyek/dashboards/project_margin.rk +94 -0
  22. package/template/base/apps/jasa_proyek/dashboards/rekap_absen.rk +18 -0
  23. package/template/base/apps/jasa_proyek/processes/quote_to_cash.rk +10 -0
  24. package/template/base/apps/kasir/app.rk +38 -0
  25. package/template/base/apps/kasir/dashboards/kasir_ringkas.rk +20 -0
  26. package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +80 -0
  27. package/template/base/apps/kelas_kursus/app.rk +32 -0
  28. package/template/base/apps/kelas_kursus/dashboards/kelas_saya.rk +41 -0
  29. package/template/base/apps/kelas_kursus/dashboards/kursus_ringkas.rk +67 -0
  30. package/template/base/apps/langganan_jasa/app.rk +39 -0
  31. package/template/base/apps/langganan_jasa/dashboards/langganan_ringkas.rk +167 -0
  32. package/template/base/apps/langganan_jasa/dashboards/penagihan_saya.rk +54 -0
  33. package/template/base/apps/mutasi_bank/app.rk +22 -0
  34. package/template/base/apps/pajak/app.rk +25 -0
  35. package/template/base/apps/pembelian_pemasok/app.rk +23 -0
  36. package/template/base/apps/pembukuan/app.rk +19 -0
  37. package/template/base/apps/penjualan_harian/app.rk +34 -0
  38. package/template/base/apps/penjualan_harian/dashboards/penjualan_ringkas.rk +87 -0
  39. package/template/base/apps/produksi_pabrik/app.rk +54 -0
  40. package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +101 -0
  41. package/template/base/apps/produksi_pabrik/dashboards/produksi_upah.rk +39 -0
  42. package/template/base/apps/ritel_cabang/app.rk +61 -0
  43. package/template/base/apps/ritel_cabang/dashboards/ritel_overview.rk +137 -0
  44. package/template/base/apps/ritel_cabang/dashboards/ritel_stock.rk +147 -0
  45. package/template/base/apps/ritel_cabang/dashboards/ritel_tax.rk +76 -0
  46. package/template/base/apps/sewa_alat/app.rk +36 -0
  47. package/template/base/apps/sewa_alat/dashboards/alat_hari_ini.rk +90 -0
  48. package/template/base/apps/sewa_alat/dashboards/sewa_ringkas.rk +86 -0
  49. package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/SKILL.md +24 -0
  50. package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/first-day.json +162 -0
  51. package/template/base/apps/stok_outlet/app.rk +34 -0
  52. package/template/base/apps/stok_outlet/dashboards/outlet_hari_ini.rk +33 -0
  53. package/template/base/apps/stok_outlet/dashboards/stok_ringkas.rk +50 -0
  54. package/template/base/connectors/biteship/connector.rk +246 -0
  55. package/template/base/connectors/biteship/fixtures/cancel_order.json +1 -0
  56. package/template/base/connectors/biteship/fixtures/create_order.json +8 -0
  57. package/template/base/connectors/biteship/fixtures/expect.json +9 -0
  58. package/template/base/connectors/biteship/fixtures/get_order.json +2 -0
  59. package/template/base/connectors/biteship/fixtures/get_rates.json +7 -0
  60. package/template/base/connectors/biteship/fixtures/get_tracking.json +7 -0
  61. package/template/base/connectors/biteship/fixtures/order_price.json +11 -0
  62. package/template/base/connectors/biteship/fixtures/order_status.json +15 -0
  63. package/template/base/connectors/biteship/fixtures/order_status_cancelled.json +15 -0
  64. package/template/base/connectors/biteship/fixtures/order_waybill.json +7 -0
  65. package/template/base/connectors/biteship/fixtures/search_areas.json +1 -0
  66. package/template/base/connectors/doku/connector.rk +128 -0
  67. package/template/base/connectors/doku/fixtures/create_checkout.json +6 -0
  68. package/template/base/connectors/doku/fixtures/expect.json +38 -0
  69. package/template/base/connectors/doku/fixtures/payment_notified.json +5 -0
  70. package/template/base/connectors/doku/fixtures/payment_notified_failed.json +3 -0
  71. package/template/base/connectors/doku/fixtures/payment_notified_no_type.json +3 -0
  72. package/template/base/connectors/doku/fixtures/payment_notified_null_type.json +3 -0
  73. package/template/base/connectors/doku/fixtures/payment_notified_refund.json +3 -0
  74. package/template/base/connectors/doku/mock/doku_mock.py +217 -0
  75. package/template/base/connectors/loyverse/connector.rk +98 -0
  76. package/template/base/connectors/moka/connector.rk +121 -0
  77. package/template/base/connectors/moka/fixtures/expect.json +44 -0
  78. package/template/base/connectors/moka/fixtures/latest_transactions.json +79 -0
  79. package/template/base/connectors/moka/fixtures/list_items.json +4 -0
  80. package/template/base/connectors/moka/fixtures/list_outlets.json +4 -0
  81. package/template/base/connectors/moka/fixtures/transaction_created.json +44 -0
  82. package/template/base/connectors/moka/fixtures/transaction_created_refund.json +39 -0
  83. package/template/base/connectors/moka/fixtures/transaction_created_refund_later.json +51 -0
  84. package/template/base/connectors/moka/mock/moka_mock.py +210 -0
  85. package/template/base/connectors/whatsapp_business/connector.rk +22 -1
  86. package/template/base/connectors/whatsapp_business/templates.md +32 -0
  87. package/template/base/connectors/xendit/connector.rk +184 -0
  88. package/template/base/connectors/xendit/mock/xendit_mock.py +231 -0
  89. package/template/base/modules/accounting/flows/financial_report_compute.rk +47 -0
  90. package/template/base/modules/accounting/flows/financial_report_recompute.rk +47 -0
  91. package/template/base/modules/accounting/flows/gl_cash_advance_post.rk +33 -0
  92. package/template/base/modules/accounting/flows/gl_cash_advance_reverse.rk +194 -0
  93. package/template/base/modules/accounting/flows/gl_delivery_note_post.rk +37 -0
  94. package/template/base/modules/accounting/flows/gl_delivery_note_reverse.rk +194 -0
  95. package/template/base/modules/accounting/flows/gl_goods_receipt_post.rk +41 -0
  96. package/template/base/modules/accounting/flows/gl_goods_receipt_reverse.rk +194 -0
  97. package/template/base/modules/accounting/flows/gl_opening_balance_post.rk +132 -0
  98. package/template/base/modules/accounting/flows/gl_opening_balance_reverse.rk +194 -0
  99. package/template/base/modules/accounting/flows/gl_outlet_return_post.rk +38 -0
  100. package/template/base/modules/accounting/flows/gl_outlet_return_reverse.rk +194 -0
  101. package/template/base/modules/accounting/flows/gl_outlet_sales_post.rk +95 -0
  102. package/template/base/modules/accounting/flows/gl_outlet_sales_reverse.rk +194 -0
  103. package/template/base/modules/accounting/flows/gl_outlet_takings_post.rk +71 -0
  104. package/template/base/modules/accounting/flows/gl_outlet_takings_reverse.rk +194 -0
  105. package/template/base/modules/accounting/flows/gl_payment_post.rk +63 -0
  106. package/template/base/modules/accounting/flows/gl_payment_reverse.rk +194 -0
  107. package/template/base/modules/accounting/flows/gl_payroll_close_post.rk +89 -0
  108. package/template/base/modules/accounting/flows/gl_payroll_close_reverse.rk +194 -0
  109. package/template/base/modules/accounting/flows/gl_pos_sale_post.rk +95 -0
  110. package/template/base/modules/accounting/flows/gl_pos_sale_reverse.rk +194 -0
  111. package/template/base/modules/accounting/flows/gl_pos_shift_close_post.rk +59 -0
  112. package/template/base/modules/accounting/flows/gl_pos_shift_close_reverse.rk +194 -0
  113. package/template/base/modules/accounting/flows/gl_production_batch_post.rk +62 -0
  114. package/template/base/modules/accounting/flows/gl_production_batch_reverse.rk +194 -0
  115. package/template/base/modules/accounting/flows/gl_project_expense_post.rk +64 -0
  116. package/template/base/modules/accounting/flows/gl_project_expense_reverse.rk +194 -0
  117. package/template/base/modules/accounting/flows/gl_rental_booking_post.rk +35 -0
  118. package/template/base/modules/accounting/flows/gl_rental_booking_reverse.rk +194 -0
  119. package/template/base/modules/accounting/flows/gl_rental_return_post.rk +47 -0
  120. package/template/base/modules/accounting/flows/gl_rental_return_reverse.rk +194 -0
  121. package/template/base/modules/accounting/flows/gl_sales_invoice_post.rk +95 -0
  122. package/template/base/modules/accounting/flows/gl_sales_invoice_reverse.rk +194 -0
  123. package/template/base/modules/accounting/flows/gl_sales_return_post.rk +40 -0
  124. package/template/base/modules/accounting/flows/gl_sales_return_reverse.rk +194 -0
  125. package/template/base/modules/accounting/flows/gl_stock_adjustment_post.rk +38 -0
  126. package/template/base/modules/accounting/flows/gl_stock_adjustment_reverse.rk +194 -0
  127. package/template/base/modules/accounting/flows/gl_stock_count_post.rk +38 -0
  128. package/template/base/modules/accounting/flows/gl_stock_count_reverse.rk +194 -0
  129. package/template/base/modules/accounting/flows/gl_stock_transfer_post.rk +38 -0
  130. package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_post.rk +38 -0
  131. package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_reverse.rk +194 -0
  132. package/template/base/modules/accounting/flows/gl_stock_transfer_reverse.rk +194 -0
  133. package/template/base/modules/accounting/flows/gl_timesheet_post.rk +35 -0
  134. package/template/base/modules/accounting/flows/gl_timesheet_reverse.rk +194 -0
  135. package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +63 -0
  136. package/template/base/modules/accounting/flows/gl_vendor_bill_reverse.rk +194 -0
  137. package/template/base/modules/accounting/imports/opening_balance_sheet.rk +22 -0
  138. package/template/base/modules/accounting/models/financial_report.rk +85 -0
  139. package/template/base/modules/accounting/models/gl_entry.rk +164 -0
  140. package/template/base/modules/accounting/models/opening_balance.rk +48 -0
  141. package/template/base/modules/accounting/models/period_close.rk +33 -0
  142. package/template/base/modules/accounting/module.rk +16 -0
  143. package/template/base/modules/bank_statement/flows/bank_transaction_booked.rk +12 -0
  144. package/template/base/modules/bank_statement/flows/bank_transaction_booked_released.rk +11 -0
  145. package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +29 -0
  146. package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +61 -0
  147. package/template/base/modules/bank_statement/flows/bank_transaction_link_locked.rk +11 -0
  148. package/template/base/modules/bank_statement/flows/bank_transaction_matched.rk +13 -0
  149. package/template/base/modules/bank_statement/flows/bank_transaction_release.rk +11 -0
  150. package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +73 -0
  151. package/template/base/modules/bank_statement/flows/bank_transaction_unmatched.rk +11 -0
  152. package/template/base/modules/bank_statement/imports/bank_statement_csv.rk +25 -0
  153. package/template/base/modules/bank_statement/models/bank_transaction.rk +147 -0
  154. package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +49 -0
  155. package/template/base/modules/bank_statement/module.rk +12 -0
  156. package/template/base/modules/catalogue/imports/item_list.rk +20 -0
  157. package/template/base/modules/catalogue/imports/item_master.rk +25 -0
  158. package/template/base/modules/catalogue/models/item.rk +81 -1
  159. package/template/base/modules/catalogue/models/item_category.rk +29 -0
  160. package/template/base/modules/catalogue/models/uom.rk +14 -0
  161. package/template/base/modules/catalogue/models/uom_conversion.rk +8 -0
  162. package/template/base/modules/catalogue/module.rk +8 -2
  163. package/template/base/modules/consignment/flows/consignment_bill.rk +39 -0
  164. package/template/base/modules/consignment/flows/consignment_bill_cancelled.rk +14 -0
  165. package/template/base/modules/consignment/models/consignment_settlement.rk +111 -0
  166. package/template/base/modules/consignment/models/consignment_settlement_item.rk +37 -0
  167. package/template/base/modules/consignment/module.rk +15 -0
  168. package/template/base/modules/contacts/imports/customer_list.rk +17 -0
  169. package/template/base/modules/contacts/imports/vendor_list.rk +16 -0
  170. package/template/base/modules/contacts/models/credit_guard.rk +40 -0
  171. package/template/base/modules/contacts/models/customer.rk +144 -2
  172. package/template/base/modules/contacts/models/vendor.rk +51 -2
  173. package/template/base/modules/contacts/module.rk +6 -1
  174. package/template/base/modules/coretax/models/tax_period.rk +89 -0
  175. package/template/base/modules/coretax/module.rk +13 -0
  176. package/template/base/modules/coretax/print/coretax_bupot.rk +31 -0
  177. package/template/base/modules/coretax/print/coretax_bupot.xml +28 -0
  178. package/template/base/modules/coretax/print/coretax_faktur.rk +44 -0
  179. package/template/base/modules/coretax/print/coretax_faktur.xml +74 -0
  180. package/template/base/modules/courses/flows/charge_cancel_guard.rk +23 -0
  181. package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +58 -0
  182. package/template/base/modules/courses/flows/enrollment_seats_on_create.rk +15 -0
  183. package/template/base/modules/courses/flows/enrollment_seats_on_update.rk +35 -0
  184. package/template/base/modules/courses/flows/invoice_course_once.rk +22 -0
  185. package/template/base/modules/courses/flows/invoice_course_tag_lock.rk +16 -0
  186. package/template/base/modules/courses/flows/session_attendance_checked.rk +14 -0
  187. package/template/base/modules/courses/flows/session_fill_attendance.rk +16 -0
  188. package/template/base/modules/courses/flows/session_of_the_day.rk +34 -0
  189. package/template/base/modules/courses/flows/student_billing_on_create.rk +25 -0
  190. package/template/base/modules/courses/models/course_attendance.rk +24 -0
  191. package/template/base/modules/courses/models/course_batch.rk +119 -0
  192. package/template/base/modules/courses/models/course_batch_slot.rk +18 -0
  193. package/template/base/modules/courses/models/course_charge.rk +125 -0
  194. package/template/base/modules/courses/models/course_guard.rk +50 -0
  195. package/template/base/modules/courses/models/course_program.rk +101 -0
  196. package/template/base/modules/courses/models/course_session.rk +94 -0
  197. package/template/base/modules/courses/models/enrollment.rk +136 -0
  198. package/template/base/modules/courses/models/student.rk +68 -0
  199. package/template/base/modules/courses/module.rk +14 -0
  200. package/template/base/modules/courses/roles/instructor.rk +7 -0
  201. package/template/base/modules/courses/screens/absen_kelas.rk +17 -0
  202. package/template/base/modules/currency/module.rk +5 -0
  203. package/template/base/modules/delivery/flows/delivery_cancel_guard.rk +18 -0
  204. package/template/base/modules/delivery/flows/fulfilment_on_delivery_cancelled.rk +21 -0
  205. package/template/base/modules/delivery/flows/fulfilment_on_delivery_submitted.rk +28 -0
  206. package/template/base/modules/delivery/flows/fulfilment_on_invoice_cancelled.rk +22 -0
  207. package/template/base/modules/delivery/flows/fulfilment_on_invoice_submitted.rk +22 -0
  208. package/template/base/modules/delivery/flows/fulfilment_on_order_created.rk +18 -0
  209. package/template/base/modules/delivery/flows/fulfilment_on_order_submitted.rk +16 -0
  210. package/template/base/modules/delivery/flows/fulfilment_on_order_updated.rk +19 -0
  211. package/template/base/modules/delivery/flows/fulfilment_on_return_cancelled.rk +16 -0
  212. package/template/base/modules/delivery/flows/fulfilment_on_return_submitted.rk +16 -0
  213. package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +20 -0
  214. package/template/base/modules/delivery/flows/order_cancel_guard.rk +10 -0
  215. package/template/base/modules/delivery/flows/return_cancel_guard.rk +11 -0
  216. package/template/base/modules/delivery/flows/return_credit_on_payment_cancelled.rk +11 -0
  217. package/template/base/modules/delivery/flows/return_credit_on_payment_submitted.rk +21 -0
  218. package/template/base/modules/delivery/flows/return_credit_on_return_cancelled.rk +11 -0
  219. package/template/base/modules/delivery/flows/return_credit_on_return_submitted.rk +10 -0
  220. package/template/base/modules/delivery/models/delivery_guard.rk +48 -0
  221. package/template/base/modules/delivery/models/delivery_note.rk +101 -0
  222. package/template/base/modules/delivery/models/delivery_note_item.rk +11 -0
  223. package/template/base/modules/delivery/models/order_fulfilment.rk +27 -0
  224. package/template/base/modules/delivery/models/order_fulfilment_item.rk +10 -0
  225. package/template/base/modules/delivery/models/return_credit.rk +23 -0
  226. package/template/base/modules/delivery/models/sales_return.rk +87 -0
  227. package/template/base/modules/delivery/models/sales_return_item.rk +16 -0
  228. package/template/base/modules/delivery/module.rk +16 -0
  229. package/template/base/modules/delivery/print/delivery_note.html +96 -0
  230. package/template/base/modules/delivery/print/delivery_note.rk +9 -0
  231. package/template/base/modules/distribution/flows/credit_on_invoice_cancelled.rk +17 -0
  232. package/template/base/modules/distribution/flows/credit_on_invoice_submitted.rk +17 -0
  233. package/template/base/modules/distribution/flows/credit_on_order_cancelled.rk +17 -0
  234. package/template/base/modules/distribution/flows/credit_on_order_submitted.rk +25 -0
  235. package/template/base/modules/distribution/flows/credit_on_payment_cancelled.rk +17 -0
  236. package/template/base/modules/distribution/flows/credit_on_payment_submitted.rk +17 -0
  237. package/template/base/modules/distribution/flows/giro_bounced.rk +20 -0
  238. package/template/base/modules/distribution/flows/giro_from_payment.rk +21 -0
  239. package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +17 -0
  240. package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +17 -0
  241. package/template/base/modules/distribution/models/giro.rk +79 -0
  242. package/template/base/modules/distribution/module.rk +14 -0
  243. package/template/base/modules/invoicing/flows/invoice_due_digest.rk +12 -0
  244. package/template/base/modules/invoicing/flows/milestone_invoiced.rk +23 -0
  245. package/template/base/modules/invoicing/flows/milestone_reopened.rk +19 -0
  246. package/template/base/modules/invoicing/flows/payment_instruction_on_submit.rk +25 -0
  247. package/template/base/modules/invoicing/flows/project_billed_on_cancel.rk +16 -0
  248. package/template/base/modules/invoicing/flows/project_billed_on_submit.rk +16 -0
  249. package/template/base/modules/invoicing/flows/project_revenue_on_cancel.rk +22 -0
  250. package/template/base/modules/invoicing/flows/project_revenue_on_submit.rk +17 -0
  251. package/template/base/modules/invoicing/flows/sales_invoice_credit_recheck.rk +18 -0
  252. package/template/base/modules/invoicing/models/bank_account.rk +134 -0
  253. package/template/base/modules/invoicing/models/invoice_reminder.rk +83 -0
  254. package/template/base/modules/invoicing/models/payment_instruction.rk +72 -0
  255. package/template/base/modules/invoicing/models/sales_invoice.rk +324 -13
  256. package/template/base/modules/invoicing/models/sales_invoice_item.rk +23 -0
  257. package/template/base/modules/invoicing/module.rk +7 -2
  258. package/template/base/modules/invoicing/print/sales_invoice.html +145 -32
  259. package/template/base/modules/invoicing/print/sales_invoice.rk +7 -0
  260. package/template/base/modules/invoicing/print/sales_invoice_nota.html +71 -0
  261. package/template/base/modules/invoicing/print/sales_invoice_nota.rk +13 -0
  262. package/template/base/modules/invoicing/print/sales_invoice_whatsapp.html +45 -0
  263. package/template/base/modules/invoicing/print/sales_invoice_whatsapp.rk +15 -0
  264. package/template/base/modules/kitchen/flows/kitchen_ticket_on_sale.rk +47 -0
  265. package/template/base/modules/kitchen/flows/kitchen_ticket_on_update.rk +30 -0
  266. package/template/base/modules/kitchen/flows/kitchen_ticket_on_void.rk +23 -0
  267. package/template/base/modules/kitchen/models/kitchen_guard.rk +40 -0
  268. package/template/base/modules/kitchen/models/kitchen_route.rk +26 -0
  269. package/template/base/modules/kitchen/models/kitchen_station.rk +40 -0
  270. package/template/base/modules/kitchen/models/kitchen_ticket.rk +83 -0
  271. package/template/base/modules/kitchen/models/kitchen_ticket_item.rk +10 -0
  272. package/template/base/modules/kitchen/module.rk +18 -0
  273. package/template/base/modules/kitchen/print/kitchen_ticket.html +29 -0
  274. package/template/base/modules/kitchen/print/kitchen_ticket.rk +9 -0
  275. package/template/base/modules/kitchen/roles/kitchen.rk +6 -0
  276. package/template/base/modules/kitchen/screens/dapur.rk +22 -0
  277. package/template/base/modules/orders/models/customer_order.rk +98 -2
  278. package/template/base/modules/orders/models/customer_order_item.rk +29 -0
  279. package/template/base/modules/orders/module.rk +7 -2
  280. package/template/base/modules/outlet_sales/flows/moka_api_opened.rk +30 -0
  281. package/template/base/modules/outlet_sales/flows/moka_daily_sales.rk +78 -0
  282. package/template/base/modules/outlet_sales/flows/moka_held_release.rk +35 -0
  283. package/template/base/modules/outlet_sales/flows/moka_legacy_key_overlap.rk +22 -0
  284. package/template/base/modules/outlet_sales/flows/moka_line_mapped.rk +38 -0
  285. package/template/base/modules/outlet_sales/flows/moka_transaction_refused.rk +15 -0
  286. package/template/base/modules/outlet_sales/flows/moka_transaction_staged.rk +171 -0
  287. package/template/base/modules/outlet_sales/flows/outlet_day_backfill_harian.rk +71 -0
  288. package/template/base/modules/outlet_sales/flows/outlet_day_free_sales.rk +19 -0
  289. package/template/base/modules/outlet_sales/flows/outlet_day_free_takings.rk +19 -0
  290. package/template/base/modules/outlet_sales/flows/outlet_day_on_sales.rk +19 -0
  291. package/template/base/modules/outlet_sales/flows/outlet_day_on_takings.rk +19 -0
  292. package/template/base/modules/outlet_sales/flows/refund_on_return_cancelled.rk +15 -0
  293. package/template/base/modules/outlet_sales/flows/refund_on_return_submitted.rk +26 -0
  294. package/template/base/modules/outlet_sales/flows/refund_on_sales_submitted.rk +14 -0
  295. package/template/base/modules/outlet_sales/flows/sales_cancel_guard.rk +18 -0
  296. package/template/base/modules/outlet_sales/imports/daily_form.rk +3 -1
  297. package/template/base/modules/outlet_sales/imports/loyverse_receipts.rk +28 -0
  298. package/template/base/modules/outlet_sales/imports/moka_item_details.rk +14 -4
  299. package/template/base/modules/outlet_sales/imports/pos_sales_file.rk +28 -0
  300. package/template/base/modules/outlet_sales/imports/takings_file.rk +23 -0
  301. package/template/base/modules/outlet_sales/models/moka_sale_line.rk +66 -0
  302. package/template/base/modules/outlet_sales/models/moka_transaction.rk +26 -0
  303. package/template/base/modules/outlet_sales/models/outlet_return.rk +66 -0
  304. package/template/base/modules/outlet_sales/models/outlet_return_item.rk +7 -0
  305. package/template/base/modules/outlet_sales/models/outlet_sales.rk +79 -7
  306. package/template/base/modules/outlet_sales/models/outlet_sales_guard.rk +40 -0
  307. package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +2 -0
  308. package/template/base/modules/outlet_sales/models/outlet_takings.rk +85 -0
  309. package/template/base/modules/outlet_sales/models/outlet_takings_line.rk +37 -0
  310. package/template/base/modules/outlet_sales/models/pos_refund.rk +36 -0
  311. package/template/base/modules/outlet_sales/models/pos_refund_item.rk +9 -0
  312. package/template/base/modules/outlet_sales/module.rk +7 -2
  313. package/template/base/modules/outlets/models/outlet.rk +57 -0
  314. package/template/base/modules/outlets/models/outlet_day.rk +30 -0
  315. package/template/base/modules/outlets/models/outlet_day_backfill.rk +25 -0
  316. package/template/base/modules/outlets/module.rk +7 -2
  317. package/template/base/modules/payments/flows/payment_from_doku.rk +73 -0
  318. package/template/base/modules/payments/flows/payment_from_xendit_invoice.rk +59 -0
  319. package/template/base/modules/payments/flows/payment_from_xendit_qr.rk +59 -0
  320. package/template/base/modules/payments/flows/payment_from_xendit_va.rk +59 -0
  321. package/template/base/modules/payments/flows/payment_gateway_claim_created.rk +19 -0
  322. package/template/base/modules/payments/flows/payment_gateway_claim_submitted.rk +19 -0
  323. package/template/base/modules/payments/flows/payment_gateway_release.rk +12 -0
  324. package/template/base/modules/payments/flows/payment_refund_from_doku.rk +14 -0
  325. package/template/base/modules/payments/models/gateway_ref_claim.rk +42 -0
  326. package/template/base/modules/payments/models/payment.rk +62 -1
  327. package/template/base/modules/payments/models/withholding.rk +16 -2
  328. package/template/base/modules/payments/module.rk +7 -2
  329. package/template/base/modules/payments/print/statement.html +1 -1
  330. package/template/base/modules/payroll/flows/cash_advance_cancel_guard.rk +15 -0
  331. package/template/base/modules/payroll/flows/invoice_payroll_once.rk +20 -0
  332. package/template/base/modules/payroll/flows/invoice_payroll_tag_lock.rk +13 -0
  333. package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +35 -0
  334. package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +66 -0
  335. package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +14 -0
  336. package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +14 -0
  337. package/template/base/modules/payroll/flows/payroll_totals_on_payslip_cancel.rk +29 -0
  338. package/template/base/modules/payroll/flows/payroll_totals_on_payslip_submit.rk +29 -0
  339. package/template/base/modules/payroll/flows/payslip_advance_guard.rk +23 -0
  340. package/template/base/modules/payroll/flows/payslip_cancel_guard.rk +14 -0
  341. package/template/base/modules/payroll/flows/payslip_casual_guard.rk +19 -0
  342. package/template/base/modules/payroll/flows/payslip_from_recap.rk +76 -0
  343. package/template/base/modules/payroll/flows/payslip_month_guard_created.rk +16 -0
  344. package/template/base/modules/payroll/flows/payslip_month_guard_submitted.rk +16 -0
  345. package/template/base/modules/payroll/flows/payslip_order_guard_cancelled.rk +15 -0
  346. package/template/base/modules/payroll/flows/payslip_order_guard_submitted.rk +15 -0
  347. package/template/base/modules/payroll/flows/payslip_pay_overlap_guard.rk +15 -0
  348. package/template/base/modules/payroll/flows/payslip_ytd_guard.rk +35 -0
  349. package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +49 -0
  350. package/template/base/modules/payroll/flows/recap_cancel_guard.rk +15 -0
  351. package/template/base/modules/payroll/models/cash_advance.rk +53 -0
  352. package/template/base/modules/payroll/models/payroll_close.rk +80 -0
  353. package/template/base/modules/payroll/models/payroll_guard.rk +89 -0
  354. package/template/base/modules/payroll/models/payroll_profile.rk +146 -0
  355. package/template/base/modules/payroll/models/payroll_run.rk +220 -0
  356. package/template/base/modules/payroll/models/payslip.rk +370 -0
  357. package/template/base/modules/payroll/module.rk +13 -0
  358. package/template/base/modules/payroll/print/payslip.html +54 -0
  359. package/template/base/modules/payroll/print/payslip.rk +7 -0
  360. package/template/base/modules/pipeline/module.rk +5 -0
  361. package/template/base/modules/pos/flows/outlet_day_backfill_kasir.rk +61 -0
  362. package/template/base/modules/pos/flows/pos_daily_form_guard.rk +18 -0
  363. package/template/base/modules/pos/flows/pos_sale_on_cancel.rk +42 -0
  364. package/template/base/modules/pos/flows/pos_sale_on_submit.rk +60 -0
  365. package/template/base/modules/pos/flows/pos_shift_close_on_cancel.rk +26 -0
  366. package/template/base/modules/pos/flows/pos_shift_close_on_submit.rk +23 -0
  367. package/template/base/modules/pos/flows/pos_shift_on_create.rk +21 -0
  368. package/template/base/modules/pos/flows/pos_shift_on_update.rk +10 -0
  369. package/template/base/modules/pos/flows/pos_takings_guard.rk +28 -0
  370. package/template/base/modules/pos/models/pos_guard.rk +76 -0
  371. package/template/base/modules/pos/models/pos_payment.rk +17 -0
  372. package/template/base/modules/pos/models/pos_sale.rk +226 -0
  373. package/template/base/modules/pos/models/pos_sale_item.rk +46 -0
  374. package/template/base/modules/pos/models/pos_shift.rk +92 -0
  375. package/template/base/modules/pos/models/pos_shift_close.rk +77 -0
  376. package/template/base/modules/pos/module.rk +22 -0
  377. package/template/base/modules/pos/print/pos_receipt.html +50 -0
  378. package/template/base/modules/pos/print/pos_receipt.rk +9 -0
  379. package/template/base/modules/pos/screens/kasir.rk +41 -0
  380. package/template/base/modules/procurement/flows/project_vendor_cost_on_cancel.rk +22 -0
  381. package/template/base/modules/procurement/flows/project_vendor_cost_on_submit.rk +17 -0
  382. package/template/base/modules/procurement/imports/opening_stock.rk +25 -0
  383. package/template/base/modules/procurement/models/goods_receipt.rk +3 -1
  384. package/template/base/modules/procurement/models/purchase_order.rk +22 -8
  385. package/template/base/modules/procurement/models/purchase_request.rk +12 -1
  386. package/template/base/modules/procurement/models/purchase_request_item.rk +2 -0
  387. package/template/base/modules/procurement/models/vendor_bill.rk +117 -4
  388. package/template/base/modules/procurement/module.rk +7 -2
  389. package/template/base/modules/production/flows/batch_cancel_guard.rk +12 -0
  390. package/template/base/modules/production/flows/batch_from_bom.rk +19 -0
  391. package/template/base/modules/production/flows/wage_sheet_on_batch_cancelled.rk +14 -0
  392. package/template/base/modules/production/flows/wage_sheet_on_batch_submitted.rk +12 -0
  393. package/template/base/modules/production/flows/work_order_materials_created.rk +20 -0
  394. package/template/base/modules/production/flows/work_order_materials_updated.rk +20 -0
  395. package/template/base/modules/production/models/bom.rk +68 -0
  396. package/template/base/modules/production/models/bom_byproduct.rk +7 -0
  397. package/template/base/modules/production/models/bom_line.rk +11 -0
  398. package/template/base/modules/production/models/production_batch.rk +153 -0
  399. package/template/base/modules/production/models/production_guard.rk +23 -0
  400. package/template/base/modules/production/models/production_labour.rk +10 -0
  401. package/template/base/modules/production/models/production_material.rk +8 -0
  402. package/template/base/modules/production/models/production_output.rk +8 -0
  403. package/template/base/modules/production/models/production_stage.rk +19 -0
  404. package/template/base/modules/production/models/wage_line.rk +15 -0
  405. package/template/base/modules/production/models/wage_sheet.rk +28 -0
  406. package/template/base/modules/production/models/work_order.rk +63 -0
  407. package/template/base/modules/production/models/work_order_material.rk +8 -0
  408. package/template/base/modules/production/module.rk +17 -0
  409. package/template/base/modules/production/print/wage_sheet.html +75 -0
  410. package/template/base/modules/production/print/wage_sheet.rk +9 -0
  411. package/template/base/modules/projects/flows/attendance_close_cancel_guard.rk +15 -0
  412. package/template/base/modules/projects/flows/attendance_close_on_submit.rk +68 -0
  413. package/template/base/modules/projects/flows/attendance_log_cancel_guard.rk +14 -0
  414. package/template/base/modules/projects/flows/attendance_log_guard_created.rk +17 -0
  415. package/template/base/modules/projects/flows/attendance_log_guard_submitted.rk +38 -0
  416. package/template/base/modules/projects/flows/attendance_log_guard_updated.rk +15 -0
  417. package/template/base/modules/projects/flows/milestone_back_on_acceptance_cancel.rk +15 -0
  418. package/template/base/modules/projects/flows/milestone_lock_on_update.rk +16 -0
  419. package/template/base/modules/projects/flows/milestone_ready_on_acceptance.rk +40 -0
  420. package/template/base/modules/projects/flows/milestone_scheduled_on_create.rk +14 -0
  421. package/template/base/modules/projects/flows/milestone_scheduled_on_update.rk +27 -0
  422. package/template/base/modules/projects/flows/project_expense_on_cancel.rk +21 -0
  423. package/template/base/modules/projects/flows/project_expense_on_submit.rk +16 -0
  424. package/template/base/modules/projects/flows/project_labor_on_cancel.rk +22 -0
  425. package/template/base/modules/projects/flows/project_labor_on_submit.rk +17 -0
  426. package/template/base/modules/projects/flows/project_terms_lock.rk +26 -0
  427. package/template/base/modules/projects/flows/timesheet_assignment_on_create.rk +28 -0
  428. package/template/base/modules/projects/flows/timesheet_attendance_overlap_guard.rk +20 -0
  429. package/template/base/modules/projects/flows/vendor_bill_cancel_guard.rk +15 -0
  430. package/template/base/modules/projects/flows/work_site_supervisor_changed.rk +19 -0
  431. package/template/base/modules/projects/flows/worker_employee_changed.rk +19 -0
  432. package/template/base/modules/projects/imports/attendance_recap.rk +23 -0
  433. package/template/base/modules/projects/imports/billing_milestone.rk +20 -0
  434. package/template/base/modules/projects/models/assignment.rk +65 -3
  435. package/template/base/modules/projects/models/attendance_close.rk +67 -0
  436. package/template/base/modules/projects/models/attendance_guard.rk +57 -0
  437. package/template/base/modules/projects/models/attendance_log.rk +275 -0
  438. package/template/base/modules/projects/models/billing_milestone.rk +217 -0
  439. package/template/base/modules/projects/models/project.rk +76 -2
  440. package/template/base/modules/projects/models/project_expense.rk +121 -0
  441. package/template/base/modules/projects/models/project_guard.rk +27 -0
  442. package/template/base/modules/projects/models/project_ledger.rk +146 -0
  443. package/template/base/modules/projects/models/timesheet.rk +100 -10
  444. package/template/base/modules/projects/models/work_site.rk +83 -0
  445. package/template/base/modules/projects/module.rk +8 -3
  446. package/template/base/modules/projects/roles/field_worker.rk +10 -0
  447. package/template/base/modules/projects/roles/site_supervisor.rk +8 -0
  448. package/template/base/modules/projects/screens/absen.rk +23 -0
  449. package/template/base/modules/quotation/models/quotation.rk +20 -4
  450. package/template/base/modules/quotation/models/quotation_item.rk +13 -0
  451. package/template/base/modules/quotation/module.rk +6 -1
  452. package/template/base/modules/quotation/print/quotation.html +17 -3
  453. package/template/base/modules/rental/flows/rental_booking_on_cancel.rk +19 -0
  454. package/template/base/modules/rental/flows/rental_booking_on_submit.rk +45 -0
  455. package/template/base/modules/rental/flows/rental_checkout_on_cancel.rk +24 -0
  456. package/template/base/modules/rental/flows/rental_checkout_on_submit.rk +33 -0
  457. package/template/base/modules/rental/flows/rental_invoice_once.rk +20 -0
  458. package/template/base/modules/rental/flows/rental_invoice_tag_lock.rk +12 -0
  459. package/template/base/modules/rental/flows/rental_return_on_cancel.rk +28 -0
  460. package/template/base/modules/rental/flows/rental_return_on_submit.rk +45 -0
  461. package/template/base/modules/rental/models/rental_booking.rk +124 -0
  462. package/template/base/modules/rental/models/rental_checkout.rk +91 -0
  463. package/template/base/modules/rental/models/rental_checkout_unit.rk +22 -0
  464. package/template/base/modules/rental/models/rental_guard.rk +93 -0
  465. package/template/base/modules/rental/models/rental_item.rk +83 -0
  466. package/template/base/modules/rental/models/rental_return.rk +134 -0
  467. package/template/base/modules/rental/models/rental_return_unit.rk +29 -0
  468. package/template/base/modules/rental/models/rental_schedule.rk +59 -0
  469. package/template/base/modules/rental/models/rental_unit.rk +80 -0
  470. package/template/base/modules/rental/module.rk +25 -0
  471. package/template/base/modules/rental/print/rental_bast_in.html +107 -0
  472. package/template/base/modules/rental/print/rental_bast_in.rk +9 -0
  473. package/template/base/modules/rental/print/rental_bast_out.html +98 -0
  474. package/template/base/modules/rental/print/rental_bast_out.rk +11 -0
  475. package/template/base/modules/rental/roles/rental_staff.rk +7 -0
  476. package/template/base/modules/rental/screens/alat_keluar.rk +19 -0
  477. package/template/base/modules/rental/screens/alat_kembali.rk +19 -0
  478. package/template/base/modules/rental/screens/jadwal_alat.rk +21 -0
  479. package/template/base/modules/stock/flows/adjustment_value_backfill.rk +95 -0
  480. package/template/base/modules/stock/flows/adjustment_value_on_cancel.rk +19 -0
  481. package/template/base/modules/stock/flows/adjustment_value_on_submit.rk +17 -0
  482. package/template/base/modules/stock/models/recipe.rk +8 -0
  483. package/template/base/modules/stock/models/stock_adjustment.rk +1 -0
  484. package/template/base/modules/stock/models/stock_adjustment_value.rk +80 -0
  485. package/template/base/modules/stock/models/stock_balance.rk +6 -2
  486. package/template/base/modules/stock/models/stock_count.rk +2 -0
  487. package/template/base/modules/stock/models/stock_move.rk +17 -5
  488. package/template/base/modules/stock/models/stock_transfer_item.rk +1 -1
  489. package/template/base/modules/stock/module.rk +7 -2
  490. package/template/base/modules/subscriptions/flows/collector_deposit_on_submit.rk +57 -0
  491. package/template/base/modules/subscriptions/flows/deposit_payment_kept.rk +17 -0
  492. package/template/base/modules/subscriptions/flows/deposit_payment_not_cancelled.rk +14 -0
  493. package/template/base/modules/subscriptions/flows/deposit_payment_not_deleted.rk +14 -0
  494. package/template/base/modules/subscriptions/flows/field_collection_cap_created.rk +24 -0
  495. package/template/base/modules/subscriptions/flows/field_collection_cap_updated.rk +24 -0
  496. package/template/base/modules/subscriptions/flows/field_collection_locked.rk +12 -0
  497. package/template/base/modules/subscriptions/flows/field_collection_not_deleted.rk +10 -0
  498. package/template/base/modules/subscriptions/flows/invoice_subscription_kept.rk +19 -0
  499. package/template/base/modules/subscriptions/flows/invoice_subscription_once.rk +34 -0
  500. package/template/base/modules/subscriptions/flows/invoice_subscription_tag_lock.rk +13 -0
  501. package/template/base/modules/subscriptions/flows/service_area_collector.rk +14 -0
  502. package/template/base/modules/subscriptions/flows/subscription_billing.rk +79 -0
  503. package/template/base/modules/subscriptions/flows/subscription_dunning.rk +81 -0
  504. package/template/base/modules/subscriptions/flows/subscription_extra_locked.rk +14 -0
  505. package/template/base/modules/subscriptions/flows/subscription_status_on_payment.rk +48 -0
  506. package/template/base/modules/subscriptions/models/collection_visit.rk +47 -0
  507. package/template/base/modules/subscriptions/models/collector_deposit.rk +36 -0
  508. package/template/base/modules/subscriptions/models/field_collection.rk +42 -0
  509. package/template/base/modules/subscriptions/models/service_area.rk +19 -0
  510. package/template/base/modules/subscriptions/models/subscription.rk +235 -0
  511. package/template/base/modules/subscriptions/models/subscription_bill.rk +48 -0
  512. package/template/base/modules/subscriptions/models/subscription_extra.rk +50 -0
  513. package/template/base/modules/subscriptions/models/subscription_guard.rk +65 -0
  514. package/template/base/modules/subscriptions/models/subscription_month.rk +29 -0
  515. package/template/base/modules/subscriptions/models/subscription_plan.rk +75 -0
  516. package/template/base/modules/subscriptions/models/subscription_status_log.rk +27 -0
  517. package/template/base/modules/subscriptions/module.rk +18 -0
  518. package/template/base/modules/subscriptions/roles/collector.rk +7 -0
  519. package/template/base/modules/subscriptions/screens/catat_tagih.rk +18 -0
  520. package/template/base/modules/subscriptions/screens/rute_tagih.rk +25 -0
  521. package/template/base/modules/tax_id/module.rk +5 -0
  522. package/template/base/modules/users/models/user.rk +35 -4
  523. package/template/base/modules/users/models/user_outlet.rk +6 -0
  524. package/template/base/modules/users/module.rk +8 -2
  525. package/template/base/modules/users/roles/cashier.rk +8 -0
  526. package/template/base/modules/users/roles/course_admin.rk +4 -0
  527. package/template/base/modules/users/roles/field_sales.rk +7 -0
  528. package/template/base/modules/workforce/imports/worker_list.rk +21 -0
  529. package/template/base/modules/workforce/models/certification.rk +1 -2
  530. package/template/base/modules/workforce/models/worker.rk +54 -4
  531. package/template/base/modules/workforce/module.rk +6 -1
  532. package/template/demo/fixtures/demo.rk +2 -2
@@ -0,0 +1,235 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription
3
+ label: {id: Langganan, en: Subscription}
4
+ icon: repeat
5
+ naming: LGN-{#####}
6
+ title_field: customer_name
7
+ # One client's subscription to a plan, on its own cycle.
8
+ # - Cycle: monthly, every 3 months, yearly, or N months paid in advance; cycle_months is 1, 3, 12 or N. The cycle and
9
+ # the price may change at any time; they apply from the next bill.
10
+ # - Anchor: "start" bills every period from the start date (a retainer started on the 15th bills on the 15th);
11
+ # "month_start" bills on the 1st, and a start on another day gets a first bill pro-rated by days, from the start date
12
+ # to the day before the next 1st (open-isp practice). Periods are counted from the anchor with add_months (contract
13
+ # 0031), never from the previous period, so a 31st anchor does not drift: period k starts at
14
+ # add_months(anchor_date, billed_months). The start date, the anchor and the customer cannot change after the first bill.
15
+ # - Bills: flow subscription_billing (every day, 00:05) bills each subscription whose next bill date has come: one
16
+ # subscription_bill and one draft sales invoice per period. billed_months and prorata_billed are written only by it.
17
+ # - end_date: no period that starts on or after it is billed; the period it falls in is billed up to the day before,
18
+ # pro-rated by days; the subscription is stopped from that day. It cannot fall before billed_through.
19
+ # - Status (computed, never set by hand) from the facts the dunning flows write (oldest_due, checked_on): stopped once
20
+ # end_date has come; else suspended when the oldest unpaid invoice is suspend_after_days past due, late when past
21
+ # due, else active. stop_after_days > 0 makes the dunning flow set end_date when the oldest unpaid invoice is that
22
+ # late (stop_due). Its invoices carry {langganan:<name>} in their notes.
23
+ # The collector of a subscription is its area's (row scope of role collector). Not deleted by anyone but the owner: a
24
+ # client who leaves gets an end date, which keeps the history.
25
+ permissions:
26
+ - {role: finance_manager, read: true, create: true, write: true, export: true, print: true}
27
+ - {role: collector, read: true}
28
+ # the invoice and payment flows refresh a subscription's unpaid amount as whoever submits
29
+ - {role: sales_manager, read: true, write: true}
30
+ fields:
31
+ - {name: customer, type: link, to: customer, label: {id: Pelanggan}, required: true}
32
+ - {name: customer_name, type: data, label: {id: Nama pelanggan}, compute: customer.customer_name, in_list: true}
33
+ - {name: phone, type: data, label: {id: Telepon}, compute: customer.phone}
34
+ - {name: address, type: data, label: {id: Alamat}, compute: customer.address}
35
+ - {name: plan, type: link, to: subscription_plan, label: {id: Paket}, required: true, in_list: true}
36
+ - {name: plan_name, type: data, label: {id: Nama paket}, compute: plan.plan_name}
37
+ - {name: item, type: link, to: item, label: {id: Nama jasa di faktur}, compute: plan.item}
38
+ - name: service_id
39
+ type: data
40
+ label: {id: ID layanan}
41
+ help: {id: 'Nomor pelanggan, user PPPoE, domain, atau nomor lisensi'}
42
+ - {name: area, type: link, to: service_area, label: {id: Area}, in_list: true}
43
+ # Where the service is (the house, the shop): the collector's route sorts and measures by it (screens/rute_tagih.rk).
44
+ - {name: location, type: geo, label: {id: Titik lokasi pelanggan}}
45
+ - {name: collector, type: link, to: user, label: {id: Penagih}, compute: area.collector}
46
+ - name: cycle
47
+ type: select
48
+ label: {id: Siklus tagihan}
49
+ required: true
50
+ default: plan.default_cycle
51
+ options:
52
+ - {value: monthly, label: {id: Bulanan}}
53
+ - {value: quarterly, label: {id: Tiap 3 bulan}}
54
+ - {value: yearly, label: {id: Tahunan}}
55
+ - {value: prepaid, label: {id: Bayar di muka N bulan}}
56
+ - name: prepaid_months
57
+ type: int
58
+ label: {id: Bayar di muka (bulan)}
59
+ default: plan.default_prepaid_months
60
+ depends_on: cycle == 'prepaid'
61
+ - name: cycle_months
62
+ type: int
63
+ label: {id: Bulan per tagihan}
64
+ compute: "cycle == 'monthly' ? 1 : (cycle == 'quarterly' ? 3 : (cycle == 'yearly' ? 12 : prepaid_months))"
65
+ - {name: monthly_price, type: currency, label: {id: Harga per bulan}, default: plan.monthly_price, required: true}
66
+ - name: discount_percent
67
+ type: float
68
+ label: {id: Potongan (%)}
69
+ help: {id: 'Misalnya potongan tahunan; berlaku mulai tagihan berikutnya'}
70
+ default: '0'
71
+ - name: monthly_net
72
+ type: currency
73
+ label: {id: Nilai per bulan (MRR)}
74
+ compute: round(monthly_price * (100 - discount_percent) / 100)
75
+ in_list: true
76
+ - name: start_date
77
+ type: date
78
+ label: {id: Mulai berlangganan}
79
+ default: today()
80
+ required: true
81
+ - name: anchor
82
+ type: select
83
+ label: {id: Tanggal tagihan}
84
+ required: true
85
+ default: "'start'"
86
+ options:
87
+ - {value: start, label: {id: Tiap tanggal mulai}}
88
+ - {value: month_start, label: {id: Tiap tanggal 1 (bulan pertama diprorata)}}
89
+ - name: anchor_date
90
+ type: date
91
+ label: {id: Awal periode penuh pertama}
92
+ compute: "anchor == 'month_start' && truncate(start_date, 7) + '-01' != start_date ? add_months(truncate(start_date, 7) + '-01', 1) : start_date"
93
+ - {name: end_date, type: date, label: {id: Berhenti mulai}}
94
+ - {name: due_days, type: int, label: {id: Jatuh tempo (hari dari awal periode)}, default: plan.due_days}
95
+ - {name: suspend_after_days, type: int, label: {id: Ditangguhkan setelah telat (hari)}, default: plan.suspend_after_days}
96
+ - {name: stop_after_days, type: int, label: {id: Berhenti otomatis setelah telat (hari)}, default: plan.stop_after_days}
97
+ # written by flow subscription_billing only
98
+ - {name: billed_months, type: int, label: {id: Bulan sudah ditagih}, default: '0', read_only: true}
99
+ - {name: prorata_billed, type: check, label: {id: Prorata sudah ditagih}, read_only: true}
100
+ - {name: last_bill, type: link, to: subscription_bill, label: {id: Tagihan terakhir}, read_only: true}
101
+ - name: next_is_prorata
102
+ type: check
103
+ label: {id: Tagihan berikutnya prorata}
104
+ compute: anchor_date != start_date && !prorata_billed
105
+ # the first day after the full periods billed; a period an end date cut short and then the end date taken away
106
+ # (the client stays) leaves billed_through before it: the rest of that period is billed first (audit 2026-11-08 #12)
107
+ - {name: boundary, type: date, label: {id: Batas periode penuh}, hidden: true, compute: "add_months(anchor_date, billed_months)"}
108
+ - name: resume
109
+ type: check
110
+ label: {id: Tagihan berikutnya sisa periode}
111
+ hidden: true
112
+ compute: "!next_is_prorata && billed_through != '' && last_period_start != '' && last_cycle_value > 0 && billed_through < boundary"
113
+ - name: next_bill_date
114
+ type: date
115
+ label: {id: Tagihan berikutnya}
116
+ compute: "next_is_prorata ? start_date : (resume ? billed_through : boundary)"
117
+ in_list: true
118
+ # the period as the cycle runs, then cut at the end date: a client who stops mid-period is billed up to the day before
119
+ # end_date, pro-rated by days of that period (audit 2026-11-08 #1)
120
+ - name: cycle_period_end
121
+ type: date
122
+ label: {id: Akhir periode penuh}
123
+ hidden: true
124
+ compute: "(next_is_prorata ? anchor_date : (resume ? boundary : add_months(anchor_date, billed_months + cycle_months))) - duration(1)"
125
+ - name: next_period_end
126
+ type: date
127
+ label: {id: Akhir periode berikutnya}
128
+ compute: "end_date != '' && end_date - duration(1) < cycle_period_end ? end_date - duration(1) : cycle_period_end"
129
+ - name: cycle_amount
130
+ type: currency
131
+ label: {id: Nilai periode penuh}
132
+ hidden: true
133
+ compute: >-
134
+ next_is_prorata ? round(monthly_net * days_between(start_date, anchor_date) / days_between(add_months(anchor_date, -1), anchor_date))
135
+ : (resume ? round(last_full_amount * days_between(billed_through, boundary) / days_between(last_period_start, boundary)) : monthly_net * cycle_months)
136
+ - name: next_amount
137
+ type: currency
138
+ label: {id: Nilai tagihan berikutnya}
139
+ help: {id: 'Tanpa baris tambahan dan PPN'}
140
+ compute: "next_period_end == cycle_period_end ? cycle_amount : round(cycle_amount * days_between(next_bill_date, next_period_end + duration(1)) / days_between(next_bill_date, cycle_period_end + duration(1)))"
141
+ - {name: billed_through, type: date, label: {id: Sudah ditagih sampai sebelum}, read_only: true}
142
+ # the last period billed as the cycle runs (before an end date cut it): what the rest of it is pro-rated against
143
+ - {name: last_period_start, type: date, label: {id: Awal periode terakhir}, read_only: true, hidden: true}
144
+ - {name: last_full_amount, type: currency, label: {id: Nilai penuh periode terakhir}, read_only: true, hidden: true}
145
+ - {name: last_cycle_value, type: currency, label: {id: Nilai satu siklus saat periode terakhir}, read_only: true, hidden: true}
146
+ # facts written by the dunning flows only; the status is computed from them when they are saved
147
+ - {name: unpaid_amount, type: currency, label: {id: Belum dibayar}, read_only: true, in_list: true}
148
+ - name: deposit_waiting
149
+ type: currency
150
+ label: {id: Setoran penagih menunggu diajukan}
151
+ help: {id: 'Uang tunai yang sudah disetor tapi pembayarannya belum diajukan finance'}
152
+ read_only: true
153
+ - {name: overdue_amount, type: currency, label: {id: Lewat jatuh tempo}, read_only: true}
154
+ - {name: oldest_due, type: date, label: {id: Jatuh tempo tagihan tertua yang belum lunas}, read_only: true}
155
+ - {name: checked_on, type: date, label: {id: Status dicek}, read_only: true}
156
+ - {name: prev_status, type: data, label: {id: Status sebelum dicek}, read_only: true, hidden: true}
157
+ - name: overdue_since
158
+ type: date
159
+ label: {id: Telat sejak}
160
+ compute: "oldest_due != '' && checked_on != '' && oldest_due < checked_on ? oldest_due : ''"
161
+ - name: late_days
162
+ type: int
163
+ label: {id: Telat (hari)}
164
+ compute: "overdue_since == '' ? 0 : days_between(overdue_since, checked_on)"
165
+ - name: stop_due
166
+ type: check
167
+ label: {id: Waktunya berhenti otomatis}
168
+ hidden: true
169
+ compute: end_date == '' && stop_after_days > 0 && late_days >= stop_after_days
170
+ - name: status
171
+ type: select
172
+ label: {id: Status layanan}
173
+ compute: "end_date != '' && end_date <= (checked_on == '' ? start_date : checked_on) ? 'stopped' : (late_days >= suspend_after_days ? 'suspended' : (late_days > 0 ? 'late' : 'active'))"
174
+ in_list: true
175
+ chip: true
176
+ options:
177
+ - {value: active, label: {id: Aktif}}
178
+ - {value: late, label: {id: Telat}}
179
+ - {value: suspended, label: {id: Ditangguhkan}}
180
+ - {value: stopped, label: {id: Berhenti}}
181
+ # copies the billing flow takes at the first bill (rule terms_locked)
182
+ - {name: locked_start, type: date, label: {id: Mulai (terkunci)}, read_only: true, hidden: true}
183
+ - {name: locked_anchor, type: data, label: {id: Tanggal tagihan (terkunci)}, read_only: true, hidden: true}
184
+ - {name: locked_customer, type: data, label: {id: Pelanggan (terkunci)}, read_only: true, hidden: true}
185
+ - {name: notes, type: text, label: {id: Catatan}}
186
+ rules:
187
+ - name: prepaid_range
188
+ on: save
189
+ check: cycle != 'prepaid' || (prepaid_months >= 1 && prepaid_months <= 36)
190
+ message: {id: 'Bayar di muka antara 1 dan 36 bulan'}
191
+ - name: price_positive
192
+ on: save
193
+ check: monthly_price > 0 && discount_percent >= 0 && discount_percent < 100 && monthly_net > 0
194
+ message: {id: 'Harga per bulan harus lebih dari 0 dan potongan 0 sampai di bawah 100%'}
195
+ - name: end_after_start
196
+ on: save
197
+ check: end_date == '' || end_date > start_date
198
+ message: {id: 'Tanggal berhenti harus sesudah tanggal mulai'}
199
+ - name: ladder_valid
200
+ on: save
201
+ check: due_days >= 0 && due_days <= 60 && suspend_after_days >= 1 && suspend_after_days <= 365 && (stop_after_days == 0 || (stop_after_days > suspend_after_days && stop_after_days <= 730))
202
+ message: {id: 'Jatuh tempo 0 sampai 60 hari, ditangguhkan 1 sampai 365 hari, berhenti otomatis 0 atau lebih lama dari ditangguhkan'}
203
+ - name: terms_locked
204
+ on: save
205
+ check: locked_start == '' || (start_date == locked_start && anchor == locked_anchor && (locked_customer == '' || customer == locked_customer))
206
+ message: {id: 'Sudah ada tagihan: pelanggan, tanggal mulai dan tanggal tagihan tidak bisa diubah lagi'}
207
+ - name: end_not_billed
208
+ on: save
209
+ check: end_date == '' || billed_through == '' || end_date >= billed_through
210
+ message: {id: 'Periode sampai tanggal itu sudah ditagih; isi tanggal berhenti sesudah periode terakhir yang ditagih'}
211
+ views:
212
+ list:
213
+ columns: [name, customer_name, plan, area, monthly_net, next_bill_date, status]
214
+ filters: [status, area, plan, collector]
215
+ sort: customer_name
216
+ form:
217
+ layout:
218
+ - section: {id: Pelanggan}
219
+ columns:
220
+ - [customer, customer_name, phone, address, location]
221
+ - [service_id, area, collector, status]
222
+ - section: {id: Paket dan siklus}
223
+ columns:
224
+ - [plan, cycle, prepaid_months, cycle_months]
225
+ - [monthly_price, discount_percent, monthly_net]
226
+ - section: {id: Periode}
227
+ columns:
228
+ - [start_date, anchor, anchor_date, end_date]
229
+ - [next_bill_date, next_period_end, next_amount, billed_months]
230
+ - section: {id: Penagihan}
231
+ columns:
232
+ - [due_days, suspend_after_days, stop_after_days]
233
+ - [unpaid_amount, deposit_waiting, overdue_amount, overdue_since, late_days, checked_on]
234
+ - section: {id: Catatan}
235
+ fields: [notes]
@@ -0,0 +1,48 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription_bill
3
+ label: {id: Tagihan langganan, en: Subscription bill}
4
+ icon: invoice
5
+ naming: TLG-{YYYY}-{#####}
6
+ title_field: customer_name
7
+ # One billed period of a subscription, made only by flow subscription_billing (no role creates or edits one; every
8
+ # field is read-only). It holds the period and the amounts; the draft invoice the flow made carries this bill's number
9
+ # in [] and {langganan:<subscription>} in its notes (found by that tag: a draft is renamed when submitted), and can be
10
+ # submitted only for exactly this bill's total, to its customer, once (flow invoice_subscription_once); the last live
11
+ # invoice of a bill is not deleted (flow invoice_subscription_kept). period_key is unique: a period is billed once whatever
12
+ # runs the flow. A wrong invoice is cancelled and amended (the amended copy keeps the tags); the bill stays as the
13
+ # record that the period was billed.
14
+ permissions:
15
+ - {role: finance_manager, read: true, export: true, print: true}
16
+ # flow invoice_subscription_once reads bills as whoever submits an invoice
17
+ - {role: sales_manager, read: true}
18
+ fields:
19
+ - {name: subscription, type: link, to: subscription, label: {id: Langganan}, required: true, read_only: true, in_list: true}
20
+ - {name: customer, type: link, to: customer, label: {id: Pelanggan}, required: true, read_only: true}
21
+ - {name: customer_name, type: data, label: {id: Nama pelanggan}, compute: customer.customer_name, in_list: true}
22
+ - name: kind
23
+ type: select
24
+ label: {id: Jenis}
25
+ read_only: true
26
+ in_list: true
27
+ options:
28
+ - {value: regular, label: {id: Periode penuh}}
29
+ - {value: prorata, label: {id: Prorata}}
30
+ - {value: remainder, label: {id: Sisa periode}}
31
+ - {name: period_start, type: date, label: {id: Periode mulai}, required: true, read_only: true, in_list: true}
32
+ - {name: period_end, type: date, label: {id: Periode sampai}, required: true, read_only: true, in_list: true}
33
+ - {name: months, type: int, label: {id: Bulan}, read_only: true}
34
+ - {name: base_amount, type: currency, label: {id: Nilai paket}, read_only: true}
35
+ - {name: extras_total, type: currency, label: {id: Tambahan}, read_only: true}
36
+ - {name: total, type: currency, label: {id: Total sebelum PPN}, compute: base_amount + extras_total, in_list: true}
37
+ - {name: due_date, type: date, label: {id: Jatuh tempo}, read_only: true}
38
+ - {name: period_key, type: data, label: {id: Kunci periode}, hidden: true, unique: true, compute: "subscription + '|' + period_start"}
39
+ rules:
40
+ - name: period_valid
41
+ on: save
42
+ check: period_end >= period_start && base_amount >= 0 && extras_total >= 0 && base_amount + extras_total > 0
43
+ message: {id: 'Periode atau nilai tagihan tidak sah'}
44
+ views:
45
+ list:
46
+ columns: [name, customer_name, kind, period_start, period_end, total]
47
+ filters: [subscription, kind]
48
+ sort: -period_start
@@ -0,0 +1,50 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription_extra
3
+ label: {id: Tambahan tagihan langganan, en: Subscription extra}
4
+ icon: plus
5
+ naming: TMB-{#####}
6
+ title_field: description
7
+ # A line added to a subscription's bills: once (an installation fee, an extra design job this month) or every period
8
+ # (an add-on, a second access point) from a date until an optional date; the amount is per full cycle, pro-rated on a
9
+ # shorter bill like the plan line. The billing flow adds every active extra whose
10
+ # dates overlap the period it bills (from_date on or before the period's last day, until_date empty or on or after its
11
+ # first day) as a line of the draft invoice; a one-off extra is marked with the bill that took it and is not billed
12
+ # again. An extra cannot change after a bill took it (flow subscription_extra_locked); a recurring one that should end gets an
13
+ # until date, a new amount is a new extra.
14
+ permissions:
15
+ # no delete: an extra a bill took stays as the record of that line; one that is not wanted is set inactive
16
+ - {role: finance_manager, read: true, create: true, write: true, export: true, print: true}
17
+ fields:
18
+ - {name: subscription, type: link, to: subscription, label: {id: Langganan}, required: true, in_list: true}
19
+ - {name: customer_name, type: data, label: {id: Pelanggan}, compute: subscription.customer_name, in_list: true}
20
+ - {name: description, type: data, label: {id: Keterangan di faktur}, required: true, in_list: true}
21
+ - {name: item, type: link, to: item, label: {id: Nama jasa di faktur}, default: subscription.item, required: true}
22
+ - {name: amount, type: currency, label: {id: Jumlah per tagihan}, required: true, in_list: true}
23
+ - name: repeat
24
+ type: select
25
+ label: {id: Berlaku}
26
+ required: true
27
+ default: "'once'"
28
+ in_list: true
29
+ options:
30
+ - {value: once, label: {id: Sekali}}
31
+ - {value: every_period, label: {id: Tiap tagihan}}
32
+ - {name: from_date, type: date, label: {id: Mulai}, default: today(), required: true}
33
+ - {name: until_date, type: date, label: {id: Sampai}, depends_on: repeat == 'every_period'}
34
+ - {name: active, type: check, label: {id: Aktif}, default: 'true', in_list: true}
35
+ - {name: billed_bill, type: link, to: subscription_bill, label: {id: Ditagih di}, read_only: true}
36
+ - {name: last_bill, type: link, to: subscription_bill, label: {id: Tagihan terakhir}, read_only: true}
37
+ rules:
38
+ - name: amount_positive
39
+ on: save
40
+ check: amount > 0
41
+ message: {id: 'Jumlah tambahan harus lebih dari 0; potongan ditulis di potongan langganan'}
42
+ - name: until_after_from
43
+ on: save
44
+ check: until_date == '' || until_date >= from_date
45
+ message: {id: 'Tanggal sampai harus sesudah tanggal mulai'}
46
+ views:
47
+ list:
48
+ columns: [name, customer_name, description, amount, repeat, from_date, active]
49
+ filters: [subscription, repeat, active]
50
+ sort: -from_date
@@ -0,0 +1,65 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription_guard
3
+ label: {id: Penjaga langganan, en: Subscription guard}
4
+ icon: check
5
+ naming: LGD-{######}
6
+ title_field: reason
7
+ # Never stored (the pattern of courses.course_guard): a flow that must refuse the action it runs in creates one, and the
8
+ # rule of its reason fails with that message, which rolls the whole action back.
9
+ permissions:
10
+ - {role: finance_manager, create: true}
11
+ - {role: sales_manager, create: true}
12
+ - {role: collector, create: true}
13
+ fields:
14
+ - name: reason
15
+ type: select
16
+ label: {id: Alasan}
17
+ required: true
18
+ options:
19
+ - {value: invoice_twice, label: {id: Faktur langganan tidak cocok}}
20
+ - {value: invoice_tag, label: {id: Catatan faktur langganan}}
21
+ - {value: extra_billed, label: {id: Tambahan sudah ditagih}}
22
+ - {value: deposit_mismatch, label: {id: Setoran tidak cocok}}
23
+ - {value: collection_deposited, label: {id: Uang tertagih sudah disetor}}
24
+ - {value: collection_over, label: {id: Uang tertagih melebihi tagihan}}
25
+ - {value: deposit_payment, label: {id: Pembayaran dari setoran}}
26
+ - {value: collection_area, label: {id: Bukan area penagih}}
27
+ - {value: invoice_kept, label: {id: Faktur langganan terakhir}}
28
+ - {name: document, type: data, label: {id: Dokumen}}
29
+ rules:
30
+ - name: invoice_twice
31
+ on: save
32
+ check: reason != 'invoice_twice'
33
+ message: {id: 'Faktur ini tidak cocok dengan tagihan langganannya (pelanggan atau jumlah sebelum PPN beda), atau tagihan itu sudah punya faktur diajukan'}
34
+ - name: invoice_tag
35
+ on: save
36
+ check: reason != 'invoice_tag'
37
+ message: {id: 'Catatan faktur langganan tidak bisa diubah (penanda tagihan langganan)'}
38
+ - name: extra_billed
39
+ on: save
40
+ check: reason != 'extra_billed'
41
+ message: {id: 'Tambahan ini sudah ditagih: hanya tanggal sampai dan status aktif yang bisa diubah; jumlah baru dibuat sebagai tambahan baru'}
42
+ - name: deposit_mismatch
43
+ on: save
44
+ check: reason != 'deposit_mismatch'
45
+ message: {id: 'Uang yang dihitung tidak sama dengan total uang tertagih penagih ini yang belum disetor (atau tidak ada yang belum disetor)'}
46
+ - name: collection_deposited
47
+ on: save
48
+ check: reason != 'collection_deposited'
49
+ message: {id: 'Uang tertagih ini sudah disetor; tidak bisa diubah atau dihapus'}
50
+ - name: collection_over
51
+ on: save
52
+ check: reason != 'collection_over'
53
+ message: {id: 'Uang tertagih yang belum disetor untuk langganan ini melebihi yang belum dibayar'}
54
+ - name: collection_area
55
+ on: save
56
+ check: reason != 'collection_area'
57
+ message: {id: 'Langganan ini bukan di area penagih ini'}
58
+ - name: invoice_kept
59
+ on: save
60
+ check: reason != 'invoice_kept'
61
+ message: {id: 'Ini satu-satunya faktur tagihan langganan itu; perbaiki drafnya, jangan dihapus (periodenya sudah ditagih)'}
62
+ - name: deposit_payment
63
+ on: save
64
+ check: reason != 'deposit_payment'
65
+ message: {id: 'Pembayaran ini dari setoran penagih: tidak bisa dihapus atau dibatalkan; jumlah, pelanggan, metode dan catatannya tetap'}
@@ -0,0 +1,29 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription_month
3
+ label: {id: Rekap bulan langganan, en: Subscription month}
4
+ icon: chart
5
+ naming: RBL-{YYYY}-{###}
6
+ title_field: month
7
+ # One row per calendar month, refreshed by flow subscription_dunning every day for this month and the month before:
8
+ # what was invoiced (submitted invoices of subscriptions dated in that month, net of PPh 23 and retention), what of it
9
+ # is paid, the collection rate, and the subscriptions and MRR at the last refresh.
10
+ permissions:
11
+ - {role: finance_manager, read: true, export: true, print: true}
12
+ fields:
13
+ - {name: month, type: data, label: {id: Bulan}, required: true, unique: true, read_only: true, in_list: true}
14
+ - {name: month_start, type: date, label: {id: Awal bulan}, compute: month + '-01'}
15
+ - {name: billed, type: currency, label: {id: Ditagih}, read_only: true, in_list: true}
16
+ - {name: collected, type: currency, label: {id: Sudah dibayar}, read_only: true, in_list: true}
17
+ - name: collection_rate
18
+ type: float
19
+ label: {id: Tingkat tertagih (%)}
20
+ compute: "billed > 0 ? round(collected * 100 / billed, 1) : 0"
21
+ in_list: true
22
+ - {name: invoices, type: int, label: {id: Jumlah faktur}, read_only: true}
23
+ - {name: active_count, type: int, label: {id: Langganan berjalan}, read_only: true}
24
+ - {name: mrr, type: currency, label: {id: MRR}, read_only: true}
25
+ - {name: refreshed_on, type: date, label: {id: Diperbarui}, read_only: true}
26
+ views:
27
+ list:
28
+ columns: [month, billed, collected, collection_rate, active_count, mrr]
29
+ sort: -month
@@ -0,0 +1,75 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription_plan
3
+ label: {id: Paket langganan, en: Subscription plan}
4
+ icon: tag
5
+ naming: PKT-{###}
6
+ title_field: plan_name
7
+ # A plan: the monthly price and the defaults a new subscription copies (cycle, due days, dunning ladder). A
8
+ # subscription keeps its own copy, so changing a plan changes only the subscriptions made after.
9
+ permissions:
10
+ - {role: finance_manager, read: true, create: true, write: true, export: true, print: true}
11
+ - {role: collector, read: true}
12
+ fields:
13
+ - {name: plan_name, type: data, label: {id: Nama paket}, required: true, in_list: true}
14
+ - {name: item, type: link, to: item, label: {id: Nama jasa di faktur}, required: true, in_list: true}
15
+ - {name: monthly_price, type: currency, label: {id: Harga per bulan}, required: true, in_list: true}
16
+ - name: default_cycle
17
+ type: select
18
+ label: {id: Siklus tagihan}
19
+ required: true
20
+ default: "'monthly'"
21
+ in_list: true
22
+ options:
23
+ - {value: monthly, label: {id: Bulanan}}
24
+ - {value: quarterly, label: {id: Tiap 3 bulan}}
25
+ - {value: yearly, label: {id: Tahunan}}
26
+ - {value: prepaid, label: {id: Bayar di muka N bulan}}
27
+ - name: default_prepaid_months
28
+ type: int
29
+ label: {id: Bayar di muka (bulan)}
30
+ default: '6'
31
+ depends_on: default_cycle == 'prepaid'
32
+ - name: due_days
33
+ type: int
34
+ label: {id: Jatuh tempo (hari dari awal periode)}
35
+ default: '7'
36
+ - name: suspend_after_days
37
+ type: int
38
+ label: {id: Ditangguhkan setelah telat (hari)}
39
+ help: {id: 'Layanan ditandai ditangguhkan (isolir) bila tagihan tertua lewat jatuh tempo sekian hari'}
40
+ default: '10'
41
+ - name: stop_after_days
42
+ type: int
43
+ label: {id: Berhenti otomatis setelah telat (hari)}
44
+ help: {id: '0 = tidak pernah berhenti otomatis'}
45
+ default: '0'
46
+ - {name: active, type: check, label: {id: Masih dijual}, default: 'true', in_list: true}
47
+ - {name: description, type: text, label: {id: Keterangan}}
48
+ rules:
49
+ - name: price_positive
50
+ on: save
51
+ check: monthly_price > 0
52
+ message: {id: 'Harga per bulan harus lebih dari 0'}
53
+ - name: prepaid_range
54
+ on: save
55
+ check: default_cycle != 'prepaid' || (default_prepaid_months >= 1 && default_prepaid_months <= 36)
56
+ message: {id: 'Bayar di muka antara 1 dan 36 bulan'}
57
+ - name: ladder_valid
58
+ on: save
59
+ check: due_days >= 0 && due_days <= 60 && suspend_after_days >= 1 && suspend_after_days <= 365 && (stop_after_days == 0 || (stop_after_days > suspend_after_days && stop_after_days <= 730))
60
+ message: {id: 'Jatuh tempo 0 sampai 60 hari, ditangguhkan 1 sampai 365 hari, berhenti otomatis 0 atau lebih lama dari ditangguhkan'}
61
+ views:
62
+ list:
63
+ columns: [plan_name, item, monthly_price, default_cycle, active]
64
+ sort: plan_name
65
+ form:
66
+ layout:
67
+ - section: {id: Paket}
68
+ columns:
69
+ - [plan_name, item, monthly_price, active]
70
+ - [default_cycle, default_prepaid_months]
71
+ - section: {id: Jatuh tempo dan penagihan}
72
+ columns:
73
+ - [due_days, suspend_after_days, stop_after_days]
74
+ - section: {id: Keterangan}
75
+ fields: [description]
@@ -0,0 +1,27 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: subscription_status_log
3
+ label: {id: Riwayat status layanan, en: Service status log}
4
+ icon: history
5
+ naming: RSL-{YYYY}-{######}
6
+ title_field: subscription
7
+ # One row per change of a subscription's service status, written by the dunning flows. The suspended rows of today are
8
+ # the list of connections to isolate (by hand until the router connector exists; rangka-edge D6).
9
+ permissions:
10
+ # created only by the dunning flows (every field read-only), as whoever submits a payment
11
+ - {role: finance_manager, read: true, create: true, export: true, print: true}
12
+ - {role: sales_manager, read: true, create: true}
13
+ - {role: collector, read: true}
14
+ fields:
15
+ - {name: subscription, type: link, to: subscription, label: {id: Langganan}, required: true, read_only: true, in_list: true}
16
+ - {name: customer_name, type: data, label: {id: Pelanggan}, compute: subscription.customer_name, in_list: true}
17
+ - {name: collector, type: link, to: user, label: {id: Penagih}, compute: subscription.collector}
18
+ - {name: changed_on, type: date, label: {id: Tanggal}, required: true, read_only: true, in_list: true}
19
+ - {name: from_status, type: data, label: {id: Dari}, read_only: true, in_list: true}
20
+ - {name: to_status, type: data, label: {id: Menjadi}, read_only: true, in_list: true}
21
+ - {name: overdue_since, type: date, label: {id: Telat sejak}, read_only: true}
22
+ - {name: overdue_amount, type: currency, label: {id: Lewat jatuh tempo}, read_only: true}
23
+ views:
24
+ list:
25
+ columns: [changed_on, customer_name, from_status, to_status, overdue_amount]
26
+ filters: [subscription, to_status]
27
+ sort: -changed_on
@@ -0,0 +1,18 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
2
+ name: subscriptions
3
+ version: 1.1.0
4
+ title: {id: Langganan, en: Subscriptions}
5
+ summary:
6
+ id: Paket langganan, tagihan tiap periode, area layanan dan setoran penagih.
7
+ en: Subscription plans, bills each period, service areas and collector deposits.
8
+ category: sales
9
+ icon: repeat-line
10
+ # Businesses that bill the same client every period: a digital agency's retainers, an RT/RW net, a reseller of a POS
11
+ # app. Plans with a monthly price; one subscription per client with its own cycle (monthly, 3 months, yearly or N
12
+ # months paid in advance), start date and anchor (every start date, or the 1st with the first period pro-rated);
13
+ # extra lines per period; bills made every day by a scheduled flow, each a draft sales invoice, so payment, reminders,
14
+ # aging, tax and bank matching are the money rail's; the service status (active, late, suspended, stopped) moved by a
15
+ # dunning ladder; areas and collectors, the cash they collect in the field and their deposits into the till; a monthly
16
+ # recap for the collection rate. Kernel: contract 0031 (add_months, days_between, for_each). Research and plan:
17
+ # rangka reports/Peta kebutuhan lima bisnis UMKM.md (langganan), lima-bisnis-plan.md §2.5, plans/layar-kerja.md A3.
18
+ requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, invoicing: ^1.0, payments: ^1.0, procurement: ^1.0}
@@ -0,0 +1,7 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/role.json
2
+ name: collector
3
+ label: {id: Penagih}
4
+ description: {id: 'Melihat langganan di area yang dia pegang dan mencatat uang tunai yang dia tagih di lapangan'}
5
+ # Contract 0010 §5: areas, subscriptions and field collections whose collector is the member's own user record (rangka
6
+ # user add --record). A collector reads no invoice: what a subscription still owes is on the subscription.
7
+ scope: {field: collector, from: '[user.name]'}
@@ -0,0 +1,18 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
2
+ name: catat_tagih
3
+ type: entry
4
+ label: {id: Catat uang tertagih, en: Record cash collected}
5
+ icon: wallet
6
+ # Cash taken at the subscriber's place (contract 0030 §2 entry): one field_collection. Opened from rute_tagih the
7
+ # subscription is filled (stop); opened alone the collector picks it. The flows field_collection_cap_* refuse more
8
+ # than what the subscription still owes and a subscriber of another area; the cash reaches the books through the
9
+ # collector's deposit (collector_deposit), checked by finance.
10
+ roles: [collector]
11
+ device: phone
12
+ offline: queue
13
+ entry:
14
+ model: field_collection
15
+ fields: [subscription, amount, notes]
16
+ set: {subscription: stop.name, collector: user.name}
17
+ submit: false
18
+ again: false
@@ -0,0 +1,25 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
2
+ name: rute_tagih
3
+ type: route
4
+ label: {id: Rute tagih, en: Collection route}
5
+ icon: map
6
+ # The collector's day (plans/layar-kerja.md §3 #3, contract 0030 §2 route): subscribers of their area (row scope)
7
+ # who still owe more than what is already deposited and waiting, with the distance from the phone; check in at the
8
+ # place (collection_visit with position and photo), then record the cash taken (catat_tagih, prefilled with the
9
+ # subscription). Money moves only through field_collection and the deposit, as before; the screen writes nothing else.
10
+ # A stop stays on the list until its cash is deposited (unpaid_amount and deposit_waiting change at the deposit).
11
+ roles: [collector]
12
+ device: phone
13
+ needs: [location, photo]
14
+ route:
15
+ stops:
16
+ model: subscription
17
+ filter: "unpaid_amount > deposit_waiting"
18
+ sort: area
19
+ title: customer_name
20
+ subtitle: unpaid_amount
21
+ address: address
22
+ location: location
23
+ visit: {model: collection_visit, link: subscription, set: {collector: user.name}, location: pos, photo: photo}
24
+ actions:
25
+ - {label: {id: Catat uang tertagih, en: Record cash}, screen: catat_tagih}
@@ -2,4 +2,9 @@
2
2
  name: tax_id
3
3
  version: 1.0.0
4
4
  title: {id: Pajak Indonesia, en: Indonesian taxes}
5
+ summary:
6
+ id: Kode pajak Indonesia seperti PPN dan PPh untuk dokumen penjualan dan pembelian.
7
+ en: Indonesian tax codes such as PPN and PPh for sales and purchase documents.
8
+ category: tax
9
+ icon: percent-line
5
10
  requires: {rangka: '>=0.5', users: ^1.0}