@rangka-os/create 0.0.0-stage → 0.5.0-alpha.10

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 (486) hide show
  1. package/index.js +137 -0
  2. package/package.json +29 -4
  3. package/template/base/README.md +32 -0
  4. package/template/base/_gitignore +3 -0
  5. package/template/base/_vscode/settings.json +4 -0
  6. package/template/base/apps/crm/app.rk +44 -0
  7. package/template/base/apps/crm/dashboards/crm_overview.rk +88 -0
  8. package/template/base/apps/crm/dashboards/sales_overview.rk +66 -0
  9. package/template/base/apps/crm/processes/lead_to_cash.rk +8 -0
  10. package/template/base/apps/faktur_piutang/app.rk +31 -0
  11. package/template/base/apps/faktur_piutang/dashboards/piutang_ringkas.rk +88 -0
  12. package/template/base/apps/fnb_cabang/app.rk +46 -0
  13. package/template/base/apps/fnb_cabang/dashboards/fnb_overview.rk +104 -0
  14. package/template/base/apps/fnb_cabang/dashboards/stock_recap.rk +132 -0
  15. package/template/base/apps/grosir_distribusi/app.rk +56 -0
  16. package/template/base/apps/grosir_distribusi/dashboards/grosir_ar.rk +62 -0
  17. package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +87 -0
  18. package/template/base/apps/jasa_proyek/app.rk +61 -0
  19. package/template/base/apps/jasa_proyek/dashboards/ar_aging.rk +88 -0
  20. package/template/base/apps/jasa_proyek/dashboards/jasa_overview.rk +148 -0
  21. package/template/base/apps/jasa_proyek/dashboards/project_margin.rk +94 -0
  22. package/template/base/apps/jasa_proyek/processes/quote_to_cash.rk +10 -0
  23. package/template/base/apps/kasir/app.rk +38 -0
  24. package/template/base/apps/kasir/dashboards/kasir_ringkas.rk +20 -0
  25. package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +64 -0
  26. package/template/base/apps/kelas_kursus/app.rk +29 -0
  27. package/template/base/apps/kelas_kursus/dashboards/kursus_ringkas.rk +67 -0
  28. package/template/base/apps/langganan_jasa/app.rk +32 -0
  29. package/template/base/apps/langganan_jasa/dashboards/langganan_ringkas.rk +167 -0
  30. package/template/base/apps/langganan_jasa/dashboards/penagihan_saya.rk +54 -0
  31. package/template/base/apps/mutasi_bank/app.rk +22 -0
  32. package/template/base/apps/pajak/app.rk +25 -0
  33. package/template/base/apps/pembelian_pemasok/app.rk +23 -0
  34. package/template/base/apps/pembukuan/app.rk +19 -0
  35. package/template/base/apps/penjualan_harian/app.rk +34 -0
  36. package/template/base/apps/penjualan_harian/dashboards/penjualan_ringkas.rk +87 -0
  37. package/template/base/apps/produksi_pabrik/app.rk +54 -0
  38. package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +101 -0
  39. package/template/base/apps/produksi_pabrik/dashboards/produksi_upah.rk +39 -0
  40. package/template/base/apps/ritel_cabang/app.rk +58 -0
  41. package/template/base/apps/ritel_cabang/dashboards/ritel_overview.rk +137 -0
  42. package/template/base/apps/ritel_cabang/dashboards/ritel_stock.rk +147 -0
  43. package/template/base/apps/ritel_cabang/dashboards/ritel_tax.rk +76 -0
  44. package/template/base/apps/sewa_alat/app.rk +29 -0
  45. package/template/base/apps/sewa_alat/dashboards/sewa_ringkas.rk +86 -0
  46. package/template/base/apps/stok_outlet/app.rk +34 -0
  47. package/template/base/apps/stok_outlet/dashboards/stok_ringkas.rk +50 -0
  48. package/template/base/connectors/biteship/connector.rk +246 -0
  49. package/template/base/connectors/biteship/fixtures/cancel_order.json +1 -0
  50. package/template/base/connectors/biteship/fixtures/create_order.json +8 -0
  51. package/template/base/connectors/biteship/fixtures/expect.json +9 -0
  52. package/template/base/connectors/biteship/fixtures/get_order.json +2 -0
  53. package/template/base/connectors/biteship/fixtures/get_rates.json +7 -0
  54. package/template/base/connectors/biteship/fixtures/get_tracking.json +7 -0
  55. package/template/base/connectors/biteship/fixtures/order_price.json +11 -0
  56. package/template/base/connectors/biteship/fixtures/order_status.json +15 -0
  57. package/template/base/connectors/biteship/fixtures/order_status_cancelled.json +15 -0
  58. package/template/base/connectors/biteship/fixtures/order_waybill.json +7 -0
  59. package/template/base/connectors/biteship/fixtures/search_areas.json +1 -0
  60. package/template/base/connectors/loyverse/connector.rk +98 -0
  61. package/template/base/connectors/moka/connector.rk +86 -0
  62. package/template/base/connectors/whatsapp_business/connector.rk +89 -0
  63. package/template/base/connectors/whatsapp_business/templates.md +32 -0
  64. package/template/base/connectors/xendit/connector.rk +184 -0
  65. package/template/base/docker-compose.yml +16 -0
  66. package/template/base/env.example +12 -0
  67. package/template/base/modules/accounting/flows/financial_report_compute.rk +47 -0
  68. package/template/base/modules/accounting/flows/financial_report_recompute.rk +47 -0
  69. package/template/base/modules/accounting/flows/gl_delivery_note_post.rk +37 -0
  70. package/template/base/modules/accounting/flows/gl_delivery_note_reverse.rk +194 -0
  71. package/template/base/modules/accounting/flows/gl_goods_receipt_post.rk +41 -0
  72. package/template/base/modules/accounting/flows/gl_goods_receipt_reverse.rk +194 -0
  73. package/template/base/modules/accounting/flows/gl_opening_balance_post.rk +132 -0
  74. package/template/base/modules/accounting/flows/gl_opening_balance_reverse.rk +194 -0
  75. package/template/base/modules/accounting/flows/gl_outlet_return_post.rk +38 -0
  76. package/template/base/modules/accounting/flows/gl_outlet_return_reverse.rk +194 -0
  77. package/template/base/modules/accounting/flows/gl_outlet_sales_post.rk +95 -0
  78. package/template/base/modules/accounting/flows/gl_outlet_sales_reverse.rk +194 -0
  79. package/template/base/modules/accounting/flows/gl_outlet_takings_post.rk +71 -0
  80. package/template/base/modules/accounting/flows/gl_outlet_takings_reverse.rk +194 -0
  81. package/template/base/modules/accounting/flows/gl_payment_post.rk +63 -0
  82. package/template/base/modules/accounting/flows/gl_payment_reverse.rk +194 -0
  83. package/template/base/modules/accounting/flows/gl_payroll_close_post.rk +89 -0
  84. package/template/base/modules/accounting/flows/gl_payroll_close_reverse.rk +194 -0
  85. package/template/base/modules/accounting/flows/gl_pos_sale_post.rk +95 -0
  86. package/template/base/modules/accounting/flows/gl_pos_sale_reverse.rk +194 -0
  87. package/template/base/modules/accounting/flows/gl_pos_shift_close_post.rk +59 -0
  88. package/template/base/modules/accounting/flows/gl_pos_shift_close_reverse.rk +194 -0
  89. package/template/base/modules/accounting/flows/gl_production_batch_post.rk +62 -0
  90. package/template/base/modules/accounting/flows/gl_production_batch_reverse.rk +194 -0
  91. package/template/base/modules/accounting/flows/gl_project_expense_post.rk +64 -0
  92. package/template/base/modules/accounting/flows/gl_project_expense_reverse.rk +194 -0
  93. package/template/base/modules/accounting/flows/gl_rental_booking_post.rk +35 -0
  94. package/template/base/modules/accounting/flows/gl_rental_booking_reverse.rk +194 -0
  95. package/template/base/modules/accounting/flows/gl_rental_return_post.rk +47 -0
  96. package/template/base/modules/accounting/flows/gl_rental_return_reverse.rk +194 -0
  97. package/template/base/modules/accounting/flows/gl_sales_invoice_post.rk +95 -0
  98. package/template/base/modules/accounting/flows/gl_sales_invoice_reverse.rk +194 -0
  99. package/template/base/modules/accounting/flows/gl_sales_return_post.rk +40 -0
  100. package/template/base/modules/accounting/flows/gl_sales_return_reverse.rk +194 -0
  101. package/template/base/modules/accounting/flows/gl_stock_adjustment_post.rk +38 -0
  102. package/template/base/modules/accounting/flows/gl_stock_adjustment_reverse.rk +194 -0
  103. package/template/base/modules/accounting/flows/gl_stock_count_post.rk +38 -0
  104. package/template/base/modules/accounting/flows/gl_stock_count_reverse.rk +194 -0
  105. package/template/base/modules/accounting/flows/gl_stock_transfer_post.rk +38 -0
  106. package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_post.rk +38 -0
  107. package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_reverse.rk +194 -0
  108. package/template/base/modules/accounting/flows/gl_stock_transfer_reverse.rk +194 -0
  109. package/template/base/modules/accounting/flows/gl_timesheet_post.rk +35 -0
  110. package/template/base/modules/accounting/flows/gl_timesheet_reverse.rk +194 -0
  111. package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +63 -0
  112. package/template/base/modules/accounting/flows/gl_vendor_bill_reverse.rk +194 -0
  113. package/template/base/modules/accounting/imports/opening_balance_sheet.rk +22 -0
  114. package/template/base/modules/accounting/models/financial_report.rk +85 -0
  115. package/template/base/modules/accounting/models/gl_entry.rk +161 -0
  116. package/template/base/modules/accounting/models/opening_balance.rk +48 -0
  117. package/template/base/modules/accounting/models/period_close.rk +33 -0
  118. package/template/base/modules/accounting/module.rk +16 -0
  119. package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +19 -0
  120. package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +43 -0
  121. package/template/base/modules/bank_statement/flows/bank_transaction_link_locked.rk +11 -0
  122. package/template/base/modules/bank_statement/flows/bank_transaction_matched.rk +13 -0
  123. package/template/base/modules/bank_statement/flows/bank_transaction_release.rk +11 -0
  124. package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +31 -0
  125. package/template/base/modules/bank_statement/flows/bank_transaction_unmatched.rk +11 -0
  126. package/template/base/modules/bank_statement/imports/bank_statement_csv.rk +25 -0
  127. package/template/base/modules/bank_statement/models/bank_transaction.rk +124 -0
  128. package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +49 -0
  129. package/template/base/modules/bank_statement/module.rk +12 -0
  130. package/template/base/modules/catalogue/imports/item_list.rk +20 -0
  131. package/template/base/modules/catalogue/imports/item_master.rk +25 -0
  132. package/template/base/modules/catalogue/models/item.rk +129 -0
  133. package/template/base/modules/catalogue/models/item_category.rk +27 -0
  134. package/template/base/modules/catalogue/models/price_list.rk +34 -0
  135. package/template/base/modules/catalogue/models/price_list_item.rk +21 -0
  136. package/template/base/modules/catalogue/models/uom.rk +34 -0
  137. package/template/base/modules/catalogue/models/uom_conversion.rk +44 -0
  138. package/template/base/modules/catalogue/module.rk +11 -0
  139. package/template/base/modules/consignment/flows/consignment_bill.rk +39 -0
  140. package/template/base/modules/consignment/flows/consignment_bill_cancelled.rk +14 -0
  141. package/template/base/modules/consignment/models/consignment_settlement.rk +111 -0
  142. package/template/base/modules/consignment/models/consignment_settlement_item.rk +37 -0
  143. package/template/base/modules/consignment/module.rk +15 -0
  144. package/template/base/modules/contacts/imports/customer_list.rk +17 -0
  145. package/template/base/modules/contacts/imports/vendor_list.rk +16 -0
  146. package/template/base/modules/contacts/models/contact_person.rk +21 -0
  147. package/template/base/modules/contacts/models/credit_guard.rk +40 -0
  148. package/template/base/modules/contacts/models/customer.rk +180 -0
  149. package/template/base/modules/contacts/models/vendor.rk +104 -0
  150. package/template/base/modules/contacts/module.rk +10 -0
  151. package/template/base/modules/coretax/models/tax_period.rk +89 -0
  152. package/template/base/modules/coretax/module.rk +13 -0
  153. package/template/base/modules/coretax/print/coretax_bupot.rk +26 -0
  154. package/template/base/modules/coretax/print/coretax_bupot.xml +28 -0
  155. package/template/base/modules/coretax/print/coretax_faktur.rk +34 -0
  156. package/template/base/modules/coretax/print/coretax_faktur.xml +58 -0
  157. package/template/base/modules/courses/flows/charge_cancel_guard.rk +23 -0
  158. package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +56 -0
  159. package/template/base/modules/courses/flows/enrollment_seats_on_create.rk +15 -0
  160. package/template/base/modules/courses/flows/enrollment_seats_on_update.rk +35 -0
  161. package/template/base/modules/courses/flows/invoice_course_once.rk +22 -0
  162. package/template/base/modules/courses/flows/invoice_course_tag_lock.rk +16 -0
  163. package/template/base/modules/courses/flows/session_fill_attendance.rk +16 -0
  164. package/template/base/modules/courses/flows/student_billing_on_create.rk +25 -0
  165. package/template/base/modules/courses/models/course_attendance.rk +22 -0
  166. package/template/base/modules/courses/models/course_batch.rk +112 -0
  167. package/template/base/modules/courses/models/course_batch_slot.rk +18 -0
  168. package/template/base/modules/courses/models/course_charge.rk +125 -0
  169. package/template/base/modules/courses/models/course_guard.rk +50 -0
  170. package/template/base/modules/courses/models/course_program.rk +101 -0
  171. package/template/base/modules/courses/models/course_session.rk +90 -0
  172. package/template/base/modules/courses/models/enrollment.rk +136 -0
  173. package/template/base/modules/courses/models/student.rk +68 -0
  174. package/template/base/modules/courses/module.rk +14 -0
  175. package/template/base/modules/courses/roles/instructor.rk +7 -0
  176. package/template/base/modules/currency/models/currency.rk +34 -0
  177. package/template/base/modules/currency/models/exchange_rate.rk +39 -0
  178. package/template/base/modules/currency/module.rk +10 -0
  179. package/template/base/modules/delivery/flows/delivery_cancel_guard.rk +18 -0
  180. package/template/base/modules/delivery/flows/fulfilment_on_delivery_cancelled.rk +21 -0
  181. package/template/base/modules/delivery/flows/fulfilment_on_delivery_submitted.rk +28 -0
  182. package/template/base/modules/delivery/flows/fulfilment_on_invoice_cancelled.rk +22 -0
  183. package/template/base/modules/delivery/flows/fulfilment_on_invoice_submitted.rk +22 -0
  184. package/template/base/modules/delivery/flows/fulfilment_on_order_created.rk +18 -0
  185. package/template/base/modules/delivery/flows/fulfilment_on_order_submitted.rk +16 -0
  186. package/template/base/modules/delivery/flows/fulfilment_on_order_updated.rk +19 -0
  187. package/template/base/modules/delivery/flows/fulfilment_on_return_cancelled.rk +16 -0
  188. package/template/base/modules/delivery/flows/fulfilment_on_return_submitted.rk +16 -0
  189. package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +20 -0
  190. package/template/base/modules/delivery/flows/order_cancel_guard.rk +10 -0
  191. package/template/base/modules/delivery/flows/return_cancel_guard.rk +11 -0
  192. package/template/base/modules/delivery/flows/return_credit_on_payment_cancelled.rk +11 -0
  193. package/template/base/modules/delivery/flows/return_credit_on_payment_submitted.rk +21 -0
  194. package/template/base/modules/delivery/flows/return_credit_on_return_cancelled.rk +11 -0
  195. package/template/base/modules/delivery/flows/return_credit_on_return_submitted.rk +10 -0
  196. package/template/base/modules/delivery/models/delivery_guard.rk +48 -0
  197. package/template/base/modules/delivery/models/delivery_note.rk +101 -0
  198. package/template/base/modules/delivery/models/delivery_note_item.rk +11 -0
  199. package/template/base/modules/delivery/models/order_fulfilment.rk +27 -0
  200. package/template/base/modules/delivery/models/order_fulfilment_item.rk +10 -0
  201. package/template/base/modules/delivery/models/return_credit.rk +23 -0
  202. package/template/base/modules/delivery/models/sales_return.rk +87 -0
  203. package/template/base/modules/delivery/models/sales_return_item.rk +16 -0
  204. package/template/base/modules/delivery/module.rk +16 -0
  205. package/template/base/modules/delivery/print/delivery_note.html +96 -0
  206. package/template/base/modules/delivery/print/delivery_note.rk +9 -0
  207. package/template/base/modules/distribution/flows/credit_on_invoice_cancelled.rk +17 -0
  208. package/template/base/modules/distribution/flows/credit_on_invoice_submitted.rk +17 -0
  209. package/template/base/modules/distribution/flows/credit_on_order_cancelled.rk +17 -0
  210. package/template/base/modules/distribution/flows/credit_on_order_submitted.rk +25 -0
  211. package/template/base/modules/distribution/flows/credit_on_payment_cancelled.rk +17 -0
  212. package/template/base/modules/distribution/flows/credit_on_payment_submitted.rk +17 -0
  213. package/template/base/modules/distribution/flows/giro_bounced.rk +20 -0
  214. package/template/base/modules/distribution/flows/giro_from_payment.rk +21 -0
  215. package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +17 -0
  216. package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +17 -0
  217. package/template/base/modules/distribution/models/giro.rk +79 -0
  218. package/template/base/modules/distribution/module.rk +14 -0
  219. package/template/base/modules/invoicing/flows/invoice_due_digest.rk +12 -0
  220. package/template/base/modules/invoicing/flows/milestone_invoiced.rk +23 -0
  221. package/template/base/modules/invoicing/flows/milestone_reopened.rk +19 -0
  222. package/template/base/modules/invoicing/flows/payment_instruction_on_submit.rk +25 -0
  223. package/template/base/modules/invoicing/flows/project_billed_on_cancel.rk +16 -0
  224. package/template/base/modules/invoicing/flows/project_billed_on_submit.rk +16 -0
  225. package/template/base/modules/invoicing/flows/project_revenue_on_cancel.rk +22 -0
  226. package/template/base/modules/invoicing/flows/project_revenue_on_submit.rk +17 -0
  227. package/template/base/modules/invoicing/flows/sales_invoice_credit_recheck.rk +18 -0
  228. package/template/base/modules/invoicing/models/bank_account.rk +134 -0
  229. package/template/base/modules/invoicing/models/invoice_reminder.rk +83 -0
  230. package/template/base/modules/invoicing/models/payment_instruction.rk +72 -0
  231. package/template/base/modules/invoicing/models/sales_invoice.rk +480 -0
  232. package/template/base/modules/invoicing/models/sales_invoice_item.rk +53 -0
  233. package/template/base/modules/invoicing/module.rk +14 -0
  234. package/template/base/modules/invoicing/print/sales_invoice.html +163 -0
  235. package/template/base/modules/invoicing/print/sales_invoice.rk +14 -0
  236. package/template/base/modules/invoicing/print/sales_invoice_nota.html +71 -0
  237. package/template/base/modules/invoicing/print/sales_invoice_nota.rk +13 -0
  238. package/template/base/modules/invoicing/print/sales_invoice_whatsapp.html +45 -0
  239. package/template/base/modules/invoicing/print/sales_invoice_whatsapp.rk +15 -0
  240. package/template/base/modules/orders/models/customer_order.rk +186 -0
  241. package/template/base/modules/orders/models/customer_order_item.rk +49 -0
  242. package/template/base/modules/orders/module.rk +14 -0
  243. package/template/base/modules/outlet_sales/flows/moka_legacy_key_overlap.rk +22 -0
  244. package/template/base/modules/outlet_sales/flows/refund_on_return_cancelled.rk +15 -0
  245. package/template/base/modules/outlet_sales/flows/refund_on_return_submitted.rk +26 -0
  246. package/template/base/modules/outlet_sales/flows/refund_on_sales_submitted.rk +14 -0
  247. package/template/base/modules/outlet_sales/flows/sales_cancel_guard.rk +14 -0
  248. package/template/base/modules/outlet_sales/imports/daily_form.rk +22 -0
  249. package/template/base/modules/outlet_sales/imports/loyverse_receipts.rk +28 -0
  250. package/template/base/modules/outlet_sales/imports/moka_item_details.rk +34 -0
  251. package/template/base/modules/outlet_sales/imports/pos_sales_file.rk +28 -0
  252. package/template/base/modules/outlet_sales/imports/takings_file.rk +23 -0
  253. package/template/base/modules/outlet_sales/models/outlet_return.rk +66 -0
  254. package/template/base/modules/outlet_sales/models/outlet_return_item.rk +7 -0
  255. package/template/base/modules/outlet_sales/models/outlet_sales.rk +175 -0
  256. package/template/base/modules/outlet_sales/models/outlet_sales_guard.rk +35 -0
  257. package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +40 -0
  258. package/template/base/modules/outlet_sales/models/outlet_takings.rk +85 -0
  259. package/template/base/modules/outlet_sales/models/outlet_takings_line.rk +37 -0
  260. package/template/base/modules/outlet_sales/models/pos_refund.rk +33 -0
  261. package/template/base/modules/outlet_sales/models/pos_refund_item.rk +9 -0
  262. package/template/base/modules/outlet_sales/module.rk +12 -0
  263. package/template/base/modules/outlets/models/outlet.rk +75 -0
  264. package/template/base/modules/outlets/module.rk +10 -0
  265. package/template/base/modules/payments/flows/payment_from_xendit_invoice.rk +59 -0
  266. package/template/base/modules/payments/flows/payment_from_xendit_qr.rk +59 -0
  267. package/template/base/modules/payments/flows/payment_from_xendit_va.rk +59 -0
  268. package/template/base/modules/payments/flows/payment_gateway_claim_created.rk +19 -0
  269. package/template/base/modules/payments/flows/payment_gateway_claim_submitted.rk +19 -0
  270. package/template/base/modules/payments/flows/payment_gateway_release.rk +12 -0
  271. package/template/base/modules/payments/models/gateway_ref_claim.rk +42 -0
  272. package/template/base/modules/payments/models/payment.rk +214 -0
  273. package/template/base/modules/payments/models/payment_allocation.rk +35 -0
  274. package/template/base/modules/payments/models/withholding.rk +76 -0
  275. package/template/base/modules/payments/module.rk +13 -0
  276. package/template/base/modules/payments/print/statement.html +55 -0
  277. package/template/base/modules/payments/print/statement.rk +13 -0
  278. package/template/base/modules/payroll/flows/invoice_payroll_once.rk +20 -0
  279. package/template/base/modules/payroll/flows/invoice_payroll_tag_lock.rk +13 -0
  280. package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +35 -0
  281. package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +66 -0
  282. package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +14 -0
  283. package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +14 -0
  284. package/template/base/modules/payroll/flows/payroll_totals_on_payslip_cancel.rk +29 -0
  285. package/template/base/modules/payroll/flows/payroll_totals_on_payslip_submit.rk +29 -0
  286. package/template/base/modules/payroll/flows/payslip_cancel_guard.rk +14 -0
  287. package/template/base/modules/payroll/flows/payslip_from_recap.rk +47 -0
  288. package/template/base/modules/payroll/flows/payslip_month_guard_created.rk +16 -0
  289. package/template/base/modules/payroll/flows/payslip_month_guard_submitted.rk +16 -0
  290. package/template/base/modules/payroll/flows/payslip_order_guard_cancelled.rk +15 -0
  291. package/template/base/modules/payroll/flows/payslip_order_guard_submitted.rk +15 -0
  292. package/template/base/modules/payroll/flows/payslip_pay_overlap_guard.rk +15 -0
  293. package/template/base/modules/payroll/flows/payslip_ytd_guard.rk +16 -0
  294. package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +20 -0
  295. package/template/base/modules/payroll/flows/recap_cancel_guard.rk +15 -0
  296. package/template/base/modules/payroll/models/payroll_close.rk +80 -0
  297. package/template/base/modules/payroll/models/payroll_guard.rk +74 -0
  298. package/template/base/modules/payroll/models/payroll_profile.rk +136 -0
  299. package/template/base/modules/payroll/models/payroll_run.rk +220 -0
  300. package/template/base/modules/payroll/models/payslip.rk +293 -0
  301. package/template/base/modules/payroll/module.rk +13 -0
  302. package/template/base/modules/payroll/print/payslip.html +53 -0
  303. package/template/base/modules/payroll/print/payslip.rk +7 -0
  304. package/template/base/modules/pipeline/flows/morning_follow_up.rk +10 -0
  305. package/template/base/modules/pipeline/flows/whatsapp_to_lead.rk +24 -0
  306. package/template/base/modules/pipeline/models/activity.rk +83 -0
  307. package/template/base/modules/pipeline/models/deal.rk +139 -0
  308. package/template/base/modules/pipeline/models/lead.rk +119 -0
  309. package/template/base/modules/pipeline/module.rk +12 -0
  310. package/template/base/modules/pos/flows/pos_daily_form_guard.rk +18 -0
  311. package/template/base/modules/pos/flows/pos_sale_on_cancel.rk +33 -0
  312. package/template/base/modules/pos/flows/pos_sale_on_submit.rk +46 -0
  313. package/template/base/modules/pos/flows/pos_shift_close_on_cancel.rk +26 -0
  314. package/template/base/modules/pos/flows/pos_shift_close_on_submit.rk +23 -0
  315. package/template/base/modules/pos/flows/pos_shift_on_create.rk +21 -0
  316. package/template/base/modules/pos/flows/pos_shift_on_update.rk +10 -0
  317. package/template/base/modules/pos/flows/pos_takings_guard.rk +28 -0
  318. package/template/base/modules/pos/models/pos_guard.rk +76 -0
  319. package/template/base/modules/pos/models/pos_payment.rk +17 -0
  320. package/template/base/modules/pos/models/pos_sale.rk +222 -0
  321. package/template/base/modules/pos/models/pos_sale_item.rk +43 -0
  322. package/template/base/modules/pos/models/pos_shift.rk +92 -0
  323. package/template/base/modules/pos/models/pos_shift_close.rk +77 -0
  324. package/template/base/modules/pos/module.rk +22 -0
  325. package/template/base/modules/pos/print/pos_receipt.html +50 -0
  326. package/template/base/modules/pos/print/pos_receipt.rk +9 -0
  327. package/template/base/modules/pos/screens/kasir.rk +41 -0
  328. package/template/base/modules/procurement/flows/project_vendor_cost_on_cancel.rk +22 -0
  329. package/template/base/modules/procurement/flows/project_vendor_cost_on_submit.rk +17 -0
  330. package/template/base/modules/procurement/imports/opening_stock.rk +25 -0
  331. package/template/base/modules/procurement/models/goods_receipt.rk +85 -0
  332. package/template/base/modules/procurement/models/goods_receipt_item.rk +42 -0
  333. package/template/base/modules/procurement/models/purchase_order.rk +156 -0
  334. package/template/base/modules/procurement/models/purchase_order_item.rk +46 -0
  335. package/template/base/modules/procurement/models/purchase_request.rk +91 -0
  336. package/template/base/modules/procurement/models/purchase_request_item.rk +35 -0
  337. package/template/base/modules/procurement/models/vendor_bill.rk +272 -0
  338. package/template/base/modules/procurement/models/vendor_bill_item.rk +33 -0
  339. package/template/base/modules/procurement/module.rk +14 -0
  340. package/template/base/modules/procurement/print/purchase_order.html +120 -0
  341. package/template/base/modules/procurement/print/purchase_order.rk +7 -0
  342. package/template/base/modules/production/flows/batch_cancel_guard.rk +12 -0
  343. package/template/base/modules/production/flows/batch_from_bom.rk +19 -0
  344. package/template/base/modules/production/flows/wage_sheet_on_batch_cancelled.rk +14 -0
  345. package/template/base/modules/production/flows/wage_sheet_on_batch_submitted.rk +12 -0
  346. package/template/base/modules/production/flows/work_order_materials_created.rk +20 -0
  347. package/template/base/modules/production/flows/work_order_materials_updated.rk +20 -0
  348. package/template/base/modules/production/models/bom.rk +67 -0
  349. package/template/base/modules/production/models/bom_byproduct.rk +7 -0
  350. package/template/base/modules/production/models/bom_line.rk +11 -0
  351. package/template/base/modules/production/models/production_batch.rk +149 -0
  352. package/template/base/modules/production/models/production_guard.rk +23 -0
  353. package/template/base/modules/production/models/production_labour.rk +10 -0
  354. package/template/base/modules/production/models/production_material.rk +8 -0
  355. package/template/base/modules/production/models/production_output.rk +8 -0
  356. package/template/base/modules/production/models/production_stage.rk +19 -0
  357. package/template/base/modules/production/models/wage_line.rk +15 -0
  358. package/template/base/modules/production/models/wage_sheet.rk +28 -0
  359. package/template/base/modules/production/models/work_order.rk +63 -0
  360. package/template/base/modules/production/models/work_order_material.rk +8 -0
  361. package/template/base/modules/production/module.rk +17 -0
  362. package/template/base/modules/production/print/wage_sheet.html +75 -0
  363. package/template/base/modules/production/print/wage_sheet.rk +9 -0
  364. package/template/base/modules/projects/flows/milestone_back_on_acceptance_cancel.rk +15 -0
  365. package/template/base/modules/projects/flows/milestone_lock_on_update.rk +16 -0
  366. package/template/base/modules/projects/flows/milestone_ready_on_acceptance.rk +40 -0
  367. package/template/base/modules/projects/flows/milestone_scheduled_on_create.rk +14 -0
  368. package/template/base/modules/projects/flows/milestone_scheduled_on_update.rk +27 -0
  369. package/template/base/modules/projects/flows/project_expense_on_cancel.rk +21 -0
  370. package/template/base/modules/projects/flows/project_expense_on_submit.rk +16 -0
  371. package/template/base/modules/projects/flows/project_labor_on_cancel.rk +22 -0
  372. package/template/base/modules/projects/flows/project_labor_on_submit.rk +17 -0
  373. package/template/base/modules/projects/flows/project_terms_lock.rk +26 -0
  374. package/template/base/modules/projects/flows/timesheet_assignment_on_create.rk +28 -0
  375. package/template/base/modules/projects/flows/vendor_bill_cancel_guard.rk +15 -0
  376. package/template/base/modules/projects/imports/attendance_recap.rk +23 -0
  377. package/template/base/modules/projects/imports/billing_milestone.rk +20 -0
  378. package/template/base/modules/projects/models/acceptance.rk +68 -0
  379. package/template/base/modules/projects/models/assignment.rk +96 -0
  380. package/template/base/modules/projects/models/billing_milestone.rk +217 -0
  381. package/template/base/modules/projects/models/project.rk +155 -0
  382. package/template/base/modules/projects/models/project_expense.rk +121 -0
  383. package/template/base/modules/projects/models/project_guard.rk +27 -0
  384. package/template/base/modules/projects/models/project_ledger.rk +146 -0
  385. package/template/base/modules/projects/models/timesheet.rk +161 -0
  386. package/template/base/modules/projects/module.rk +11 -0
  387. package/template/base/modules/quotation/models/quotation.rk +201 -0
  388. package/template/base/modules/quotation/models/quotation_item.rk +37 -0
  389. package/template/base/modules/quotation/module.rk +14 -0
  390. package/template/base/modules/quotation/print/quotation.html +65 -0
  391. package/template/base/modules/quotation/print/quotation.rk +7 -0
  392. package/template/base/modules/rental/flows/rental_booking_on_cancel.rk +19 -0
  393. package/template/base/modules/rental/flows/rental_booking_on_submit.rk +45 -0
  394. package/template/base/modules/rental/flows/rental_checkout_on_cancel.rk +13 -0
  395. package/template/base/modules/rental/flows/rental_checkout_on_submit.rk +21 -0
  396. package/template/base/modules/rental/flows/rental_invoice_once.rk +20 -0
  397. package/template/base/modules/rental/flows/rental_invoice_tag_lock.rk +12 -0
  398. package/template/base/modules/rental/flows/rental_return_on_cancel.rk +15 -0
  399. package/template/base/modules/rental/flows/rental_return_on_submit.rk +28 -0
  400. package/template/base/modules/rental/models/rental_booking.rk +123 -0
  401. package/template/base/modules/rental/models/rental_checkout.rk +37 -0
  402. package/template/base/modules/rental/models/rental_guard.rk +72 -0
  403. package/template/base/modules/rental/models/rental_item.rk +75 -0
  404. package/template/base/modules/rental/models/rental_return.rk +83 -0
  405. package/template/base/modules/rental/models/rental_schedule.rk +49 -0
  406. package/template/base/modules/rental/module.rk +19 -0
  407. package/template/base/modules/stock/flows/adjustment_value_backfill.rk +95 -0
  408. package/template/base/modules/stock/flows/adjustment_value_on_cancel.rk +19 -0
  409. package/template/base/modules/stock/flows/adjustment_value_on_submit.rk +17 -0
  410. package/template/base/modules/stock/flows/stock_negative_alert.rk +15 -0
  411. package/template/base/modules/stock/models/recipe.rk +68 -0
  412. package/template/base/modules/stock/models/recipe_line.rk +24 -0
  413. package/template/base/modules/stock/models/stock_adjustment.rk +62 -0
  414. package/template/base/modules/stock/models/stock_adjustment_item.rk +32 -0
  415. package/template/base/modules/stock/models/stock_adjustment_value.rk +79 -0
  416. package/template/base/modules/stock/models/stock_balance.rk +27 -0
  417. package/template/base/modules/stock/models/stock_count.rk +54 -0
  418. package/template/base/modules/stock/models/stock_count_item.rk +33 -0
  419. package/template/base/modules/stock/models/stock_move.rk +53 -0
  420. package/template/base/modules/stock/models/stock_transfer.rk +70 -0
  421. package/template/base/modules/stock/models/stock_transfer_item.rk +34 -0
  422. package/template/base/modules/stock/models/stock_transfer_receipt.rk +57 -0
  423. package/template/base/modules/stock/models/stock_transfer_receipt_item.rk +18 -0
  424. package/template/base/modules/stock/module.rk +13 -0
  425. package/template/base/modules/subscriptions/flows/collector_deposit_on_submit.rk +57 -0
  426. package/template/base/modules/subscriptions/flows/deposit_payment_kept.rk +17 -0
  427. package/template/base/modules/subscriptions/flows/deposit_payment_not_cancelled.rk +14 -0
  428. package/template/base/modules/subscriptions/flows/deposit_payment_not_deleted.rk +14 -0
  429. package/template/base/modules/subscriptions/flows/field_collection_cap_created.rk +24 -0
  430. package/template/base/modules/subscriptions/flows/field_collection_cap_updated.rk +24 -0
  431. package/template/base/modules/subscriptions/flows/field_collection_locked.rk +12 -0
  432. package/template/base/modules/subscriptions/flows/field_collection_not_deleted.rk +10 -0
  433. package/template/base/modules/subscriptions/flows/invoice_subscription_kept.rk +19 -0
  434. package/template/base/modules/subscriptions/flows/invoice_subscription_once.rk +34 -0
  435. package/template/base/modules/subscriptions/flows/invoice_subscription_tag_lock.rk +13 -0
  436. package/template/base/modules/subscriptions/flows/service_area_collector.rk +14 -0
  437. package/template/base/modules/subscriptions/flows/subscription_billing.rk +79 -0
  438. package/template/base/modules/subscriptions/flows/subscription_dunning.rk +81 -0
  439. package/template/base/modules/subscriptions/flows/subscription_extra_locked.rk +14 -0
  440. package/template/base/modules/subscriptions/flows/subscription_status_on_payment.rk +48 -0
  441. package/template/base/modules/subscriptions/models/collector_deposit.rk +36 -0
  442. package/template/base/modules/subscriptions/models/field_collection.rk +42 -0
  443. package/template/base/modules/subscriptions/models/service_area.rk +19 -0
  444. package/template/base/modules/subscriptions/models/subscription.rk +233 -0
  445. package/template/base/modules/subscriptions/models/subscription_bill.rk +48 -0
  446. package/template/base/modules/subscriptions/models/subscription_extra.rk +50 -0
  447. package/template/base/modules/subscriptions/models/subscription_guard.rk +65 -0
  448. package/template/base/modules/subscriptions/models/subscription_month.rk +29 -0
  449. package/template/base/modules/subscriptions/models/subscription_plan.rk +75 -0
  450. package/template/base/modules/subscriptions/models/subscription_status_log.rk +27 -0
  451. package/template/base/modules/subscriptions/module.rk +18 -0
  452. package/template/base/modules/subscriptions/roles/collector.rk +7 -0
  453. package/template/base/modules/tax_id/models/tax_code.rk +49 -0
  454. package/template/base/modules/tax_id/module.rk +10 -0
  455. package/template/base/modules/users/models/user.rk +29 -0
  456. package/template/base/modules/users/module.rk +10 -0
  457. package/template/base/modules/users/roles/cashier.rk +8 -0
  458. package/template/base/modules/users/roles/course_admin.rk +4 -0
  459. package/template/base/modules/users/roles/field_sales.rk +7 -0
  460. package/template/base/modules/users/roles/finance_manager.rk +4 -0
  461. package/template/base/modules/users/roles/head_office.rk +4 -0
  462. package/template/base/modules/users/roles/outlet_staff.rk +6 -0
  463. package/template/base/modules/users/roles/project_admin.rk +4 -0
  464. package/template/base/modules/users/roles/purchasing_manager.rk +4 -0
  465. package/template/base/modules/users/roles/sales_manager.rk +4 -0
  466. package/template/base/modules/users/roles/sales_rep.rk +4 -0
  467. package/template/base/modules/workforce/imports/worker_list.rk +21 -0
  468. package/template/base/modules/workforce/models/certification.rk +25 -0
  469. package/template/base/modules/workforce/models/worker.rk +94 -0
  470. package/template/base/modules/workforce/module.rk +10 -0
  471. package/template/base/package.json +17 -0
  472. package/template/blank/fixtures/start.rk +5 -0
  473. package/template/blank/site/config.rk +13 -0
  474. package/template/blank/site/custom/README.md +2 -0
  475. package/template/blank/site/features.rk +13 -0
  476. package/template/blank/site/layouts/main.rk +14 -0
  477. package/template/blank/site/system.rk +20 -0
  478. package/template/blank/site/themes/main.rk +8 -0
  479. package/template/demo/fixtures/crm_demo.rk +168 -0
  480. package/template/demo/fixtures/demo.rk +417 -0
  481. package/template/demo/site/config.rk +13 -0
  482. package/template/demo/site/features.rk +13 -0
  483. package/template/demo/site/layouts/crm_first.rk +23 -0
  484. package/template/demo/site/system.rk +26 -0
  485. package/template/demo/site/themes/kopi_senja.rk +10 -0
  486. package/README.md +0 -3
