@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.
- package/index.js +137 -0
- package/package.json +29 -4
- package/template/base/README.md +32 -0
- package/template/base/_gitignore +3 -0
- package/template/base/_vscode/settings.json +4 -0
- package/template/base/apps/crm/app.rk +44 -0
- package/template/base/apps/crm/dashboards/crm_overview.rk +88 -0
- package/template/base/apps/crm/dashboards/sales_overview.rk +66 -0
- package/template/base/apps/crm/processes/lead_to_cash.rk +8 -0
- package/template/base/apps/faktur_piutang/app.rk +31 -0
- package/template/base/apps/faktur_piutang/dashboards/piutang_ringkas.rk +88 -0
- package/template/base/apps/fnb_cabang/app.rk +46 -0
- package/template/base/apps/fnb_cabang/dashboards/fnb_overview.rk +104 -0
- package/template/base/apps/fnb_cabang/dashboards/stock_recap.rk +132 -0
- package/template/base/apps/grosir_distribusi/app.rk +56 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_ar.rk +62 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +87 -0
- package/template/base/apps/jasa_proyek/app.rk +61 -0
- package/template/base/apps/jasa_proyek/dashboards/ar_aging.rk +88 -0
- package/template/base/apps/jasa_proyek/dashboards/jasa_overview.rk +148 -0
- package/template/base/apps/jasa_proyek/dashboards/project_margin.rk +94 -0
- package/template/base/apps/jasa_proyek/processes/quote_to_cash.rk +10 -0
- package/template/base/apps/kasir/app.rk +38 -0
- package/template/base/apps/kasir/dashboards/kasir_ringkas.rk +20 -0
- package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +64 -0
- package/template/base/apps/kelas_kursus/app.rk +29 -0
- package/template/base/apps/kelas_kursus/dashboards/kursus_ringkas.rk +67 -0
- package/template/base/apps/langganan_jasa/app.rk +32 -0
- package/template/base/apps/langganan_jasa/dashboards/langganan_ringkas.rk +167 -0
- package/template/base/apps/langganan_jasa/dashboards/penagihan_saya.rk +54 -0
- package/template/base/apps/mutasi_bank/app.rk +22 -0
- package/template/base/apps/pajak/app.rk +25 -0
- package/template/base/apps/pembelian_pemasok/app.rk +23 -0
- package/template/base/apps/pembukuan/app.rk +19 -0
- package/template/base/apps/penjualan_harian/app.rk +34 -0
- package/template/base/apps/penjualan_harian/dashboards/penjualan_ringkas.rk +87 -0
- package/template/base/apps/produksi_pabrik/app.rk +54 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +101 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_upah.rk +39 -0
- package/template/base/apps/ritel_cabang/app.rk +58 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_overview.rk +137 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_stock.rk +147 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_tax.rk +76 -0
- package/template/base/apps/sewa_alat/app.rk +29 -0
- package/template/base/apps/sewa_alat/dashboards/sewa_ringkas.rk +86 -0
- package/template/base/apps/stok_outlet/app.rk +34 -0
- package/template/base/apps/stok_outlet/dashboards/stok_ringkas.rk +50 -0
- package/template/base/connectors/biteship/connector.rk +246 -0
- package/template/base/connectors/biteship/fixtures/cancel_order.json +1 -0
- package/template/base/connectors/biteship/fixtures/create_order.json +8 -0
- package/template/base/connectors/biteship/fixtures/expect.json +9 -0
- package/template/base/connectors/biteship/fixtures/get_order.json +2 -0
- package/template/base/connectors/biteship/fixtures/get_rates.json +7 -0
- package/template/base/connectors/biteship/fixtures/get_tracking.json +7 -0
- package/template/base/connectors/biteship/fixtures/order_price.json +11 -0
- package/template/base/connectors/biteship/fixtures/order_status.json +15 -0
- package/template/base/connectors/biteship/fixtures/order_status_cancelled.json +15 -0
- package/template/base/connectors/biteship/fixtures/order_waybill.json +7 -0
- package/template/base/connectors/biteship/fixtures/search_areas.json +1 -0
- package/template/base/connectors/loyverse/connector.rk +98 -0
- package/template/base/connectors/moka/connector.rk +86 -0
- package/template/base/connectors/whatsapp_business/connector.rk +89 -0
- package/template/base/connectors/whatsapp_business/templates.md +32 -0
- package/template/base/connectors/xendit/connector.rk +184 -0
- package/template/base/docker-compose.yml +16 -0
- package/template/base/env.example +12 -0
- package/template/base/modules/accounting/flows/financial_report_compute.rk +47 -0
- package/template/base/modules/accounting/flows/financial_report_recompute.rk +47 -0
- package/template/base/modules/accounting/flows/gl_delivery_note_post.rk +37 -0
- package/template/base/modules/accounting/flows/gl_delivery_note_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_goods_receipt_post.rk +41 -0
- package/template/base/modules/accounting/flows/gl_goods_receipt_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_opening_balance_post.rk +132 -0
- package/template/base/modules/accounting/flows/gl_opening_balance_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_return_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_outlet_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_sales_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_outlet_sales_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_takings_post.rk +71 -0
- package/template/base/modules/accounting/flows/gl_outlet_takings_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_payment_post.rk +63 -0
- package/template/base/modules/accounting/flows/gl_payment_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_payroll_close_post.rk +89 -0
- package/template/base/modules/accounting/flows/gl_payroll_close_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_pos_sale_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_pos_sale_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_pos_shift_close_post.rk +59 -0
- package/template/base/modules/accounting/flows/gl_pos_shift_close_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_production_batch_post.rk +62 -0
- package/template/base/modules/accounting/flows/gl_production_batch_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_project_expense_post.rk +64 -0
- package/template/base/modules/accounting/flows/gl_project_expense_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_rental_booking_post.rk +35 -0
- package/template/base/modules/accounting/flows/gl_rental_booking_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_rental_return_post.rk +47 -0
- package/template/base/modules/accounting/flows/gl_rental_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_sales_invoice_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_sales_invoice_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_sales_return_post.rk +40 -0
- package/template/base/modules/accounting/flows/gl_sales_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_adjustment_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_adjustment_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_count_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_count_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_timesheet_post.rk +35 -0
- package/template/base/modules/accounting/flows/gl_timesheet_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +63 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_reverse.rk +194 -0
- package/template/base/modules/accounting/imports/opening_balance_sheet.rk +22 -0
- package/template/base/modules/accounting/models/financial_report.rk +85 -0
- package/template/base/modules/accounting/models/gl_entry.rk +161 -0
- package/template/base/modules/accounting/models/opening_balance.rk +48 -0
- package/template/base/modules/accounting/models/period_close.rk +33 -0
- package/template/base/modules/accounting/module.rk +16 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +19 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +43 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_link_locked.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_matched.rk +13 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_release.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +31 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_unmatched.rk +11 -0
- package/template/base/modules/bank_statement/imports/bank_statement_csv.rk +25 -0
- package/template/base/modules/bank_statement/models/bank_transaction.rk +124 -0
- package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +49 -0
- package/template/base/modules/bank_statement/module.rk +12 -0
- package/template/base/modules/catalogue/imports/item_list.rk +20 -0
- package/template/base/modules/catalogue/imports/item_master.rk +25 -0
- package/template/base/modules/catalogue/models/item.rk +129 -0
- package/template/base/modules/catalogue/models/item_category.rk +27 -0
- package/template/base/modules/catalogue/models/price_list.rk +34 -0
- package/template/base/modules/catalogue/models/price_list_item.rk +21 -0
- package/template/base/modules/catalogue/models/uom.rk +34 -0
- package/template/base/modules/catalogue/models/uom_conversion.rk +44 -0
- package/template/base/modules/catalogue/module.rk +11 -0
- package/template/base/modules/consignment/flows/consignment_bill.rk +39 -0
- package/template/base/modules/consignment/flows/consignment_bill_cancelled.rk +14 -0
- package/template/base/modules/consignment/models/consignment_settlement.rk +111 -0
- package/template/base/modules/consignment/models/consignment_settlement_item.rk +37 -0
- package/template/base/modules/consignment/module.rk +15 -0
- package/template/base/modules/contacts/imports/customer_list.rk +17 -0
- package/template/base/modules/contacts/imports/vendor_list.rk +16 -0
- package/template/base/modules/contacts/models/contact_person.rk +21 -0
- package/template/base/modules/contacts/models/credit_guard.rk +40 -0
- package/template/base/modules/contacts/models/customer.rk +180 -0
- package/template/base/modules/contacts/models/vendor.rk +104 -0
- package/template/base/modules/contacts/module.rk +10 -0
- package/template/base/modules/coretax/models/tax_period.rk +89 -0
- package/template/base/modules/coretax/module.rk +13 -0
- package/template/base/modules/coretax/print/coretax_bupot.rk +26 -0
- package/template/base/modules/coretax/print/coretax_bupot.xml +28 -0
- package/template/base/modules/coretax/print/coretax_faktur.rk +34 -0
- package/template/base/modules/coretax/print/coretax_faktur.xml +58 -0
- package/template/base/modules/courses/flows/charge_cancel_guard.rk +23 -0
- package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +56 -0
- package/template/base/modules/courses/flows/enrollment_seats_on_create.rk +15 -0
- package/template/base/modules/courses/flows/enrollment_seats_on_update.rk +35 -0
- package/template/base/modules/courses/flows/invoice_course_once.rk +22 -0
- package/template/base/modules/courses/flows/invoice_course_tag_lock.rk +16 -0
- package/template/base/modules/courses/flows/session_fill_attendance.rk +16 -0
- package/template/base/modules/courses/flows/student_billing_on_create.rk +25 -0
- package/template/base/modules/courses/models/course_attendance.rk +22 -0
- package/template/base/modules/courses/models/course_batch.rk +112 -0
- package/template/base/modules/courses/models/course_batch_slot.rk +18 -0
- package/template/base/modules/courses/models/course_charge.rk +125 -0
- package/template/base/modules/courses/models/course_guard.rk +50 -0
- package/template/base/modules/courses/models/course_program.rk +101 -0
- package/template/base/modules/courses/models/course_session.rk +90 -0
- package/template/base/modules/courses/models/enrollment.rk +136 -0
- package/template/base/modules/courses/models/student.rk +68 -0
- package/template/base/modules/courses/module.rk +14 -0
- package/template/base/modules/courses/roles/instructor.rk +7 -0
- package/template/base/modules/currency/models/currency.rk +34 -0
- package/template/base/modules/currency/models/exchange_rate.rk +39 -0
- package/template/base/modules/currency/module.rk +10 -0
- package/template/base/modules/delivery/flows/delivery_cancel_guard.rk +18 -0
- package/template/base/modules/delivery/flows/fulfilment_on_delivery_cancelled.rk +21 -0
- package/template/base/modules/delivery/flows/fulfilment_on_delivery_submitted.rk +28 -0
- package/template/base/modules/delivery/flows/fulfilment_on_invoice_cancelled.rk +22 -0
- package/template/base/modules/delivery/flows/fulfilment_on_invoice_submitted.rk +22 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_created.rk +18 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_submitted.rk +16 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_updated.rk +19 -0
- package/template/base/modules/delivery/flows/fulfilment_on_return_cancelled.rk +16 -0
- package/template/base/modules/delivery/flows/fulfilment_on_return_submitted.rk +16 -0
- package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +20 -0
- package/template/base/modules/delivery/flows/order_cancel_guard.rk +10 -0
- package/template/base/modules/delivery/flows/return_cancel_guard.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_payment_cancelled.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_payment_submitted.rk +21 -0
- package/template/base/modules/delivery/flows/return_credit_on_return_cancelled.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_return_submitted.rk +10 -0
- package/template/base/modules/delivery/models/delivery_guard.rk +48 -0
- package/template/base/modules/delivery/models/delivery_note.rk +101 -0
- package/template/base/modules/delivery/models/delivery_note_item.rk +11 -0
- package/template/base/modules/delivery/models/order_fulfilment.rk +27 -0
- package/template/base/modules/delivery/models/order_fulfilment_item.rk +10 -0
- package/template/base/modules/delivery/models/return_credit.rk +23 -0
- package/template/base/modules/delivery/models/sales_return.rk +87 -0
- package/template/base/modules/delivery/models/sales_return_item.rk +16 -0
- package/template/base/modules/delivery/module.rk +16 -0
- package/template/base/modules/delivery/print/delivery_note.html +96 -0
- package/template/base/modules/delivery/print/delivery_note.rk +9 -0
- package/template/base/modules/distribution/flows/credit_on_invoice_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_invoice_submitted.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_order_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_order_submitted.rk +25 -0
- package/template/base/modules/distribution/flows/credit_on_payment_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_payment_submitted.rk +17 -0
- package/template/base/modules/distribution/flows/giro_bounced.rk +20 -0
- package/template/base/modules/distribution/flows/giro_from_payment.rk +21 -0
- package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +17 -0
- package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +17 -0
- package/template/base/modules/distribution/models/giro.rk +79 -0
- package/template/base/modules/distribution/module.rk +14 -0
- package/template/base/modules/invoicing/flows/invoice_due_digest.rk +12 -0
- package/template/base/modules/invoicing/flows/milestone_invoiced.rk +23 -0
- package/template/base/modules/invoicing/flows/milestone_reopened.rk +19 -0
- package/template/base/modules/invoicing/flows/payment_instruction_on_submit.rk +25 -0
- package/template/base/modules/invoicing/flows/project_billed_on_cancel.rk +16 -0
- package/template/base/modules/invoicing/flows/project_billed_on_submit.rk +16 -0
- package/template/base/modules/invoicing/flows/project_revenue_on_cancel.rk +22 -0
- package/template/base/modules/invoicing/flows/project_revenue_on_submit.rk +17 -0
- package/template/base/modules/invoicing/flows/sales_invoice_credit_recheck.rk +18 -0
- package/template/base/modules/invoicing/models/bank_account.rk +134 -0
- package/template/base/modules/invoicing/models/invoice_reminder.rk +83 -0
- package/template/base/modules/invoicing/models/payment_instruction.rk +72 -0
- package/template/base/modules/invoicing/models/sales_invoice.rk +480 -0
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +53 -0
- package/template/base/modules/invoicing/module.rk +14 -0
- package/template/base/modules/invoicing/print/sales_invoice.html +163 -0
- package/template/base/modules/invoicing/print/sales_invoice.rk +14 -0
- package/template/base/modules/invoicing/print/sales_invoice_nota.html +71 -0
- package/template/base/modules/invoicing/print/sales_invoice_nota.rk +13 -0
- package/template/base/modules/invoicing/print/sales_invoice_whatsapp.html +45 -0
- package/template/base/modules/invoicing/print/sales_invoice_whatsapp.rk +15 -0
- package/template/base/modules/orders/models/customer_order.rk +186 -0
- package/template/base/modules/orders/models/customer_order_item.rk +49 -0
- package/template/base/modules/orders/module.rk +14 -0
- package/template/base/modules/outlet_sales/flows/moka_legacy_key_overlap.rk +22 -0
- package/template/base/modules/outlet_sales/flows/refund_on_return_cancelled.rk +15 -0
- package/template/base/modules/outlet_sales/flows/refund_on_return_submitted.rk +26 -0
- package/template/base/modules/outlet_sales/flows/refund_on_sales_submitted.rk +14 -0
- package/template/base/modules/outlet_sales/flows/sales_cancel_guard.rk +14 -0
- package/template/base/modules/outlet_sales/imports/daily_form.rk +22 -0
- package/template/base/modules/outlet_sales/imports/loyverse_receipts.rk +28 -0
- package/template/base/modules/outlet_sales/imports/moka_item_details.rk +34 -0
- package/template/base/modules/outlet_sales/imports/pos_sales_file.rk +28 -0
- package/template/base/modules/outlet_sales/imports/takings_file.rk +23 -0
- package/template/base/modules/outlet_sales/models/outlet_return.rk +66 -0
- package/template/base/modules/outlet_sales/models/outlet_return_item.rk +7 -0
- package/template/base/modules/outlet_sales/models/outlet_sales.rk +175 -0
- package/template/base/modules/outlet_sales/models/outlet_sales_guard.rk +35 -0
- package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +40 -0
- package/template/base/modules/outlet_sales/models/outlet_takings.rk +85 -0
- package/template/base/modules/outlet_sales/models/outlet_takings_line.rk +37 -0
- package/template/base/modules/outlet_sales/models/pos_refund.rk +33 -0
- package/template/base/modules/outlet_sales/models/pos_refund_item.rk +9 -0
- package/template/base/modules/outlet_sales/module.rk +12 -0
- package/template/base/modules/outlets/models/outlet.rk +75 -0
- package/template/base/modules/outlets/module.rk +10 -0
- package/template/base/modules/payments/flows/payment_from_xendit_invoice.rk +59 -0
- package/template/base/modules/payments/flows/payment_from_xendit_qr.rk +59 -0
- package/template/base/modules/payments/flows/payment_from_xendit_va.rk +59 -0
- package/template/base/modules/payments/flows/payment_gateway_claim_created.rk +19 -0
- package/template/base/modules/payments/flows/payment_gateway_claim_submitted.rk +19 -0
- package/template/base/modules/payments/flows/payment_gateway_release.rk +12 -0
- package/template/base/modules/payments/models/gateway_ref_claim.rk +42 -0
- package/template/base/modules/payments/models/payment.rk +214 -0
- package/template/base/modules/payments/models/payment_allocation.rk +35 -0
- package/template/base/modules/payments/models/withholding.rk +76 -0
- package/template/base/modules/payments/module.rk +13 -0
- package/template/base/modules/payments/print/statement.html +55 -0
- package/template/base/modules/payments/print/statement.rk +13 -0
- package/template/base/modules/payroll/flows/invoice_payroll_once.rk +20 -0
- package/template/base/modules/payroll/flows/invoice_payroll_tag_lock.rk +13 -0
- package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +35 -0
- package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +66 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_totals_on_payslip_cancel.rk +29 -0
- package/template/base/modules/payroll/flows/payroll_totals_on_payslip_submit.rk +29 -0
- package/template/base/modules/payroll/flows/payslip_cancel_guard.rk +14 -0
- package/template/base/modules/payroll/flows/payslip_from_recap.rk +47 -0
- package/template/base/modules/payroll/flows/payslip_month_guard_created.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_month_guard_submitted.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_order_guard_cancelled.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_order_guard_submitted.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_pay_overlap_guard.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_ytd_guard.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +20 -0
- package/template/base/modules/payroll/flows/recap_cancel_guard.rk +15 -0
- package/template/base/modules/payroll/models/payroll_close.rk +80 -0
- package/template/base/modules/payroll/models/payroll_guard.rk +74 -0
- package/template/base/modules/payroll/models/payroll_profile.rk +136 -0
- package/template/base/modules/payroll/models/payroll_run.rk +220 -0
- package/template/base/modules/payroll/models/payslip.rk +293 -0
- package/template/base/modules/payroll/module.rk +13 -0
- package/template/base/modules/payroll/print/payslip.html +53 -0
- package/template/base/modules/payroll/print/payslip.rk +7 -0
- package/template/base/modules/pipeline/flows/morning_follow_up.rk +10 -0
- package/template/base/modules/pipeline/flows/whatsapp_to_lead.rk +24 -0
- package/template/base/modules/pipeline/models/activity.rk +83 -0
- package/template/base/modules/pipeline/models/deal.rk +139 -0
- package/template/base/modules/pipeline/models/lead.rk +119 -0
- package/template/base/modules/pipeline/module.rk +12 -0
- package/template/base/modules/pos/flows/pos_daily_form_guard.rk +18 -0
- package/template/base/modules/pos/flows/pos_sale_on_cancel.rk +33 -0
- package/template/base/modules/pos/flows/pos_sale_on_submit.rk +46 -0
- package/template/base/modules/pos/flows/pos_shift_close_on_cancel.rk +26 -0
- package/template/base/modules/pos/flows/pos_shift_close_on_submit.rk +23 -0
- package/template/base/modules/pos/flows/pos_shift_on_create.rk +21 -0
- package/template/base/modules/pos/flows/pos_shift_on_update.rk +10 -0
- package/template/base/modules/pos/flows/pos_takings_guard.rk +28 -0
- package/template/base/modules/pos/models/pos_guard.rk +76 -0
- package/template/base/modules/pos/models/pos_payment.rk +17 -0
- package/template/base/modules/pos/models/pos_sale.rk +222 -0
- package/template/base/modules/pos/models/pos_sale_item.rk +43 -0
- package/template/base/modules/pos/models/pos_shift.rk +92 -0
- package/template/base/modules/pos/models/pos_shift_close.rk +77 -0
- package/template/base/modules/pos/module.rk +22 -0
- package/template/base/modules/pos/print/pos_receipt.html +50 -0
- package/template/base/modules/pos/print/pos_receipt.rk +9 -0
- package/template/base/modules/pos/screens/kasir.rk +41 -0
- package/template/base/modules/procurement/flows/project_vendor_cost_on_cancel.rk +22 -0
- package/template/base/modules/procurement/flows/project_vendor_cost_on_submit.rk +17 -0
- package/template/base/modules/procurement/imports/opening_stock.rk +25 -0
- package/template/base/modules/procurement/models/goods_receipt.rk +85 -0
- package/template/base/modules/procurement/models/goods_receipt_item.rk +42 -0
- package/template/base/modules/procurement/models/purchase_order.rk +156 -0
- package/template/base/modules/procurement/models/purchase_order_item.rk +46 -0
- package/template/base/modules/procurement/models/purchase_request.rk +91 -0
- package/template/base/modules/procurement/models/purchase_request_item.rk +35 -0
- package/template/base/modules/procurement/models/vendor_bill.rk +272 -0
- package/template/base/modules/procurement/models/vendor_bill_item.rk +33 -0
- package/template/base/modules/procurement/module.rk +14 -0
- package/template/base/modules/procurement/print/purchase_order.html +120 -0
- package/template/base/modules/procurement/print/purchase_order.rk +7 -0
- package/template/base/modules/production/flows/batch_cancel_guard.rk +12 -0
- package/template/base/modules/production/flows/batch_from_bom.rk +19 -0
- package/template/base/modules/production/flows/wage_sheet_on_batch_cancelled.rk +14 -0
- package/template/base/modules/production/flows/wage_sheet_on_batch_submitted.rk +12 -0
- package/template/base/modules/production/flows/work_order_materials_created.rk +20 -0
- package/template/base/modules/production/flows/work_order_materials_updated.rk +20 -0
- package/template/base/modules/production/models/bom.rk +67 -0
- package/template/base/modules/production/models/bom_byproduct.rk +7 -0
- package/template/base/modules/production/models/bom_line.rk +11 -0
- package/template/base/modules/production/models/production_batch.rk +149 -0
- package/template/base/modules/production/models/production_guard.rk +23 -0
- package/template/base/modules/production/models/production_labour.rk +10 -0
- package/template/base/modules/production/models/production_material.rk +8 -0
- package/template/base/modules/production/models/production_output.rk +8 -0
- package/template/base/modules/production/models/production_stage.rk +19 -0
- package/template/base/modules/production/models/wage_line.rk +15 -0
- package/template/base/modules/production/models/wage_sheet.rk +28 -0
- package/template/base/modules/production/models/work_order.rk +63 -0
- package/template/base/modules/production/models/work_order_material.rk +8 -0
- package/template/base/modules/production/module.rk +17 -0
- package/template/base/modules/production/print/wage_sheet.html +75 -0
- package/template/base/modules/production/print/wage_sheet.rk +9 -0
- package/template/base/modules/projects/flows/milestone_back_on_acceptance_cancel.rk +15 -0
- package/template/base/modules/projects/flows/milestone_lock_on_update.rk +16 -0
- package/template/base/modules/projects/flows/milestone_ready_on_acceptance.rk +40 -0
- package/template/base/modules/projects/flows/milestone_scheduled_on_create.rk +14 -0
- package/template/base/modules/projects/flows/milestone_scheduled_on_update.rk +27 -0
- package/template/base/modules/projects/flows/project_expense_on_cancel.rk +21 -0
- package/template/base/modules/projects/flows/project_expense_on_submit.rk +16 -0
- package/template/base/modules/projects/flows/project_labor_on_cancel.rk +22 -0
- package/template/base/modules/projects/flows/project_labor_on_submit.rk +17 -0
- package/template/base/modules/projects/flows/project_terms_lock.rk +26 -0
- package/template/base/modules/projects/flows/timesheet_assignment_on_create.rk +28 -0
- package/template/base/modules/projects/flows/vendor_bill_cancel_guard.rk +15 -0
- package/template/base/modules/projects/imports/attendance_recap.rk +23 -0
- package/template/base/modules/projects/imports/billing_milestone.rk +20 -0
- package/template/base/modules/projects/models/acceptance.rk +68 -0
- package/template/base/modules/projects/models/assignment.rk +96 -0
- package/template/base/modules/projects/models/billing_milestone.rk +217 -0
- package/template/base/modules/projects/models/project.rk +155 -0
- package/template/base/modules/projects/models/project_expense.rk +121 -0
- package/template/base/modules/projects/models/project_guard.rk +27 -0
- package/template/base/modules/projects/models/project_ledger.rk +146 -0
- package/template/base/modules/projects/models/timesheet.rk +161 -0
- package/template/base/modules/projects/module.rk +11 -0
- package/template/base/modules/quotation/models/quotation.rk +201 -0
- package/template/base/modules/quotation/models/quotation_item.rk +37 -0
- package/template/base/modules/quotation/module.rk +14 -0
- package/template/base/modules/quotation/print/quotation.html +65 -0
- package/template/base/modules/quotation/print/quotation.rk +7 -0
- package/template/base/modules/rental/flows/rental_booking_on_cancel.rk +19 -0
- package/template/base/modules/rental/flows/rental_booking_on_submit.rk +45 -0
- package/template/base/modules/rental/flows/rental_checkout_on_cancel.rk +13 -0
- package/template/base/modules/rental/flows/rental_checkout_on_submit.rk +21 -0
- package/template/base/modules/rental/flows/rental_invoice_once.rk +20 -0
- package/template/base/modules/rental/flows/rental_invoice_tag_lock.rk +12 -0
- package/template/base/modules/rental/flows/rental_return_on_cancel.rk +15 -0
- package/template/base/modules/rental/flows/rental_return_on_submit.rk +28 -0
- package/template/base/modules/rental/models/rental_booking.rk +123 -0
- package/template/base/modules/rental/models/rental_checkout.rk +37 -0
- package/template/base/modules/rental/models/rental_guard.rk +72 -0
- package/template/base/modules/rental/models/rental_item.rk +75 -0
- package/template/base/modules/rental/models/rental_return.rk +83 -0
- package/template/base/modules/rental/models/rental_schedule.rk +49 -0
- package/template/base/modules/rental/module.rk +19 -0
- package/template/base/modules/stock/flows/adjustment_value_backfill.rk +95 -0
- package/template/base/modules/stock/flows/adjustment_value_on_cancel.rk +19 -0
- package/template/base/modules/stock/flows/adjustment_value_on_submit.rk +17 -0
- package/template/base/modules/stock/flows/stock_negative_alert.rk +15 -0
- package/template/base/modules/stock/models/recipe.rk +68 -0
- package/template/base/modules/stock/models/recipe_line.rk +24 -0
- package/template/base/modules/stock/models/stock_adjustment.rk +62 -0
- package/template/base/modules/stock/models/stock_adjustment_item.rk +32 -0
- package/template/base/modules/stock/models/stock_adjustment_value.rk +79 -0
- package/template/base/modules/stock/models/stock_balance.rk +27 -0
- package/template/base/modules/stock/models/stock_count.rk +54 -0
- package/template/base/modules/stock/models/stock_count_item.rk +33 -0
- package/template/base/modules/stock/models/stock_move.rk +53 -0
- package/template/base/modules/stock/models/stock_transfer.rk +70 -0
- package/template/base/modules/stock/models/stock_transfer_item.rk +34 -0
- package/template/base/modules/stock/models/stock_transfer_receipt.rk +57 -0
- package/template/base/modules/stock/models/stock_transfer_receipt_item.rk +18 -0
- package/template/base/modules/stock/module.rk +13 -0
- package/template/base/modules/subscriptions/flows/collector_deposit_on_submit.rk +57 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_kept.rk +17 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_not_cancelled.rk +14 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_not_deleted.rk +14 -0
- package/template/base/modules/subscriptions/flows/field_collection_cap_created.rk +24 -0
- package/template/base/modules/subscriptions/flows/field_collection_cap_updated.rk +24 -0
- package/template/base/modules/subscriptions/flows/field_collection_locked.rk +12 -0
- package/template/base/modules/subscriptions/flows/field_collection_not_deleted.rk +10 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_kept.rk +19 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_once.rk +34 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_tag_lock.rk +13 -0
- package/template/base/modules/subscriptions/flows/service_area_collector.rk +14 -0
- package/template/base/modules/subscriptions/flows/subscription_billing.rk +79 -0
- package/template/base/modules/subscriptions/flows/subscription_dunning.rk +81 -0
- package/template/base/modules/subscriptions/flows/subscription_extra_locked.rk +14 -0
- package/template/base/modules/subscriptions/flows/subscription_status_on_payment.rk +48 -0
- package/template/base/modules/subscriptions/models/collector_deposit.rk +36 -0
- package/template/base/modules/subscriptions/models/field_collection.rk +42 -0
- package/template/base/modules/subscriptions/models/service_area.rk +19 -0
- package/template/base/modules/subscriptions/models/subscription.rk +233 -0
- package/template/base/modules/subscriptions/models/subscription_bill.rk +48 -0
- package/template/base/modules/subscriptions/models/subscription_extra.rk +50 -0
- package/template/base/modules/subscriptions/models/subscription_guard.rk +65 -0
- package/template/base/modules/subscriptions/models/subscription_month.rk +29 -0
- package/template/base/modules/subscriptions/models/subscription_plan.rk +75 -0
- package/template/base/modules/subscriptions/models/subscription_status_log.rk +27 -0
- package/template/base/modules/subscriptions/module.rk +18 -0
- package/template/base/modules/subscriptions/roles/collector.rk +7 -0
- package/template/base/modules/tax_id/models/tax_code.rk +49 -0
- package/template/base/modules/tax_id/module.rk +10 -0
- package/template/base/modules/users/models/user.rk +29 -0
- package/template/base/modules/users/module.rk +10 -0
- package/template/base/modules/users/roles/cashier.rk +8 -0
- package/template/base/modules/users/roles/course_admin.rk +4 -0
- package/template/base/modules/users/roles/field_sales.rk +7 -0
- package/template/base/modules/users/roles/finance_manager.rk +4 -0
- package/template/base/modules/users/roles/head_office.rk +4 -0
- package/template/base/modules/users/roles/outlet_staff.rk +6 -0
- package/template/base/modules/users/roles/project_admin.rk +4 -0
- package/template/base/modules/users/roles/purchasing_manager.rk +4 -0
- package/template/base/modules/users/roles/sales_manager.rk +4 -0
- package/template/base/modules/users/roles/sales_rep.rk +4 -0
- package/template/base/modules/workforce/imports/worker_list.rk +21 -0
- package/template/base/modules/workforce/models/certification.rk +25 -0
- package/template/base/modules/workforce/models/worker.rk +94 -0
- package/template/base/modules/workforce/module.rk +10 -0
- package/template/base/package.json +17 -0
- package/template/blank/fixtures/start.rk +5 -0
- package/template/blank/site/config.rk +13 -0
- package/template/blank/site/custom/README.md +2 -0
- package/template/blank/site/features.rk +13 -0
- package/template/blank/site/layouts/main.rk +14 -0
- package/template/blank/site/system.rk +20 -0
- package/template/blank/site/themes/main.rk +8 -0
- package/template/demo/fixtures/crm_demo.rk +168 -0
- package/template/demo/fixtures/demo.rk +417 -0
- package/template/demo/site/config.rk +13 -0
- package/template/demo/site/features.rk +13 -0
- package/template/demo/site/layouts/crm_first.rk +23 -0
- package/template/demo/site/system.rk +26 -0
- package/template/demo/site/themes/kopi_senja.rk +10 -0
- package/README.md +0 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# A submitted sale with refund lines (qty < 0, from a POS file, Moka or Loyverse) gets its Retur di kasir: one row per
|
|
3
|
+
# refund line, nothing returned yet. Its goods stay out of stock until a Retur ke stok brings them back.
|
|
4
|
+
name: refund_on_sales_submitted
|
|
5
|
+
label: {id: Catat retur di kasir}
|
|
6
|
+
on: outlet_sales.submitted
|
|
7
|
+
if: "event.lines.map(l, l.qty < 0 ? 1 : 0).sum() > 0"
|
|
8
|
+
steps:
|
|
9
|
+
- create: pos_refund
|
|
10
|
+
set:
|
|
11
|
+
sales: event.name
|
|
12
|
+
outlet: event.outlet
|
|
13
|
+
date: event.date
|
|
14
|
+
items: "event.lines.filter(l, l.qty < 0).map(l, {'item': l.item, 'refunded_qty': 0 - l.qty, 'returned_qty': 0})"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# Inside an outlet_sales cancel: refused while a live Retur ke stok comes from it. The return's goods came in at this
|
|
3
|
+
# sale's cost; cancelling the sale would put its goods back as well, so they would be counted back twice.
|
|
4
|
+
name: sales_cancel_guard
|
|
5
|
+
label: {id: Penjualan yang sudah dikembalikan ke stok tidak bisa dibatalkan}
|
|
6
|
+
on: outlet_sales.cancelled
|
|
7
|
+
steps:
|
|
8
|
+
# the Retur di kasir first: its lock is the one the return's submit flow takes, so a cancel and a submit of the same
|
|
9
|
+
# sale run one after the other and the later one sees the other (audit stock-returns M1)
|
|
10
|
+
- {find: pos_refund, where: sales == event.name, as: rf}
|
|
11
|
+
- {find: outlet_return, where: sales == event.name && docstatus == 1, as: ret}
|
|
12
|
+
- if: ret != null
|
|
13
|
+
create: outlet_sales_guard
|
|
14
|
+
set: {reason: "'sales_returned'", document: ret.name}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/import.json
|
|
2
|
+
# The daily sales sheet an outlet fills in when it has no Moka export: one row per item sold, one file per day.
|
|
3
|
+
# No key on purpose: import keys are never released, so with [Tanggal, SKU] a corrected sheet for a day could not
|
|
4
|
+
# import again even after the old record was cancelled. The same file twice is still refused by its hash, and two
|
|
5
|
+
# submitted forms for one outlet and day are refused at submit (409 duplicate_sales).
|
|
6
|
+
name: daily_form
|
|
7
|
+
label: {id: Formulir penjualan harian, en: Daily sales form}
|
|
8
|
+
model: outlet_sales
|
|
9
|
+
source: csv
|
|
10
|
+
header_row: 1
|
|
11
|
+
per: outlet
|
|
12
|
+
group: [Tanggal]
|
|
13
|
+
map:
|
|
14
|
+
date: Tanggal
|
|
15
|
+
source: "='form'"
|
|
16
|
+
lines:
|
|
17
|
+
field: lines
|
|
18
|
+
map:
|
|
19
|
+
item: {value: SKU, match: sku}
|
|
20
|
+
qty: Jumlah
|
|
21
|
+
gross: Penjualan kotor
|
|
22
|
+
discount: Diskon
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/import.json
|
|
2
|
+
# Loyverse Back Office "Receipts by item" export (Reports > Receipts > Export > Receipts by item), one store per file.
|
|
3
|
+
# GUESSED HEADERS: taken from Loyverse's help pages, not from a real export yet. Check them against the first real
|
|
4
|
+
# file and fix them here (the Moka import failed on guessed headers before rangka-apps P2).
|
|
5
|
+
# Loyverse writes a refund as its own receipt (Receipt type "Refund") with a positive Quantity; it is turned into a
|
|
6
|
+
# negative line with its Net sales in refund, so net sales match Loyverse; the sign of Quantity and Net sales on a
|
|
7
|
+
# refund row does not matter (both are taken as amounts). The Date column must be a date without
|
|
8
|
+
# the time (set the export's date format in Loyverse), else the row is refused.
|
|
9
|
+
name: loyverse_receipts
|
|
10
|
+
label: {id: Penjualan Loyverse (per barang), en: Loyverse sales (receipts by item)}
|
|
11
|
+
model: outlet_sales
|
|
12
|
+
source: csv
|
|
13
|
+
header_row: 1
|
|
14
|
+
per: outlet
|
|
15
|
+
key: [Date, Receipt number, SKU, Variant]
|
|
16
|
+
group: [Date]
|
|
17
|
+
map:
|
|
18
|
+
date: Date
|
|
19
|
+
source: "='loyverse'"
|
|
20
|
+
note: "='Loyverse ' + row['Date']"
|
|
21
|
+
lines:
|
|
22
|
+
field: lines
|
|
23
|
+
map:
|
|
24
|
+
item: {value: SKU, match: sku}
|
|
25
|
+
qty: "=row['Receipt type'] == 'Refund' ? -max(double(row['Quantity']), -double(row['Quantity'])) : double(row['Quantity'])"
|
|
26
|
+
gross: "=row['Receipt type'] == 'Refund' ? 0 : int(row['Gross sales'])"
|
|
27
|
+
discount: "=row['Receipt type'] == 'Refund' ? 0 : int(row['Discounts'])"
|
|
28
|
+
refund: "=row['Receipt type'] == 'Refund' ? max(int(row['Net sales']), -int(row['Net sales'])) : 0"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/import.json
|
|
2
|
+
# Moka Backoffice "Export Item Details" (Reports > Transactions > Export > Item Details), one file per outlet and day
|
|
3
|
+
# (or several days), unzipped. The 25 English headers (Outlet, Receipt Number, Date, Time, Category, Brand, Items,
|
|
4
|
+
# Variant, SKU, Quantity, Modifier Applied, Discount Applied, Gross Sales, Discounts, Refunds, Net Sales, Gratuity, Tax,
|
|
5
|
+
# Sales Type, Collected By, Served By, Customer, Payment Method, Event Type, Reason of Refund) come from code that reads
|
|
6
|
+
# real exports; columns are matched by name, so their order does not matter. Dates are dd-mm-yyyy (rangka-os #32).
|
|
7
|
+
# When a pilot's real export differs, fix the headers here, not in the kernel.
|
|
8
|
+
# One outlet per file (choose it at upload): a row whose Outlet is not that outlet's moka_name is refused, so an All
|
|
9
|
+
# Outlets export or a file uploaded for the wrong outlet cannot land in another outlet's stock.
|
|
10
|
+
# Time is in the key: two partial refunds of one item on one receipt are two rows, not a "Baris ganda". Keys stored
|
|
11
|
+
# before Time joined do not match, so a day imported earlier is held at submit (outlet_sales.legacy_key_reviewed).
|
|
12
|
+
# Same file twice -> duplicate (file hash). Overlapping exports -> only rows whose key is new. Records arrive as drafts.
|
|
13
|
+
name: moka_item_details
|
|
14
|
+
label: {id: Penjualan Moka (detail item), en: Moka sales (item details)}
|
|
15
|
+
model: outlet_sales
|
|
16
|
+
source: csv
|
|
17
|
+
header_row: 1
|
|
18
|
+
per: outlet
|
|
19
|
+
key: [Date, Time, Receipt Number, Items, Variant, Modifier Applied]
|
|
20
|
+
group: [Date, Outlet]
|
|
21
|
+
map:
|
|
22
|
+
date: Date
|
|
23
|
+
source: "='moka'"
|
|
24
|
+
moka_outlet: Outlet
|
|
25
|
+
key_version: "=2"
|
|
26
|
+
note: "='Moka ' + row['Date']"
|
|
27
|
+
lines:
|
|
28
|
+
field: lines
|
|
29
|
+
map:
|
|
30
|
+
item: {value: SKU, match: sku}
|
|
31
|
+
qty: Quantity
|
|
32
|
+
gross: Gross Sales
|
|
33
|
+
discount: Discounts
|
|
34
|
+
refund: Refunds
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/import.json
|
|
2
|
+
# Juragan's sales template for any POS without its own import (Kasir Pintar, Pawoon, majoo, Olsera, a spreadsheet):
|
|
3
|
+
# one row per item sold per day, one outlet per file. Headers: Tanggal, No struk, Jenis (Jual or Retur), SKU, Qty,
|
|
4
|
+
# Penjualan kotor, Diskon, Retur. A return is its own row (Jenis Retur) with a negative Qty, Penjualan kotor 0 and the
|
|
5
|
+
# returned value in Retur, as Moka writes it. No struk may be empty when the POS only exports a daily total per item:
|
|
6
|
+
# then each SKU appears once per day and Jenis. The key leaves Qty out on purpose: a re-export of a day whose totals
|
|
7
|
+
# changed skips the rows already imported instead of adding them a second time; correct such a day on its draft.
|
|
8
|
+
# The outlet must have Sumber penjualan = File POS. Same file twice -> duplicate; overlapping files -> only new rows.
|
|
9
|
+
name: pos_sales_file
|
|
10
|
+
label: {id: Penjualan dari file POS, en: Sales from a POS file}
|
|
11
|
+
model: outlet_sales
|
|
12
|
+
source: csv
|
|
13
|
+
header_row: 1
|
|
14
|
+
per: outlet
|
|
15
|
+
key: [Tanggal, No struk, Jenis, SKU]
|
|
16
|
+
group: [Tanggal]
|
|
17
|
+
map:
|
|
18
|
+
date: Tanggal
|
|
19
|
+
source: "='file'"
|
|
20
|
+
note: "='File POS ' + row['Tanggal']"
|
|
21
|
+
lines:
|
|
22
|
+
field: lines
|
|
23
|
+
map:
|
|
24
|
+
item: {value: SKU, match: sku}
|
|
25
|
+
qty: Qty
|
|
26
|
+
gross: Penjualan kotor
|
|
27
|
+
discount: Diskon
|
|
28
|
+
refund: Retur
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/import.json
|
|
2
|
+
# Juragan's daily takings template, one outlet per file: Tanggal, Metode (Tunai, QRIS, Kartu debit, Kartu kredit,
|
|
3
|
+
# Transfer bank, Dompet digital, Lainnya), Menurut POS, Disetor, Potongan, Referensi. Fill Menurut POS from the POS's
|
|
4
|
+
# payment report (Moka "Payment Methods", Loyverse "Sales by payment type"); a native import of those reports waits
|
|
5
|
+
# for a real export file.
|
|
6
|
+
name: takings_file
|
|
7
|
+
label: {id: Setoran harian (template), en: Daily takings (template)}
|
|
8
|
+
model: outlet_takings
|
|
9
|
+
source: csv
|
|
10
|
+
header_row: 1
|
|
11
|
+
per: outlet
|
|
12
|
+
key: [Tanggal, Metode]
|
|
13
|
+
group: [Tanggal]
|
|
14
|
+
map:
|
|
15
|
+
date: Tanggal
|
|
16
|
+
lines:
|
|
17
|
+
field: lines
|
|
18
|
+
map:
|
|
19
|
+
method: "=row['Metode'] == 'Tunai' ? 'cash' : row['Metode'] == 'QRIS' ? 'qris' : row['Metode'] == 'Kartu debit' ? 'debit' : row['Metode'] == 'Kartu kredit' ? 'credit' : row['Metode'] == 'Transfer bank' ? 'transfer' : row['Metode'] == 'Dompet digital' ? 'ewallet' : 'other'"
|
|
20
|
+
expected: Menurut POS
|
|
21
|
+
received: Disetor
|
|
22
|
+
fee: Potongan
|
|
23
|
+
bank_ref: Referensi
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Retur ke stok: refunded goods that go back into the outlet's stock. It names the Retur di kasir (pos_refund) it
|
|
3
|
+
# comes from; no more of an item than was refunded and not yet returned can come back. Each line goes back through
|
|
4
|
+
# the item's active recipe (contract 0022): an item sold as is (retail) comes back as itself, a menu item of a
|
|
5
|
+
# cancelled order that was never cooked brings back its materials; every unit at the cost the sale took it out
|
|
6
|
+
# (cost source: the outlet_sales of the refund), or at the outlet average when that sale took none of it (a refund of
|
|
7
|
+
# an earlier day's receipt). A refund that is thrown away gets no return.
|
|
8
|
+
name: outlet_return
|
|
9
|
+
label: {id: Retur ke stok, en: Return to stock}
|
|
10
|
+
icon: stock
|
|
11
|
+
is_submittable: true
|
|
12
|
+
naming: RTS-{YYYY}-{#####}
|
|
13
|
+
title_field: refund
|
|
14
|
+
on_submit: [stock.post_moves]
|
|
15
|
+
on_cancel: [stock.reverse_moves]
|
|
16
|
+
permissions:
|
|
17
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
18
|
+
- {role: outlet_staff, read: true, create: true, write: true, delete: true, submit: true, print: true}
|
|
19
|
+
fields:
|
|
20
|
+
- {name: refund, type: link, to: pos_refund, label: {id: Retur di kasir}, required: true, in_list: true, peek: [date, outlet, open_qty]}
|
|
21
|
+
- {name: sales, type: link, to: outlet_sales, label: {id: Penjualan}, default: refund.sales, read_only: true, in_list: true}
|
|
22
|
+
- {name: outlet, type: link, to: outlet, label: {id: Masuk ke outlet}, default: refund.outlet, read_only: true, in_list: true}
|
|
23
|
+
- {name: return_date, type: date, label: {id: Tanggal kembali ke stok}, default: today(), required: true, in_list: true}
|
|
24
|
+
- {name: items, type: table, of: outlet_return_item, label: {id: Barang}, min_rows: 1}
|
|
25
|
+
- {name: qty_total, type: float, label: {id: Total qty}, compute: "items.map(l, l.qty).sum()", in_list: true}
|
|
26
|
+
- {name: notes, type: text, label: {id: Catatan}}
|
|
27
|
+
stock:
|
|
28
|
+
date: return_date
|
|
29
|
+
moves:
|
|
30
|
+
- {lines: items, in: outlet, explode: recipe, reason: return_in, cost: {source: sales}}
|
|
31
|
+
rules:
|
|
32
|
+
- name: qty_positive
|
|
33
|
+
on: save
|
|
34
|
+
check: "items.map(i, i.qty <= 0 ? 1 : 0).sum() == 0"
|
|
35
|
+
message: {id: Jumlah barang harus lebih dari 0}
|
|
36
|
+
- name: refund_matches
|
|
37
|
+
on: save
|
|
38
|
+
check: sales == refund.sales && outlet == refund.outlet && sales.docstatus == 1
|
|
39
|
+
message: {id: 'Retur ke stok hanya dari penjualan yang sudah diajukan; kalau penjualannya dibatalkan, returnya tidak bisa kembali ke stok'}
|
|
40
|
+
- name: date_in_range
|
|
41
|
+
on: save
|
|
42
|
+
check: return_date >= sales.date && return_date <= today()
|
|
43
|
+
message: {id: 'Tanggal kembali ke stok tidak boleh sebelum tanggal penjualan atau setelah hari ini'}
|
|
44
|
+
- name: items_on_refund
|
|
45
|
+
on: save
|
|
46
|
+
check: "items.map(l, refund.items.map(r, r.item == l.item ? 1 : 0).sum() > 0 ? 0 : 1).sum() == 0"
|
|
47
|
+
message: {id: Ada barang yang tidak diretur di kasir pada penjualan ini}
|
|
48
|
+
- name: within_refund
|
|
49
|
+
on: save
|
|
50
|
+
check: "items.map(l, items.map(x, x.item == l.item ? x.qty : 0).sum() <= refund.items.map(r, r.item == l.item ? r.refunded_qty - r.returned_qty : 0).sum() + 0.0005 ? 0 : 1).sum() == 0"
|
|
51
|
+
message: {id: Jumlah melebihi barang yang diretur di kasir dan belum kembali ke stok}
|
|
52
|
+
views:
|
|
53
|
+
list:
|
|
54
|
+
columns: [name, return_date, outlet, refund, qty_total, status]
|
|
55
|
+
filters: [outlet]
|
|
56
|
+
sort: -return_date
|
|
57
|
+
form:
|
|
58
|
+
layout:
|
|
59
|
+
- section: {id: Retur ke stok}
|
|
60
|
+
columns:
|
|
61
|
+
- [refund, sales, outlet]
|
|
62
|
+
- [return_date, qty_total]
|
|
63
|
+
- section: {id: Barang}
|
|
64
|
+
fields: [items]
|
|
65
|
+
- section: {id: Catatan}
|
|
66
|
+
fields: [notes]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: outlet_return_item
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: item, type: link, to: item, label: {id: Barang}, required: true}
|
|
6
|
+
- {name: description, type: text, label: {id: Uraian}, default: item.item_name}
|
|
7
|
+
- {name: qty, type: float, label: {id: Qty kembali ke stok}, help: {id: 'Dalam satuan stok barang, sama dengan baris retur di kasir. Menu dengan resep mengembalikan bahannya'}, default: '1', stock: true}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: outlet_sales
|
|
3
|
+
label: {id: Penjualan outlet harian, en: Daily outlet sales}
|
|
4
|
+
icon: store
|
|
5
|
+
is_submittable: true
|
|
6
|
+
naming: SLS-{YYYY}-{#####}
|
|
7
|
+
title_field: date
|
|
8
|
+
# Created as a draft (by the daily form or by an import); stock moves only when head office or the outlet submits it.
|
|
9
|
+
# stock.post_moves explodes each line through its active recipe, writes the line cogs and cogs_total, and refuses
|
|
10
|
+
# a second submitted record for the same outlet and date when source is form (409 duplicate_sales).
|
|
11
|
+
# A refund from a POS file (Moka, Loyverse, Juragan's template) is its own line (qty < 0, gross 0, refund > 0, net < 0).
|
|
12
|
+
# The kernel posts no stock move for a line with qty <= 0, so the goods of the original sale stay out of stock: a refund
|
|
13
|
+
# lowers net sales and margin, not stock (what Moka does with base ingredients too). Submitting a sale with refund lines
|
|
14
|
+
# makes its Retur di kasir (pos_refund); goods put back on the shelf, or the materials of a cancelled order that was
|
|
15
|
+
# never cooked, come back with a Retur ke stok (outlet_return, contract 0022) at the cost this sale took them out.
|
|
16
|
+
on_submit: [stock.post_moves]
|
|
17
|
+
on_cancel: [stock.reverse_moves]
|
|
18
|
+
permissions:
|
|
19
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, import: true, print: true}
|
|
20
|
+
# Outlet staff keep the daily form only. A record from Moka, a POS file or Loyverse (negative refund lines allowed) is
|
|
21
|
+
# the importer's, head office: staff cannot type such a source to book a negative net (audit #7 S1, kept for file
|
|
22
|
+
# and loyverse when ritel_cabang added them).
|
|
23
|
+
- {role: outlet_staff, read: true, create: true, write: true, submit: true, if: source == 'form'}
|
|
24
|
+
- {role: outlet_staff, read: true}
|
|
25
|
+
# module pos: a cashier's sale checks that its outlet and day have no daily sales record (Jalur A and B)
|
|
26
|
+
- {role: cashier, read: true}
|
|
27
|
+
fields:
|
|
28
|
+
- name: outlet
|
|
29
|
+
type: link
|
|
30
|
+
to: outlet
|
|
31
|
+
label: {id: Outlet}
|
|
32
|
+
required: true
|
|
33
|
+
in_list: true
|
|
34
|
+
- name: date
|
|
35
|
+
type: date
|
|
36
|
+
label: {id: Tanggal}
|
|
37
|
+
required: true
|
|
38
|
+
in_list: true
|
|
39
|
+
# Set by the import (moka, file, loyverse) or left at form. Not read_only: the kernel drops read_only input from imports
|
|
40
|
+
# too. The outlet_staff permission holds only while source == 'form', so only head office (who imports) can write a
|
|
41
|
+
# record from Moka, a POS file or Loyverse.
|
|
42
|
+
- name: source
|
|
43
|
+
type: select
|
|
44
|
+
label: {id: Sumber}
|
|
45
|
+
default: "'form'"
|
|
46
|
+
in_list: true
|
|
47
|
+
chip: true
|
|
48
|
+
options:
|
|
49
|
+
- {value: moka, label: {id: Moka}}
|
|
50
|
+
- {value: form, label: {id: Formulir harian}}
|
|
51
|
+
- {value: file, label: {id: File POS}}
|
|
52
|
+
- {value: loyverse, label: {id: Loyverse}}
|
|
53
|
+
- name: note
|
|
54
|
+
type: data
|
|
55
|
+
label: {id: Catatan}
|
|
56
|
+
# The Outlet column of the Moka file this record came from; must equal the chosen outlet's moka_name.
|
|
57
|
+
- name: moka_outlet
|
|
58
|
+
type: data
|
|
59
|
+
label: {id: Outlet di file Moka}
|
|
60
|
+
depends_on: source == 'moka'
|
|
61
|
+
# The Moka import key gained Time (two partial refunds of one item on one receipt). Keys stored before that never
|
|
62
|
+
# match the new key, so an overlapping export re-imports rows of a day already imported. key_version is 2 on every
|
|
63
|
+
# record the current import writes; flow moka_legacy_key_overlap marks a new record whose outlet and day already have
|
|
64
|
+
# a live Moka record without it, and rule legacy_key_reviewed holds its submit until head office has removed the
|
|
65
|
+
# repeated lines and ticks legacy_key_checked.
|
|
66
|
+
- {name: key_version, type: int, label: {id: Versi kunci impor}, hidden: true}
|
|
67
|
+
- name: legacy_key_overlap
|
|
68
|
+
type: check
|
|
69
|
+
label: {id: Tumpang tindih impor lama}
|
|
70
|
+
read_only: true
|
|
71
|
+
help: {id: 'Tanggal ini sudah punya penjualan Moka yang diimpor sebelum pembaruan; baris yang sama bisa masuk lagi'}
|
|
72
|
+
- name: legacy_key_checked
|
|
73
|
+
type: check
|
|
74
|
+
label: {id: Baris ganda sudah dihapus}
|
|
75
|
+
- name: lines
|
|
76
|
+
type: table
|
|
77
|
+
of: outlet_sales_line
|
|
78
|
+
label: {id: Barang terjual}
|
|
79
|
+
min_rows: 1
|
|
80
|
+
- name: qty_total
|
|
81
|
+
type: float
|
|
82
|
+
label: {id: Total qty}
|
|
83
|
+
compute: lines.map(l, l.qty).sum()
|
|
84
|
+
- name: gross_total
|
|
85
|
+
type: currency
|
|
86
|
+
label: {id: Penjualan kotor}
|
|
87
|
+
compute: lines.map(l, l.gross).sum()
|
|
88
|
+
- name: discount_total
|
|
89
|
+
type: currency
|
|
90
|
+
label: {id: Diskon}
|
|
91
|
+
compute: lines.map(l, l.discount).sum()
|
|
92
|
+
- name: refund_total
|
|
93
|
+
type: currency
|
|
94
|
+
label: {id: Retur}
|
|
95
|
+
compute: lines.map(l, l.refund).sum()
|
|
96
|
+
- name: net_total
|
|
97
|
+
type: currency
|
|
98
|
+
label: {id: Penjualan bersih}
|
|
99
|
+
compute: lines.map(l, l.net).sum()
|
|
100
|
+
in_list: true
|
|
101
|
+
- name: cogs_total
|
|
102
|
+
type: currency
|
|
103
|
+
label: {id: Harga pokok}
|
|
104
|
+
help: {id: 'Diisi sistem saat diajukan: bahan resep x rata-rata biaya'}
|
|
105
|
+
read_only: true
|
|
106
|
+
in_list: true
|
|
107
|
+
- name: margin
|
|
108
|
+
type: currency
|
|
109
|
+
label: {id: Margin}
|
|
110
|
+
compute: net_total - cogs_total
|
|
111
|
+
in_list: true
|
|
112
|
+
# Monthly tax recap (no file): a PKP shop's sales prices include PPN, so the PPN inside net sales is
|
|
113
|
+
# net x rate x dpp / (100 + rate x dpp) (Digunggung amounts). The 0,5% final PPh of PP 55/2022 depends on turnover
|
|
114
|
+
# (up to Rp 4,8 miliar a year), not on PKP status, so it is shown for every shop on turnover without PPN; a shop
|
|
115
|
+
# above the limit ignores it.
|
|
116
|
+
# The XML for Coretax needs a kernel export.
|
|
117
|
+
- name: ppn_in_sales
|
|
118
|
+
type: currency
|
|
119
|
+
label: {id: PPN dalam penjualan}
|
|
120
|
+
compute: "tax.pkp ? round(net_total * tax.ppn_rate * tax.dpp_num / (100 * tax.dpp_den + tax.ppn_rate * tax.dpp_num)) : 0"
|
|
121
|
+
- name: pph_final
|
|
122
|
+
type: currency
|
|
123
|
+
label: {id: 'PPh final 0,5%'}
|
|
124
|
+
compute: round((net_total - ppn_in_sales) * 5 / 1000)
|
|
125
|
+
rules:
|
|
126
|
+
- name: moka_outlet_matches
|
|
127
|
+
on: save
|
|
128
|
+
check: "source != 'moka' || moka_outlet == outlet.moka_name"
|
|
129
|
+
message: {id: 'Kolom Outlet di file Moka beda dengan Nama outlet di Moka pada outlet ini. Ekspor per outlet, atau cek data outlet'}
|
|
130
|
+
# One sales source per outlet: a Moka outlet (moka_name set) imports Moka files only, any other outlet uses the
|
|
131
|
+
# daily form. Without it, a form and a Moka export for the same outlet and day both take stock out.
|
|
132
|
+
- name: form_only_for_non_moka_outlets
|
|
133
|
+
on: save
|
|
134
|
+
check: "source != 'form' || outlet.moka_name == ''"
|
|
135
|
+
message: {id: 'Outlet ini memakai Moka: penjualannya diimpor dari file Moka, bukan formulir harian'}
|
|
136
|
+
# An outlet without Moka has one sales_source (empty = form): a POS file or a Loyverse export is accepted only for
|
|
137
|
+
# the outlet that names it, and a form only for an outlet whose source is the form.
|
|
138
|
+
- name: source_matches_outlet
|
|
139
|
+
on: save
|
|
140
|
+
check: "source == 'moka' || (outlet.moka_name == '' && (outlet.sales_source == '' ? 'form' : outlet.sales_source) == source)"
|
|
141
|
+
message: {id: 'Sumber penjualan ini beda dengan Sumber penjualan di data outlet. Cek data outlet, atau pilih outlet yang benar'}
|
|
142
|
+
- name: qty_not_negative
|
|
143
|
+
on: save
|
|
144
|
+
check: "lines.map(l, l.qty < 0 && (l.refund == 0 || (source != 'moka' && source != 'file' && source != 'loyverse')) ? 1 : 0).sum() == 0"
|
|
145
|
+
message: {id: Jumlah terjual hanya boleh negatif di baris retur dari file POS}
|
|
146
|
+
- name: discount_within_gross
|
|
147
|
+
on: save
|
|
148
|
+
check: "lines.map(l, l.discount > l.gross ? 1 : 0).sum() == 0"
|
|
149
|
+
message: {id: Diskon tidak boleh melebihi penjualan kotor}
|
|
150
|
+
- name: net_not_negative
|
|
151
|
+
on: save
|
|
152
|
+
check: "lines.map(l, l.net < 0 && (l.refund == 0 || (source != 'moka' && source != 'file' && source != 'loyverse')) ? 1 : 0).sum() == 0"
|
|
153
|
+
message: {id: Penjualan bersih per baris hanya boleh negatif di baris retur dari file POS}
|
|
154
|
+
- name: legacy_key_reviewed
|
|
155
|
+
on: submit
|
|
156
|
+
check: "!legacy_key_overlap || legacy_key_checked"
|
|
157
|
+
message: {id: 'Tanggal ini sudah diimpor sebelum pembaruan: hapus baris yang terulang, lalu centang Baris ganda sudah dihapus'}
|
|
158
|
+
views:
|
|
159
|
+
list:
|
|
160
|
+
# outlet, day and net sales first: they fit a phone screen (P7)
|
|
161
|
+
columns: [outlet, date, net_total, status, source, margin, cogs_total, name]
|
|
162
|
+
filters: [outlet, source]
|
|
163
|
+
sort: -date
|
|
164
|
+
form:
|
|
165
|
+
layout:
|
|
166
|
+
- section: {id: Penjualan}
|
|
167
|
+
columns:
|
|
168
|
+
- [outlet, date, source]
|
|
169
|
+
- [note, legacy_key_overlap, legacy_key_checked]
|
|
170
|
+
- section: {id: Barang terjual}
|
|
171
|
+
fields: [lines]
|
|
172
|
+
- section: {id: Ringkasan}
|
|
173
|
+
columns:
|
|
174
|
+
- [gross_total, discount_total, refund_total, net_total]
|
|
175
|
+
- [cogs_total, margin, qty_total]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Never stored: a flow that must refuse the verb it runs in creates one of these with a reason, and the matching rule
|
|
3
|
+
# fails with that reason's message, which rolls the whole verb back (the flow runs inside it), like delivery_guard.
|
|
4
|
+
# Create is granted to the roles whose verbs run such a flow.
|
|
5
|
+
name: outlet_sales_guard
|
|
6
|
+
label: {id: Penjaga penjualan outlet, en: Outlet sales guard}
|
|
7
|
+
icon: check
|
|
8
|
+
naming: OSG-{######}
|
|
9
|
+
title_field: reason
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: head_office, create: true}
|
|
12
|
+
- {role: outlet_staff, create: true}
|
|
13
|
+
fields:
|
|
14
|
+
- name: reason
|
|
15
|
+
type: select
|
|
16
|
+
label: {id: Alasan}
|
|
17
|
+
required: true
|
|
18
|
+
options:
|
|
19
|
+
- {value: sales_returned, label: {id: Penjualan sudah dikembalikan ke stok}}
|
|
20
|
+
- {value: over_returned, label: {id: Retur melebihi yang diretur di kasir}}
|
|
21
|
+
- {value: sales_cancelled, label: {id: Penjualan sudah dibatalkan}}
|
|
22
|
+
- {name: document, type: data, label: {id: Dokumen}}
|
|
23
|
+
rules:
|
|
24
|
+
- name: sales_returned
|
|
25
|
+
on: save
|
|
26
|
+
check: reason != 'sales_returned'
|
|
27
|
+
message: {id: 'Penjualan ini punya retur ke stok yang masih aktif; batalkan retur ke stoknya dulu'}
|
|
28
|
+
- name: over_returned
|
|
29
|
+
on: save
|
|
30
|
+
check: reason != 'over_returned'
|
|
31
|
+
message: {id: 'Jumlah kembali ke stok melebihi barang yang diretur di kasir (ada retur lain yang baru diajukan); cek Retur di kasir'}
|
|
32
|
+
- name: sales_cancelled
|
|
33
|
+
on: save
|
|
34
|
+
check: reason != 'sales_cancelled'
|
|
35
|
+
message: {id: 'Penjualan ini baru saja dibatalkan; retur ke stok dari penjualan yang batal tidak bisa diajukan'}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: outlet_sales_line
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- name: item
|
|
6
|
+
type: link
|
|
7
|
+
to: item
|
|
8
|
+
label: {id: Barang}
|
|
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
|
+
help: {id: 'Negatif di baris retur dari file POS. Barang kembali ke stok hanya lewat Retur ke stok'}
|
|
18
|
+
required: true
|
|
19
|
+
stock: true
|
|
20
|
+
- name: gross
|
|
21
|
+
type: currency
|
|
22
|
+
label: {id: Penjualan kotor}
|
|
23
|
+
default: round(qty * item.rate)
|
|
24
|
+
- name: discount
|
|
25
|
+
type: currency
|
|
26
|
+
label: {id: Diskon}
|
|
27
|
+
default: '0'
|
|
28
|
+
- name: refund
|
|
29
|
+
type: currency
|
|
30
|
+
label: {id: Retur}
|
|
31
|
+
default: '0'
|
|
32
|
+
- name: net
|
|
33
|
+
type: currency
|
|
34
|
+
label: {id: Penjualan bersih}
|
|
35
|
+
help: {id: 'Kotor dikurangi diskon dan retur (sama dengan Net Sales di Moka)'}
|
|
36
|
+
compute: round(gross - discount - refund)
|
|
37
|
+
- name: cogs
|
|
38
|
+
type: currency
|
|
39
|
+
label: {id: Harga pokok}
|
|
40
|
+
read_only: true
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: outlet_takings
|
|
3
|
+
label: {id: Setoran harian, en: Daily takings}
|
|
4
|
+
icon: wallet
|
|
5
|
+
is_submittable: true
|
|
6
|
+
naming: STR-{YYYY}-{#####}
|
|
7
|
+
title_field: date
|
|
8
|
+
# What each payment method should have brought in per outlet per day (the POS's payment report) against what was
|
|
9
|
+
# deposited or credited (cash banked, QRIS/EDC settlement after MDR). The difference per line is the shortfall head
|
|
10
|
+
# office follows up. Matching a line to a bank statement line is manual for now (bank_ref holds the statement's
|
|
11
|
+
# reference); a link to bank_statement comes with the money rail (plan Tahap 1). No stock, no ledger: submit only
|
|
12
|
+
# freezes the day.
|
|
13
|
+
permissions:
|
|
14
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, import: true, print: true}
|
|
15
|
+
- {role: outlet_staff, read: true, create: true, write: true, submit: true}
|
|
16
|
+
# module pos: a cashier's sale checks that its outlet and day have no setoran (it would book the cash twice)
|
|
17
|
+
- {role: cashier, read: true}
|
|
18
|
+
fields:
|
|
19
|
+
- name: outlet
|
|
20
|
+
type: link
|
|
21
|
+
to: outlet
|
|
22
|
+
label: {id: Outlet}
|
|
23
|
+
required: true
|
|
24
|
+
in_list: true
|
|
25
|
+
- name: date
|
|
26
|
+
type: date
|
|
27
|
+
label: {id: Tanggal}
|
|
28
|
+
required: true
|
|
29
|
+
default: today()
|
|
30
|
+
in_list: true
|
|
31
|
+
- name: lines
|
|
32
|
+
type: table
|
|
33
|
+
of: outlet_takings_line
|
|
34
|
+
label: {id: Per metode bayar}
|
|
35
|
+
min_rows: 1
|
|
36
|
+
- name: expected_total
|
|
37
|
+
type: currency
|
|
38
|
+
label: {id: Menurut POS}
|
|
39
|
+
compute: lines.map(l, l.expected).sum()
|
|
40
|
+
in_list: true
|
|
41
|
+
- name: received_total
|
|
42
|
+
type: currency
|
|
43
|
+
label: {id: Disetor atau diterima}
|
|
44
|
+
compute: lines.map(l, l.received).sum()
|
|
45
|
+
in_list: true
|
|
46
|
+
- name: fee_total
|
|
47
|
+
type: currency
|
|
48
|
+
label: {id: Potongan MDR}
|
|
49
|
+
compute: lines.map(l, l.fee).sum()
|
|
50
|
+
- name: difference_total
|
|
51
|
+
type: currency
|
|
52
|
+
label: {id: Selisih}
|
|
53
|
+
help: {id: 'Diterima ditambah potongan dikurangi menurut POS. Minus berarti setoran kurang'}
|
|
54
|
+
compute: lines.map(l, l.difference).sum()
|
|
55
|
+
in_list: true
|
|
56
|
+
- name: short
|
|
57
|
+
type: check
|
|
58
|
+
label: {id: Setoran kurang}
|
|
59
|
+
compute: difference_total < 0
|
|
60
|
+
in_list: true
|
|
61
|
+
- name: note
|
|
62
|
+
type: text
|
|
63
|
+
label: {id: Catatan}
|
|
64
|
+
rules:
|
|
65
|
+
- name: amounts_not_negative
|
|
66
|
+
on: save
|
|
67
|
+
check: "lines.map(l, l.expected < 0 || l.received < 0 || l.fee < 0 ? 1 : 0).sum() == 0"
|
|
68
|
+
message: {id: Nilai setoran dan potongan tidak boleh negatif}
|
|
69
|
+
views:
|
|
70
|
+
list:
|
|
71
|
+
columns: [name, outlet, date, status, expected_total, received_total, difference_total, short]
|
|
72
|
+
filters: [outlet, short]
|
|
73
|
+
sort: -date
|
|
74
|
+
form:
|
|
75
|
+
layout:
|
|
76
|
+
- section: {id: Setoran}
|
|
77
|
+
columns:
|
|
78
|
+
- [outlet, date]
|
|
79
|
+
- [note]
|
|
80
|
+
- section: {id: Per metode bayar}
|
|
81
|
+
fields: [lines]
|
|
82
|
+
- section: {id: Ringkasan}
|
|
83
|
+
columns:
|
|
84
|
+
- [expected_total, received_total]
|
|
85
|
+
- [fee_total, difference_total]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: outlet_takings_line
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- name: method
|
|
6
|
+
type: select
|
|
7
|
+
label: {id: Metode bayar}
|
|
8
|
+
required: true
|
|
9
|
+
options:
|
|
10
|
+
- {value: cash, label: {id: Tunai}}
|
|
11
|
+
- {value: qris, label: {id: QRIS}}
|
|
12
|
+
- {value: debit, label: {id: Kartu debit}}
|
|
13
|
+
- {value: credit, label: {id: Kartu kredit}}
|
|
14
|
+
- {value: transfer, label: {id: Transfer bank}}
|
|
15
|
+
- {value: ewallet, label: {id: Dompet digital}}
|
|
16
|
+
- {value: other, label: {id: Lainnya}}
|
|
17
|
+
- name: expected
|
|
18
|
+
type: currency
|
|
19
|
+
label: {id: Menurut POS}
|
|
20
|
+
required: true
|
|
21
|
+
- name: received
|
|
22
|
+
type: currency
|
|
23
|
+
label: {id: Disetor atau diterima}
|
|
24
|
+
default: '0'
|
|
25
|
+
- name: fee
|
|
26
|
+
type: currency
|
|
27
|
+
label: {id: Potongan MDR}
|
|
28
|
+
help: {id: 'Potongan bank atau penyedia QRIS/EDC, kalau ada'}
|
|
29
|
+
default: '0'
|
|
30
|
+
- name: difference
|
|
31
|
+
type: currency
|
|
32
|
+
label: {id: Selisih}
|
|
33
|
+
compute: received + fee - expected
|
|
34
|
+
- name: bank_ref
|
|
35
|
+
type: data
|
|
36
|
+
label: {id: Referensi mutasi bank}
|
|
37
|
+
help: {id: 'Keterangan atau nomor di mutasi rekening, untuk dicocokkan'}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Retur di kasir: the refund lines of one submitted outlet_sales (a POS file, Moka or Loyverse refund, qty < 0), per
|
|
3
|
+
# item, and how much of each has come back into stock with a Retur ke stok (outlet_return). Made by flow
|
|
4
|
+
# refund_on_sales_submitted and kept by the return flows; every field is read_only, so no person can change it (the
|
|
5
|
+
# flows write as the person who submitted the document). A refund that is never returned stays out of stock, as the
|
|
6
|
+
# sale left it (goods thrown away, a dish that was eaten). Contract 0022 §2.
|
|
7
|
+
name: pos_refund
|
|
8
|
+
label: {id: Retur di kasir, en: Cashier refund}
|
|
9
|
+
icon: stock
|
|
10
|
+
naming: RTK-{YYYY}-{#####}
|
|
11
|
+
title_field: sales
|
|
12
|
+
permissions:
|
|
13
|
+
- {role: head_office, read: true, create: true, write: true, export: true}
|
|
14
|
+
# outlet staff put refunded goods back on their own outlet's shelf: the return's flow updates this record as them
|
|
15
|
+
- {role: outlet_staff, read: true, write: true}
|
|
16
|
+
fields:
|
|
17
|
+
- {name: sales, type: link, to: outlet_sales, label: {id: Penjualan}, read_only: true, in_list: true, peek: [date, source]}
|
|
18
|
+
- {name: outlet, type: link, to: outlet, label: {id: Outlet}, read_only: true, in_list: true}
|
|
19
|
+
- {name: date, type: date, label: {id: Tanggal penjualan}, read_only: true, in_list: true}
|
|
20
|
+
- {name: items, type: table, of: pos_refund_item, label: {id: Barang diretur}, read_only: true}
|
|
21
|
+
- {name: refunded_qty, type: float, label: {id: Qty diretur}, compute: "items.map(i, i.refunded_qty).sum()", in_list: true}
|
|
22
|
+
- {name: open_qty, type: float, label: {id: Belum kembali ke stok}, compute: "items.map(i, i.refunded_qty - i.returned_qty).sum()", in_list: true}
|
|
23
|
+
rules:
|
|
24
|
+
# every field is read_only, so a record typed by a person has no sale: only the flow makes one (QA N1)
|
|
25
|
+
- name: has_sales
|
|
26
|
+
on: save
|
|
27
|
+
check: sales != ''
|
|
28
|
+
message: {id: 'Retur di kasir dibuat otomatis dari penjualan yang punya baris retur'}
|
|
29
|
+
views:
|
|
30
|
+
list:
|
|
31
|
+
columns: [name, date, outlet, sales, refunded_qty, open_qty]
|
|
32
|
+
filters: [outlet]
|
|
33
|
+
sort: -date
|