@@ -0,0 +1,146 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: project_ledger
3
+ label: {id: Buku untung proyek, en: Project ledger}
4
+ icon: chart
5
+ naming: PL-{YYYY}-{######}
6
+ title_field: project
7
+ # append_only (contract 0026): rows are created only by the flows the kernel starts on the source document's events (and
8
+ # the schedule); nobody, the owner included, creates, edits or deletes one through the API, an import or a flow run by
9
+ # hand. A correction is the reversing row written when the source document is cancelled.
10
+ append_only: true
11
+ # One signed row per submitted document that changes a project's result: revenue + (invoice dpp, retention releases
12
+ # excluded), costs - (timesheet cost, project expense not on a vendor bill, vendor bill dpp). Cancelling the document
13
+ # writes the opposite row on the document's own date, so the sum per project (and per period) is its margin. Rows are
14
+ # written by flows inside the document's submit or cancel. A flow runs as the person submitting, so those roles hold
15
+ # create, and a rule cannot tell a flow from a person; the rules therefore make every row true to its document:
16
+ # - a post row links its source document, on the same project, submitted, with exactly the document's amount and
17
+ # date; one per document (entry_key = source:post);
18
+ # - a reverse row links the post row it reverses (reverses, unique) for the same document, now cancelled, with the
19
+ # opposite amount; one per post row (entry_key = source:reverse).
20
+ # So each cancelled document has exactly one reversal, and only if it had a post row: a document submitted before
21
+ # this model existed has none, and none can be reversed by hand. The only row a person could add by hand is a true
22
+ # post row for such an old, still submitted document.
23
+ permissions:
24
+ - {role: project_admin, read: true, create: true, export: true}
25
+ - {role: finance_manager, read: true, create: true, export: true}
26
+ # Sales and purchasing read (and their flows write) only the rows of their own documents: labour rows carry pay and
27
+ # cost rows the firm's margin (audit L1). Read stays because the cancel flows find the row they reverse as the person
28
+ # cancelling. No export for sales.
29
+ - {role: sales_manager, read: true, create: true, if: kind == 'revenue'}
30
+ - {role: purchasing_manager, read: true, create: true, if: kind == 'vendor'}
31
+ fields:
32
+ - name: project
33
+ type: link
34
+ to: project
35
+ label: {id: Proyek}
36
+ required: true
37
+ in_list: true
38
+ - name: posting_date
39
+ type: date
40
+ label: {id: Tanggal}
41
+ required: true
42
+ in_list: true
43
+ - name: kind
44
+ type: select
45
+ label: {id: Jenis}
46
+ required: true
47
+ in_list: true
48
+ chip: true
49
+ options:
50
+ - {value: revenue, label: {id: Pendapatan}}
51
+ - {value: labor, label: {id: Biaya tenaga kerja}}
52
+ - {value: expense, label: {id: Biaya proyek}}
53
+ - {value: vendor, label: {id: Biaya pemasok}}
54
+ # Payroll (module payroll): the employer cost of a closed payroll run beyond what its recaps booked.
55
+ - {value: payroll, label: {id: Biaya gaji tambahan}}
56
+ - name: source_model
57
+ type: data
58
+ label: {id: Dokumen}
59
+ required: true
60
+ - name: source_name
61
+ type: data
62
+ label: {id: No. dokumen}
63
+ required: true
64
+ in_list: true
65
+ - name: sales_invoice
66
+ type: link
67
+ to: sales_invoice
68
+ label: {id: Faktur}
69
+ - name: timesheet
70
+ type: link
71
+ to: timesheet
72
+ label: {id: Timesheet}
73
+ - name: project_expense
74
+ type: link
75
+ to: project_expense
76
+ label: {id: Biaya proyek}
77
+ - name: vendor_bill
78
+ type: link
79
+ to: vendor_bill
80
+ label: {id: Tagihan pemasok}
81
+ - name: payroll_close
82
+ type: link
83
+ to: payroll_close
84
+ label: {id: Tutup periode gaji}
85
+ - name: entry
86
+ type: select
87
+ label: {id: Baris}
88
+ default: "'post'"
89
+ options:
90
+ - {value: post, label: {id: Diajukan}}
91
+ - {value: reverse, label: {id: Pembalik}}
92
+ - name: reverses
93
+ type: link
94
+ to: project_ledger
95
+ label: {id: Membalik baris}
96
+ unique: true
97
+ - name: source_status
98
+ type: int
99
+ label: {id: Status dokumen}
100
+ hidden: true
101
+ compute: "kind == 'revenue' ? sales_invoice.docstatus : (kind == 'labor' ? timesheet.docstatus : (kind == 'expense' ? project_expense.docstatus : (kind == 'payroll' ? payroll_close.docstatus : vendor_bill.docstatus)))"
102
+ - name: source_amount
103
+ type: currency
104
+ label: {id: Nilai dokumen}
105
+ hidden: true
106
+ compute: "kind == 'revenue' ? sales_invoice.dpp : (kind == 'labor' ? 0 - timesheet.cost_amount : (kind == 'expense' ? 0 - project_expense.amount : (kind == 'payroll' ? 0 - payroll_close.extra_cost : 0 - vendor_bill.dpp)))"
107
+ - name: source_date
108
+ type: date
109
+ label: {id: Tanggal dokumen}
110
+ hidden: true
111
+ compute: "kind == 'revenue' ? sales_invoice.posting_date : (kind == 'labor' ? timesheet.work_date : (kind == 'expense' ? project_expense.expense_date : (kind == 'payroll' ? payroll_close.period_to : vendor_bill.bill_date)))"
112
+ - name: entry_key
113
+ type: data
114
+ label: {id: Kunci baris}
115
+ hidden: true
116
+ unique: true
117
+ compute: "source_name + ':' + entry"
118
+ - name: amount
119
+ type: currency
120
+ label: {id: 'Nilai (+ pendapatan, - biaya)'}
121
+ in_list: true
122
+ rules:
123
+ - name: source_matches
124
+ on: save
125
+ check: >-
126
+ (kind == 'revenue' && sales_invoice != '' && source_name == sales_invoice && sales_invoice.project == project && sales_invoice.kind != 'retention')
127
+ || (kind == 'labor' && timesheet != '' && source_name == timesheet && timesheet.project == project)
128
+ || (kind == 'expense' && project_expense != '' && source_name == project_expense && project_expense.project == project)
129
+ || (kind == 'vendor' && vendor_bill != '' && source_name == vendor_bill && vendor_bill.project == project)
130
+ || (kind == 'payroll' && payroll_close != '' && source_name == payroll_close && payroll_close.project == project)
131
+ message: {id: Baris buku untung proyek harus menunjuk dokumen sumbernya di proyek yang sama}
132
+ - name: post_matches_document
133
+ on: save
134
+ check: entry != 'post' || (reverses == '' && source_status == 1 && amount == source_amount && posting_date == source_date)
135
+ message: {id: Baris diajukan hanya untuk dokumen yang diajukan dengan nilai yang sama}
136
+ - name: reverse_matches_post
137
+ on: save
138
+ check: >-
139
+ entry != 'reverse' || (reverses != '' && source_status == 2 && reverses.entry == 'post' && reverses.source_name == source_name
140
+ && reverses.kind == kind && reverses.project == project && amount == 0 - reverses.amount && posting_date == reverses.posting_date)
141
+ message: {id: Baris pembalik hanya untuk dokumen yang dibatalkan dan harus menunjuk baris aslinya}
142
+ views:
143
+ list:
144
+ columns: [name, project, posting_date, kind, entry, source_name, amount]
145
+ filters: [project, kind]
146
+ sort: -posting_date
@@ -0,0 +1,161 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: timesheet
3
+ label: {id: Absensi, en: Timesheet}
4
+ icon: calendar
5
+ is_submittable: true
6
+ naming: TS-{YYYY}-{#####}
7
+ title_field: worker
8
+ permissions:
9
+ - {role: project_admin, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, import: true, print: true}
10
+ # No sales_manager: a timesheet carries pay and cost (audit L1).
11
+ - {role: finance_manager, read: true}
12
+ fields:
13
+ - name: project
14
+ type: link
15
+ to: project
16
+ label: {id: Proyek}
17
+ required: true
18
+ in_list: true
19
+ - name: worker
20
+ type: link
21
+ to: worker
22
+ label: {id: Tenaga kerja}
23
+ required: true
24
+ in_list: true
25
+ - name: assignment
26
+ type: link
27
+ to: assignment
28
+ label: {id: Penugasan}
29
+ - name: work_date
30
+ type: date
31
+ label: {id: Tanggal kerja}
32
+ required: true
33
+ in_list: true
34
+ # A monthly recap (G7): work_date is the first day of the cut-off period and period_to its last (21 Oct to 20 Nov,
35
+ # or a calendar month), days the days present in it. Empty period_to = one day, as before.
36
+ - name: period_to
37
+ type: date
38
+ label: {id: Sampai tanggal (rekap)}
39
+ in_list: true
40
+ - name: days
41
+ type: float
42
+ label: {id: Hari kerja}
43
+ default: '1'
44
+ in_list: true
45
+ - name: overtime_hours
46
+ type: float
47
+ label: {id: Jam lembur}
48
+ default: '0'
49
+ - name: hours
50
+ type: float
51
+ label: {id: Jam}
52
+ - name: description
53
+ type: text
54
+ label: {id: Uraian pekerjaan}
55
+ required: true
56
+ - name: evidence
57
+ type: attach
58
+ label: {id: Bukti kerja}
59
+ - name: billable
60
+ type: check
61
+ label: {id: Dapat ditagih}
62
+ default: 'true'
63
+ - name: day_rate
64
+ type: currency
65
+ label: {id: Tarif per hari}
66
+ default: "assignment != '' ? assignment.day_rate : worker.day_rate"
67
+ # Per hour when the assignment bills per hour (consultants); per day otherwise, as before.
68
+ - name: rate_basis
69
+ type: select
70
+ label: {id: Satuan tarif}
71
+ default: "assignment != '' ? assignment.rate_basis : 'day'"
72
+ options:
73
+ - {value: day, label: {id: Per hari}}
74
+ - {value: hour, label: {id: Per jam}}
75
+ - name: hour_rate
76
+ type: currency
77
+ label: {id: Tarif per jam}
78
+ default: "assignment != '' ? assignment.hour_rate : worker.hour_rate"
79
+ - name: cost_rate
80
+ type: currency
81
+ label: {id: Biaya per satuan}
82
+ default: "assignment != '' ? assignment.cost_rate : (rate_basis == 'hour' ? worker.cost_hour_rate : worker.cost_day_rate)"
83
+ - name: overtime_rate
84
+ type: currency
85
+ label: {id: Tarif jual lembur per jam}
86
+ default: "assignment != '' ? assignment.overtime_rate : worker.overtime_rate"
87
+ - name: overtime_cost_rate
88
+ type: currency
89
+ label: {id: Upah lembur per jam}
90
+ default: "assignment != '' ? assignment.overtime_cost_rate : worker.overtime_cost_rate"
91
+ - name: amount
92
+ type: currency
93
+ label: {id: Jumlah}
94
+ compute: "(rate_basis == 'hour' ? round(hours * hour_rate) : round(days * day_rate)) + round(overtime_hours * overtime_rate)"
95
+ in_list: true
96
+ - name: cost_amount
97
+ type: currency
98
+ label: {id: Biaya}
99
+ compute: "round((rate_basis == 'hour' ? hours : days) * cost_rate) + round(overtime_hours * overtime_cost_rate)"
100
+ # No pay entered for this work (G5): the cost is not 0, it is unknown. The project margin dashboard counts these so
101
+ # a margin without labour cost is read as incomplete; fix the pay on the worker, then cancel and amend.
102
+ - name: cost_missing
103
+ type: check
104
+ label: {id: Upah belum diisi}
105
+ compute: "cost_rate == 0 || (overtime_hours > 0 && overtime_cost_rate == 0)"
106
+ - name: billable_amount
107
+ type: currency
108
+ label: {id: Jumlah dapat ditagih}
109
+ compute: "billable ? amount : 0"
110
+ rules:
111
+ - name: rates_not_negative
112
+ on: save
113
+ check: day_rate >= 0 && hour_rate >= 0 && cost_rate >= 0 && overtime_rate >= 0 && overtime_cost_rate >= 0
114
+ message: {id: 'Tarif dan upah tidak boleh negatif'}
115
+ - name: days_range
116
+ on: save
117
+ check: rate_basis == 'hour' || period_to != '' || (days > 0 && days <= 1.5)
118
+ message: {id: 'Hari kerja harus lebih dari 0 dan paling banyak 1,5'}
119
+ # A recap covers at most 31 days, never runs backwards, and cannot hold more days present than days in the period.
120
+ # date + duration drops a fraction of a day, so days are rounded up first (round(x + 0.49): 1,5 -> 2, 1,9 -> 2).
121
+ - name: recap_period
122
+ on: save
123
+ check: period_to == '' || (period_to >= work_date && period_to < work_date + duration(31))
124
+ message: {id: 'Periode rekap: sampai tanggal tidak boleh sebelum tanggal mulai, paling lama 31 hari'}
125
+ - name: recap_days
126
+ on: save
127
+ check: >-
128
+ period_to == '' || rate_basis == 'hour'
129
+ || (days >= 0 && (days > 0 || overtime_hours > 0) && work_date + duration(round(days + 0.49) - 1) <= period_to)
130
+ message: {id: 'Hari hadir rekap harus lebih dari 0 dan tidak melebihi jumlah hari di periodenya'}
131
+ - name: overtime_range
132
+ on: save
133
+ check: "overtime_hours >= 0 && (period_to == '' ? overtime_hours <= 24 : work_date + duration(round(overtime_hours / 24 + 0.49) - 1) <= period_to)"
134
+ message: {id: 'Jam lembur tidak boleh negatif atau melebihi jam di periodenya'}
135
+ - name: hour_rate_for_billable_hours
136
+ on: save
137
+ check: rate_basis != 'hour' || !billable || hour_rate > 0
138
+ message: {id: 'Timesheet per jam yang ditagih butuh tarif per jam (isi di tenaga kerja atau penugasan)'}
139
+ - name: hours_range
140
+ on: save
141
+ check: "rate_basis != 'hour' || (hours > 0 && hours <= (period_to == '' ? 24 : 744))"
142
+ message: {id: 'Jam kerja harus lebih dari 0 dan paling banyak 24 per hari'}
143
+ views:
144
+ list:
145
+ columns: [name, project, worker, work_date, period_to, days, status, amount]
146
+ sort: -work_date
147
+ form:
148
+ layout:
149
+ - section: {id: Timesheet}
150
+ columns:
151
+ - [project, worker, assignment]
152
+ - [work_date, period_to, days, hours, overtime_hours]
153
+ - section: {id: Pekerjaan}
154
+ columns:
155
+ - [description, evidence]
156
+ - section: {id: Tagihan}
157
+ columns:
158
+ - [billable, rate_basis, day_rate, hour_rate, overtime_rate, amount]
159
+ - section: {id: Upah (biaya internal)}
160
+ columns:
161
+ - [cost_rate, overtime_cost_rate, cost_amount, cost_missing]
@@ -0,0 +1,11 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
2
+ name: projects
3
+ version: 1.0.0
4
+ title: {id: Proyek, en: Projects}
5
+ summary:
6
+ id: Proyek dengan penugasan, absensi, biaya, termin tagihan dan untung per proyek.
7
+ en: Projects with assignments, attendance, costs, milestone billing and profit per project.
8
+ category: operations
9
+ icon: briefcase-line
10
+ requires: {rangka: '>=0.5', contacts: ^1.0, users: ^1.0, workforce: ^1.0}
11
+ optional: {orders: ^1.0, invoicing: ^1.0, procurement: ^1.0, payroll: ^1.0}
@@ -0,0 +1,201 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: quotation
3
+ label: {id: Penawaran harga, en: Quotation}
4
+ icon: invoice
5
+ is_submittable: true
6
+ naming: {series: quotation, pattern: "QUO-{YYYY}-{#####}"}
7
+ title_field: subject
8
+ permissions:
9
+ - {role: sales_manager, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
10
+ - {role: project_admin, read: true, create: true, write: true, submit: true}
11
+ - {role: finance_manager, read: true, print: true}
12
+ fields:
13
+ - name: customer
14
+ type: link
15
+ to: customer
16
+ label: {id: Pelanggan}
17
+ required: true
18
+ in_list: true
19
+ peek: [npwp, payment_days]
20
+ - name: contact_person
21
+ type: data
22
+ label: {id: Up. (PIC pelanggan)}
23
+ - name: subject
24
+ type: data
25
+ label: {id: Perihal}
26
+ required: true
27
+ - name: rfq_ref
28
+ type: data
29
+ label: {id: No. RFQ}
30
+ - name: rfq_date
31
+ type: date
32
+ label: {id: Tanggal RFQ}
33
+ - name: quotation_date
34
+ type: date
35
+ label: {id: Tanggal penawaran}
36
+ default: today()
37
+ required: true
38
+ in_list: true
39
+ - name: valid_until
40
+ type: date
41
+ label: {id: Berlaku sampai}
42
+ default: quotation_date + duration(30)
43
+ relative_to: quotation_date
44
+ - name: revision
45
+ type: int
46
+ label: {id: Revisi}
47
+ default: '0'
48
+ read_only: true
49
+ in_list: true
50
+ - name: items
51
+ type: table
52
+ of: quotation_item
53
+ label: {id: Barang/jasa}
54
+ min_rows: 1
55
+ - name: subtotal
56
+ type: currency
57
+ label: {id: Subtotal}
58
+ # Foreign-currency document (currency is not IDR): the rupiah subtotal is the IDR twin of subtotal_fx (contract 0013),
59
+ # so dpp, PPN (assessed in rupiah), grand_total, retention, PPh 23 and amount_due stay IDR computes from it.
60
+ # Lines are entered with rate_fx; the IDR line `amount` (qty x rate) cannot see the parent's currency, so the header ignores it.
61
+ compute: "currency != '' && currency != 'IDR' ? subtotal_fx_idr : items.map(i, i.amount).sum()"
62
+ # No header discount: a quotation discounts per line (quotation_item.discount), which the order and the invoice
63
+ # made from it carry as the net line rate. A lump sum is spread over the lines.
64
+ - name: dpp
65
+ type: currency
66
+ label: {id: DPP}
67
+ compute: subtotal
68
+ - name: tax_rate
69
+ type: percent
70
+ label: {id: Tarif PPN}
71
+ help: {id: 'Dari config tax.ppn_rate; 0 bila perusahaan bukan PKP. Tersimpan di dokumen.'}
72
+ default: "tax.pkp ? tax.ppn_rate : 0"
73
+ # Not read_only: a generic amend zeroes read-only fields, and a zero dpp_den would break ppn (kernel follow-up).
74
+ - {name: dpp_num, type: int, label: {id: DPP nilai lain (pembilang)}, default: 'tax.dpp_num'}
75
+ - {name: dpp_den, type: int, label: {id: DPP nilai lain (penyebut)}, default: 'tax.dpp_den'}
76
+ - name: ppn
77
+ type: currency
78
+ label: {id: PPN (DPP x rasio DPP nilai lain x tarif)}
79
+ compute: "round(dpp * dpp_num / dpp_den * tax_rate / 100)"
80
+ - name: grand_total
81
+ type: currency
82
+ label: {id: Total}
83
+ compute: dpp + ppn
84
+ in_list: true
85
+ - name: payment_terms
86
+ type: text
87
+ label: {id: Syarat pembayaran}
88
+ - name: delivery_terms
89
+ type: text
90
+ label: {id: Waktu pelaksanaan}
91
+ - name: outcome
92
+ type: select
93
+ label: {id: Hasil penawaran}
94
+ default: "'open'"
95
+ read_only: true
96
+ in_list: true
97
+ chip: true
98
+ options:
99
+ - {value: open, label: {id: Menunggu}}
100
+ - {value: accepted, label: {id: Diterima}}
101
+ - {value: lost, label: {id: Kalah}}
102
+ - name: lost_reason
103
+ type: text
104
+ label: {id: Alasan kalah}
105
+ read_only: true
106
+ depends_on: outcome == 'lost'
107
+ - name: notes
108
+ type: text
109
+ label: {id: Catatan}
110
+ - {name: currency, type: data, label: {id: Mata uang}, default: "'IDR'"}
111
+ - {name: exchange_rate, type: float, label: {id: Kurs}, default: '1'}
112
+ - {name: subtotal_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Subtotal (valas)}, compute: "sum(items.map(i, i.amount_fx))"}
113
+ - {name: dpp_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: DPP (valas)}, compute: "subtotal_fx"}
114
+ - {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "round(dpp_fx * dpp_num / dpp_den * tax_rate / 100, 2)"}
115
+ - {name: grand_total_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Total (valas)}, compute: "dpp_fx + ppn_fx"}
116
+ rules:
117
+ - name: foreign_needs_rate
118
+ on: save
119
+ check: currency == '' || currency == 'IDR' || exchange_rate > 1
120
+ message: {id: Dokumen valas wajib diisi kursnya (rupiah per 1 unit mata uang asing)}
121
+ - name: tax_valid
122
+ on: save
123
+ check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
124
+ message: {id: Tarif PPN atau faktor DPP tidak valid}
125
+ - name: ppn_needs_pkp
126
+ on: save
127
+ check: tax.pkp || tax_rate == 0
128
+ message: {id: Perusahaan bukan PKP tidak boleh memungut PPN (tarif PPN harus 0)}
129
+ - name: valid_after_date
130
+ on: save
131
+ check: valid_until >= quotation_date
132
+ message: {id: Masa berlaku tidak boleh sebelum tanggal penawaran}
133
+ - name: draft_outcome_open
134
+ on: save
135
+ check: docstatus != 0 || outcome == 'open' || outcome == ''
136
+ message: {id: Penawaran yang belum disubmit harus berstatus menunggu}
137
+ - name: qty_positive
138
+ on: save
139
+ check: "items.map(i, i.qty <= 0 ? 1 : 0).sum() == 0"
140
+ message: {id: Jumlah barang harus lebih dari 0}
141
+ - name: rate_not_negative
142
+ on: save
143
+ check: "items.map(i, i.rate < 0 || i.rate_fx < 0 ? 1 : 0).sum() == 0"
144
+ message: {id: Harga tidak boleh negatif}
145
+ - name: line_discount_range
146
+ on: save
147
+ check: "items.map(i, i.discount < 0 || i.discount > 100 ? 1 : 0).sum() == 0"
148
+ message: {id: Diskon baris antara 0 dan 100 persen}
149
+ actions:
150
+ - name: new_revision
151
+ label: {id: Buat revisi, en: New revision}
152
+ icon: edit
153
+ hook: quotation.revise
154
+ if: (docstatus == 1 || docstatus == 2) && (outcome == 'open' || outcome == '')
155
+ # Args come from the call body: {outcome: accepted|lost, lost_reason}. Needed because a submitted document
156
+ # cannot be edited, so `outcome` is changed only through this hook (docs/kernel-hooks.md).
157
+ - name: mark_outcome
158
+ label: {id: Catat hasil penawaran, en: Record outcome}
159
+ icon: check
160
+ hook: quotation.mark_outcome
161
+ if: docstatus == 1 && (outcome == 'open' || outcome == '')
162
+ - name: make_order
163
+ label: {id: Buat pesanan pelanggan, en: Create customer order}
164
+ icon: check
165
+ primary: true
166
+ hook: orders.from_quotation
167
+ if: docstatus == 1 && outcome == 'accepted'
168
+ approvals:
169
+ - name: manager_approval
170
+ on: submit
171
+ approvers: [sales_manager]
172
+ label: {id: Persetujuan manajer, en: Manager approval}
173
+
174
+ views:
175
+ list:
176
+ columns: [name, customer, subject, quotation_date, revision, status, grand_total, outcome]
177
+ sort: -quotation_date
178
+ form:
179
+ layout:
180
+ - section: {id: Penawaran}
181
+ columns:
182
+ - [customer, contact_person, subject, revision]
183
+ - [rfq_ref, rfq_date, quotation_date, valid_until]
184
+ - section: {id: Barang/jasa}
185
+ fields: [items]
186
+ - section: {id: Harga}
187
+ columns:
188
+ - [subtotal, dpp]
189
+ - [tax_rate, dpp_num, dpp_den, ppn, grand_total]
190
+ - section: {id: Syarat}
191
+ columns:
192
+ - [payment_terms, delivery_terms]
193
+ - section: {id: Hasil}
194
+ columns:
195
+ - [outcome, lost_reason]
196
+ - section: {id: Catatan}
197
+ fields: [notes]
198
+ - section: {id: Mata uang asing}
199
+ columns:
200
+ - [currency, exchange_rate, subtotal_fx]
201
+ - [grand_total_fx]
@@ -0,0 +1,37 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
2
+ name: quotation_item
3
+ is_child: true
4
+ fields:
5
+ - name: item
6
+ type: link
7
+ to: item
8
+ label: {id: Barang/jasa}
9
+ required: true
10
+ - name: description
11
+ type: text
12
+ label: {id: Uraian}
13
+ default: item.item_name
14
+ - name: qty
15
+ type: float
16
+ label: {id: Qty}
17
+ default: '1'
18
+ - name: uom
19
+ type: link
20
+ to: uom
21
+ label: {id: Satuan}
22
+ default: "item.sales_uom != '' ? item.sales_uom : item.stock_uom"
23
+ - name: rate
24
+ type: currency
25
+ label: {id: Harga}
26
+ default: item.rate
27
+ - name: discount
28
+ type: percent
29
+ label: {id: Diskon %}
30
+ default: '0'
31
+ - name: amount
32
+ type: currency
33
+ label: {id: Jumlah}
34
+ compute: round(qty * rate * (1 - discount / 100))
35
+
36
+ - {name: rate_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Harga (valas)}, default: '0'}
37
+ - {name: amount_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Jumlah (valas)}, compute: "round(qty * rate_fx * (1 - discount / 100), 2)"}
@@ -0,0 +1,14 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
2
+ name: quotation
3
+ version: 1.0.0
4
+ title: {id: Penawaran, en: Quotation}
5
+ summary:
6
+ id: Kirim penawaran harga ke pelanggan sebelum jadi pesanan.
7
+ en: Send price quotations to customers before they become orders.
8
+ category: sales
9
+ icon: file-text-line
10
+ requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0}
11
+ optional: {tax_id: ^1.0, currency: ^1.0}
12
+ # Semantics fixed in docs/kernel-hooks.md. orders.from_quotation is declared here because the make_order action lives
13
+ # on quotation; the hook is implemented with the orders module.
14
+ hooks: [quotation.revise, quotation.mark_outcome, orders.from_quotation]
@@ -0,0 +1,65 @@
1
+ {{define "style"}}
2
+ .meta { width: 100%; margin: 12px 0; border-collapse: collapse; }
3
+ .meta td { padding: 2px 6px 2px 0; vertical-align: top; }
4
+ .items { width: 100%; border-collapse: collapse; margin-top: 12px; }
5
+ .items th, .items td { border-bottom: 1px solid #d6d3d1; padding: 6px 8px; text-align: left; vertical-align: top; }
6
+ .items th { border-bottom: 1px solid #1c1917; color: #57534e; font-weight: 600; }
7
+ .num { text-align: right !important; font-variant-numeric: tabular-nums; }
8
+ .totals { width: 50%; margin: 12px 0 0 auto; border-collapse: collapse; }
9
+ .totals td { padding: 3px 8px; }
10
+ .totals tr.grand td { border-top: 2px solid #1c1917; font-weight: 700; }
11
+ .note { margin-top: 14px; font-size: 0.9em; }
12
+ .terms { margin-top: 14px; border-collapse: collapse; }
13
+ .terms td { padding: 2px 8px 2px 0; vertical-align: top; }
14
+ {{end}}
15
+ {{template "letterhead" .}}
16
+ {{$fx := and .Doc.currency (ne .Doc.currency "IDR")}}
17
+ <h1>Surat Penawaran Harga</h1>
18
+ <table class="meta">
19
+ <tr><td>Nomor</td><td>: {{.Doc.name}} Rev.{{printf "%02d" .Doc.revision}}</td><td>Kepada Yth.</td><td>: {{.Links.customer.customer_name}}</td></tr>
20
+ <tr><td>Tanggal</td><td>: {{date .Doc.quotation_date}}</td><td>Alamat</td><td>: {{.Links.customer.address}}</td></tr>
21
+ <tr><td>Perihal</td><td>: {{.Doc.subject}}</td><td>Up.</td><td>: {{.Doc.contact_person}}</td></tr>
22
+ {{if .Doc.rfq_ref}}<tr><td>Ref. RFQ</td><td>: {{.Doc.rfq_ref}}{{if .Doc.rfq_date}} ({{date .Doc.rfq_date}}){{end}}</td><td></td><td></td></tr>{{end}}
23
+ </table>
24
+ <p>Dengan hormat, bersama ini kami sampaikan penawaran harga sebagai berikut.</p>
25
+ <table class="items">
26
+ <thead><tr><th>No</th><th>Uraian</th><th class="num">Qty</th><th>Satuan</th><th class="num">Harga satuan</th><th class="num">Diskon</th><th class="num">Jumlah</th></tr></thead>
27
+ <tbody>
28
+ {{range $i, $row := .Doc.items}}
29
+ <tr>
30
+ <td>{{sub $i -1}}</td>
31
+ <td>{{if $row.description}}{{$row.description}}{{else}}{{$row.item}}{{end}}</td>
32
+ <td class="num">{{number $row.qty}}</td>
33
+ <td>{{$row.uom}}</td>
34
+ <td class="num">{{if $fx}}{{money $row.rate_fx $.Doc.currency}}{{else}}{{rupiah $row.rate}}{{end}}</td>
35
+ <td class="num">{{if $row.discount}}{{number $row.discount}}%{{end}}</td>
36
+ <td class="num">{{if $fx}}{{money $row.amount_fx $.Doc.currency}}{{else}}{{rupiah $row.amount}}{{end}}</td>
37
+ </tr>
38
+ {{end}}
39
+ </tbody>
40
+ </table>
41
+ {{if $fx}}
42
+ <table class="totals">
43
+ <tr><td>Subtotal</td><td class="num">{{money .Doc.subtotal_fx .Doc.currency}}</td></tr>
44
+ {{if taxrate .Doc .Tax}}<tr><td>PPN {{number (taxrate .Doc .Tax)}}%</td><td class="num">{{money .Doc.ppn_fx .Doc.currency}}</td></tr>{{end}}
45
+ <tr class="grand"><td>Total</td><td class="num">{{money .Doc.grand_total_fx .Doc.currency}}</td></tr>
46
+ </table>
47
+ <p class="note">Kurs: 1 {{.Doc.currency}} = {{rupiah .Doc.exchange_rate}}. Setara rupiah (PPN dihitung dalam rupiah):</p>
48
+ {{end}}
49
+ <table class="totals">
50
+ <tr><td>Subtotal</td><td class="num">{{rupiah .Doc.subtotal}}</td></tr>
51
+ <tr><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>
52
+ {{if taxrate .Doc .Tax}}<tr><td>PPN {{number (taxrate .Doc .Tax)}}% (DPP nilai lain {{.Doc.dpp_num}}/{{.Doc.dpp_den}})</td><td class="num">{{rupiah .Doc.ppn}}</td></tr>{{end}}
53
+ <tr class="grand"><td>Total</td><td class="num">{{rupiah .Doc.grand_total}}</td></tr>
54
+ </table>
55
+ <p class="note"><strong>Terbilang:</strong> {{terbilang .Doc.grand_total}}</p>
56
+ <table class="terms">
57
+ <tr><td><strong>Syarat</strong></td><td></td></tr>
58
+ <tr><td>Masa berlaku</td><td>: sampai {{date .Doc.valid_until}}</td></tr>
59
+ {{if .Doc.payment_terms}}<tr><td>Pembayaran</td><td>: {{.Doc.payment_terms}}</td></tr>{{end}}
60
+ {{if .Doc.delivery_terms}}<tr><td>Waktu pelaksanaan</td><td>: {{.Doc.delivery_terms}}</td></tr>{{end}}
61
+ </table>
62
+ {{if .Doc.notes}}<p class="note">{{.Doc.notes}}</p>{{end}}
63
+ <p class="note">Demikian penawaran ini kami sampaikan. Atas perhatian dan kerja samanya kami ucapkan terima kasih.</p>
64
+ <p class="note">Hormat kami,</p>
65
+ {{template "signature" .}}
@@ -0,0 +1,7 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
2
+ name: quotation
3
+ model: quotation
4
+ label: {id: Surat penawaran harga, en: Quotation}
5
+ paper: A4
6
+ template: quotation.html
7
+ default: true
@@ -0,0 +1,19 @@
1
+ # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
2
+ name: rental_booking_on_cancel
3
+ label: {id: Pesanan sewa dibatalkan}
4
+ # Only a booking whose equipment has not gone out can be cancelled, and only while its rent invoice is not submitted
5
+ # (cancel that first). The schedule row becomes cancelled, which frees the units. The deposit journal is reversed by
6
+ # gl_rental_booking_reverse (paid back in full).
7
+ on: rental_booking.cancelled
8
+ steps:
9
+ - {find: rental_schedule, where: booking == event.name, as: s}
10
+ - {find: sales_invoice, where: "docstatus == 1 && notes.contains('(' + event.name + ')')", as: inv}
11
+ - create: rental_guard
12
+ if: s != null && s.state != 'booked'
13
+ set: {reason: "'in_use'", document: event.name}
14
+ - create: rental_guard
15
+ if: inv != null
16
+ set: {reason: "'invoice_submitted'", document: event.name}
17
+ - update: s
18
+ if: s != null
19
+ set: {state: "'cancelled'"}