@rangka-os/create 0.5.0-alpha.2 → 0.5.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +42 -6
- package/package.json +1 -1
- package/template/base/apps/crm/app.rk +2 -0
- package/template/base/apps/crm/processes/lead_to_cash.rk +8 -0
- package/template/base/apps/dapur/app.rk +35 -0
- package/template/base/apps/dapur/dashboards/dapur_hari_ini.rk +26 -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 +11 -6
- package/template/base/apps/fnb_cabang/dashboards/fnb_overview.rk +38 -14
- package/template/base/apps/fnb_cabang/dashboards/outlet_harian.rk +36 -0
- package/template/base/apps/fnb_cabang/dashboards/stock_recap.rk +19 -16
- package/template/base/apps/grosir_distribusi/app.rk +57 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_ar.rk +66 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +91 -0
- package/template/base/apps/grosir_distribusi/dashboards/gudang_harian.rk +33 -0
- package/template/base/apps/grosir_distribusi/dashboards/salesman_harian.rk +51 -0
- package/template/base/apps/jasa_proyek/app.rk +24 -5
- package/template/base/apps/jasa_proyek/dashboards/absen_saya.rk +15 -0
- package/template/base/apps/jasa_proyek/dashboards/jasa_overview.rk +65 -38
- package/template/base/apps/jasa_proyek/dashboards/project_margin.rk +94 -0
- package/template/base/apps/jasa_proyek/dashboards/rekap_absen.rk +18 -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 +80 -0
- package/template/base/apps/kelas_kursus/app.rk +32 -0
- package/template/base/apps/kelas_kursus/dashboards/kelas_saya.rk +41 -0
- package/template/base/apps/kelas_kursus/dashboards/kursus_ringkas.rk +67 -0
- package/template/base/apps/langganan_jasa/app.rk +39 -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 +61 -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 +36 -0
- package/template/base/apps/sewa_alat/dashboards/alat_hari_ini.rk +90 -0
- package/template/base/apps/sewa_alat/dashboards/sewa_ringkas.rk +86 -0
- package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/SKILL.md +24 -0
- package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/first-day.json +162 -0
- package/template/base/apps/stok_outlet/app.rk +34 -0
- package/template/base/apps/stok_outlet/dashboards/outlet_hari_ini.rk +33 -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/doku/connector.rk +128 -0
- package/template/base/connectors/doku/fixtures/create_checkout.json +6 -0
- package/template/base/connectors/doku/fixtures/expect.json +38 -0
- package/template/base/connectors/doku/fixtures/payment_notified.json +5 -0
- package/template/base/connectors/doku/fixtures/payment_notified_failed.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_no_type.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_null_type.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_refund.json +3 -0
- package/template/base/connectors/doku/mock/doku_mock.py +217 -0
- package/template/base/connectors/loyverse/connector.rk +98 -0
- package/template/base/connectors/moka/connector.rk +121 -0
- package/template/base/connectors/moka/fixtures/expect.json +44 -0
- package/template/base/connectors/moka/fixtures/latest_transactions.json +79 -0
- package/template/base/connectors/moka/fixtures/list_items.json +4 -0
- package/template/base/connectors/moka/fixtures/list_outlets.json +4 -0
- package/template/base/connectors/moka/fixtures/transaction_created.json +44 -0
- package/template/base/connectors/moka/fixtures/transaction_created_refund.json +39 -0
- package/template/base/connectors/moka/fixtures/transaction_created_refund_later.json +51 -0
- package/template/base/connectors/moka/mock/moka_mock.py +210 -0
- package/template/base/connectors/whatsapp_business/connector.rk +22 -1
- package/template/base/connectors/whatsapp_business/templates.md +32 -0
- package/template/base/connectors/xendit/connector.rk +184 -0
- package/template/base/connectors/xendit/mock/xendit_mock.py +231 -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_cash_advance_post.rk +33 -0
- package/template/base/modules/accounting/flows/gl_cash_advance_reverse.rk +194 -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 +164 -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_booked.rk +12 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked_released.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +29 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +61 -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 +73 -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 +147 -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 +81 -1
- package/template/base/modules/catalogue/models/item_category.rk +29 -0
- package/template/base/modules/catalogue/models/uom.rk +14 -0
- package/template/base/modules/catalogue/models/uom_conversion.rk +8 -0
- package/template/base/modules/catalogue/module.rk +8 -2
- 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/credit_guard.rk +40 -0
- package/template/base/modules/contacts/models/customer.rk +144 -2
- package/template/base/modules/contacts/models/vendor.rk +51 -2
- package/template/base/modules/contacts/module.rk +6 -1
- 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 +31 -0
- package/template/base/modules/coretax/print/coretax_bupot.xml +28 -0
- package/template/base/modules/coretax/print/coretax_faktur.rk +44 -0
- package/template/base/modules/coretax/print/coretax_faktur.xml +74 -0
- package/template/base/modules/courses/flows/charge_cancel_guard.rk +23 -0
- package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +58 -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_attendance_checked.rk +14 -0
- package/template/base/modules/courses/flows/session_fill_attendance.rk +16 -0
- package/template/base/modules/courses/flows/session_of_the_day.rk +34 -0
- package/template/base/modules/courses/flows/student_billing_on_create.rk +25 -0
- package/template/base/modules/courses/models/course_attendance.rk +24 -0
- package/template/base/modules/courses/models/course_batch.rk +119 -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 +94 -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/courses/screens/absen_kelas.rk +17 -0
- package/template/base/modules/currency/module.rk +5 -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 +324 -13
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +23 -0
- package/template/base/modules/invoicing/module.rk +7 -2
- package/template/base/modules/invoicing/print/sales_invoice.html +145 -32
- package/template/base/modules/invoicing/print/sales_invoice.rk +7 -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/kitchen/flows/kitchen_ticket_on_sale.rk +47 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_update.rk +30 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_void.rk +23 -0
- package/template/base/modules/kitchen/models/kitchen_guard.rk +40 -0
- package/template/base/modules/kitchen/models/kitchen_route.rk +26 -0
- package/template/base/modules/kitchen/models/kitchen_station.rk +40 -0
- package/template/base/modules/kitchen/models/kitchen_ticket.rk +83 -0
- package/template/base/modules/kitchen/models/kitchen_ticket_item.rk +10 -0
- package/template/base/modules/kitchen/module.rk +18 -0
- package/template/base/modules/kitchen/print/kitchen_ticket.html +29 -0
- package/template/base/modules/kitchen/print/kitchen_ticket.rk +9 -0
- package/template/base/modules/kitchen/roles/kitchen.rk +6 -0
- package/template/base/modules/kitchen/screens/dapur.rk +22 -0
- package/template/base/modules/orders/models/customer_order.rk +98 -2
- package/template/base/modules/orders/models/customer_order_item.rk +29 -0
- package/template/base/modules/orders/module.rk +7 -2
- package/template/base/modules/outlet_sales/flows/moka_api_opened.rk +30 -0
- package/template/base/modules/outlet_sales/flows/moka_daily_sales.rk +78 -0
- package/template/base/modules/outlet_sales/flows/moka_held_release.rk +35 -0
- package/template/base/modules/outlet_sales/flows/moka_legacy_key_overlap.rk +22 -0
- package/template/base/modules/outlet_sales/flows/moka_line_mapped.rk +38 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_refused.rk +15 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_staged.rk +171 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_backfill_harian.rk +71 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_free_sales.rk +19 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_free_takings.rk +19 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_on_sales.rk +19 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_on_takings.rk +19 -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 +18 -0
- package/template/base/modules/outlet_sales/imports/daily_form.rk +3 -1
- package/template/base/modules/outlet_sales/imports/loyverse_receipts.rk +28 -0
- package/template/base/modules/outlet_sales/imports/moka_item_details.rk +14 -4
- 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/moka_sale_line.rk +66 -0
- package/template/base/modules/outlet_sales/models/moka_transaction.rk +26 -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 +79 -7
- package/template/base/modules/outlet_sales/models/outlet_sales_guard.rk +40 -0
- package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +2 -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 +36 -0
- package/template/base/modules/outlet_sales/models/pos_refund_item.rk +9 -0
- package/template/base/modules/outlet_sales/module.rk +7 -2
- package/template/base/modules/outlets/models/outlet.rk +57 -0
- package/template/base/modules/outlets/models/outlet_day.rk +30 -0
- package/template/base/modules/outlets/models/outlet_day_backfill.rk +25 -0
- package/template/base/modules/outlets/module.rk +7 -2
- package/template/base/modules/payments/flows/payment_from_doku.rk +73 -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/flows/payment_refund_from_doku.rk +14 -0
- package/template/base/modules/payments/models/gateway_ref_claim.rk +42 -0
- package/template/base/modules/payments/models/payment.rk +62 -1
- package/template/base/modules/payments/models/withholding.rk +16 -2
- package/template/base/modules/payments/module.rk +7 -2
- package/template/base/modules/payments/print/statement.html +1 -1
- package/template/base/modules/payroll/flows/cash_advance_cancel_guard.rk +15 -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_advance_guard.rk +23 -0
- package/template/base/modules/payroll/flows/payslip_cancel_guard.rk +14 -0
- package/template/base/modules/payroll/flows/payslip_casual_guard.rk +19 -0
- package/template/base/modules/payroll/flows/payslip_from_recap.rk +76 -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 +35 -0
- package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +49 -0
- package/template/base/modules/payroll/flows/recap_cancel_guard.rk +15 -0
- package/template/base/modules/payroll/models/cash_advance.rk +53 -0
- package/template/base/modules/payroll/models/payroll_close.rk +80 -0
- package/template/base/modules/payroll/models/payroll_guard.rk +89 -0
- package/template/base/modules/payroll/models/payroll_profile.rk +146 -0
- package/template/base/modules/payroll/models/payroll_run.rk +220 -0
- package/template/base/modules/payroll/models/payslip.rk +370 -0
- package/template/base/modules/payroll/module.rk +13 -0
- package/template/base/modules/payroll/print/payslip.html +54 -0
- package/template/base/modules/payroll/print/payslip.rk +7 -0
- package/template/base/modules/pipeline/module.rk +5 -0
- package/template/base/modules/pos/flows/outlet_day_backfill_kasir.rk +61 -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 +42 -0
- package/template/base/modules/pos/flows/pos_sale_on_submit.rk +60 -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 +226 -0
- package/template/base/modules/pos/models/pos_sale_item.rk +46 -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 +3 -1
- package/template/base/modules/procurement/models/purchase_order.rk +22 -8
- package/template/base/modules/procurement/models/purchase_request.rk +12 -1
- package/template/base/modules/procurement/models/purchase_request_item.rk +2 -0
- package/template/base/modules/procurement/models/vendor_bill.rk +117 -4
- package/template/base/modules/procurement/module.rk +7 -2
- 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 +68 -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 +153 -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/attendance_close_cancel_guard.rk +15 -0
- package/template/base/modules/projects/flows/attendance_close_on_submit.rk +68 -0
- package/template/base/modules/projects/flows/attendance_log_cancel_guard.rk +14 -0
- package/template/base/modules/projects/flows/attendance_log_guard_created.rk +17 -0
- package/template/base/modules/projects/flows/attendance_log_guard_submitted.rk +38 -0
- package/template/base/modules/projects/flows/attendance_log_guard_updated.rk +15 -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/timesheet_attendance_overlap_guard.rk +20 -0
- package/template/base/modules/projects/flows/vendor_bill_cancel_guard.rk +15 -0
- package/template/base/modules/projects/flows/work_site_supervisor_changed.rk +19 -0
- package/template/base/modules/projects/flows/worker_employee_changed.rk +19 -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/assignment.rk +65 -3
- package/template/base/modules/projects/models/attendance_close.rk +67 -0
- package/template/base/modules/projects/models/attendance_guard.rk +57 -0
- package/template/base/modules/projects/models/attendance_log.rk +275 -0
- package/template/base/modules/projects/models/billing_milestone.rk +217 -0
- package/template/base/modules/projects/models/project.rk +76 -2
- 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 +100 -10
- package/template/base/modules/projects/models/work_site.rk +83 -0
- package/template/base/modules/projects/module.rk +8 -3
- package/template/base/modules/projects/roles/field_worker.rk +10 -0
- package/template/base/modules/projects/roles/site_supervisor.rk +8 -0
- package/template/base/modules/projects/screens/absen.rk +23 -0
- package/template/base/modules/quotation/models/quotation.rk +20 -4
- package/template/base/modules/quotation/models/quotation_item.rk +13 -0
- package/template/base/modules/quotation/module.rk +6 -1
- package/template/base/modules/quotation/print/quotation.html +17 -3
- 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 +24 -0
- package/template/base/modules/rental/flows/rental_checkout_on_submit.rk +33 -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 +28 -0
- package/template/base/modules/rental/flows/rental_return_on_submit.rk +45 -0
- package/template/base/modules/rental/models/rental_booking.rk +124 -0
- package/template/base/modules/rental/models/rental_checkout.rk +91 -0
- package/template/base/modules/rental/models/rental_checkout_unit.rk +22 -0
- package/template/base/modules/rental/models/rental_guard.rk +93 -0
- package/template/base/modules/rental/models/rental_item.rk +83 -0
- package/template/base/modules/rental/models/rental_return.rk +134 -0
- package/template/base/modules/rental/models/rental_return_unit.rk +29 -0
- package/template/base/modules/rental/models/rental_schedule.rk +59 -0
- package/template/base/modules/rental/models/rental_unit.rk +80 -0
- package/template/base/modules/rental/module.rk +25 -0
- package/template/base/modules/rental/print/rental_bast_in.html +107 -0
- package/template/base/modules/rental/print/rental_bast_in.rk +9 -0
- package/template/base/modules/rental/print/rental_bast_out.html +98 -0
- package/template/base/modules/rental/print/rental_bast_out.rk +11 -0
- package/template/base/modules/rental/roles/rental_staff.rk +7 -0
- package/template/base/modules/rental/screens/alat_keluar.rk +19 -0
- package/template/base/modules/rental/screens/alat_kembali.rk +19 -0
- package/template/base/modules/rental/screens/jadwal_alat.rk +21 -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/models/recipe.rk +8 -0
- package/template/base/modules/stock/models/stock_adjustment.rk +1 -0
- package/template/base/modules/stock/models/stock_adjustment_value.rk +80 -0
- package/template/base/modules/stock/models/stock_balance.rk +6 -2
- package/template/base/modules/stock/models/stock_count.rk +2 -0
- package/template/base/modules/stock/models/stock_move.rk +17 -5
- package/template/base/modules/stock/models/stock_transfer_item.rk +1 -1
- package/template/base/modules/stock/module.rk +7 -2
- 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/collection_visit.rk +47 -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 +235 -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/subscriptions/screens/catat_tagih.rk +18 -0
- package/template/base/modules/subscriptions/screens/rute_tagih.rk +25 -0
- package/template/base/modules/tax_id/module.rk +5 -0
- package/template/base/modules/users/models/user.rk +35 -4
- package/template/base/modules/users/models/user_outlet.rk +6 -0
- package/template/base/modules/users/module.rk +8 -2
- 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/workforce/imports/worker_list.rk +21 -0
- package/template/base/modules/workforce/models/certification.rk +1 -2
- package/template/base/modules/workforce/models/worker.rk +54 -4
- package/template/base/modules/workforce/module.rk +6 -1
- package/template/demo/fixtures/demo.rk +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
|
+
name: pos
|
|
3
|
+
version: 1.2.0
|
|
4
|
+
title: {id: Kasir, en: Point of sale}
|
|
5
|
+
summary:
|
|
6
|
+
id: Kasir di browser dengan sesi kas, transaksi dan tutup sesi per outlet.
|
|
7
|
+
en: A browser till with cash sessions, sales and session close per outlet.
|
|
8
|
+
category: sales
|
|
9
|
+
icon: shopping-basket-line
|
|
10
|
+
# The cashier of a shop or an F&B outlet, online (Jalur B v0; devices and offline come with rangka-edge, contracts
|
|
11
|
+
# 0003 and 0006). A cashier opens a shift (pos_shift) at an outlet with the float in the drawer, rings up sales
|
|
12
|
+
# (pos_sale: items or menu, qty in any unit of the item, line and receipt discounts, paid in cash with change, QRIS,
|
|
13
|
+
# or both), and closes the shift by counting the drawer: the difference is booked as selisih kas. Each sale is
|
|
14
|
+
# numbered per outlet (STRK-<outlet code>-<YYMM>-<n>, kernel contract 0009 §2a), takes its goods out of the outlet's
|
|
15
|
+
# stock through the declared stock rule (contract 0021; a menu item through its active recipe, contract 0022) and is
|
|
16
|
+
# journalled by the accounting module like a day of outlet_sales. A sale can be voided (cancel) or corrected
|
|
17
|
+
# (cancel, then amend without the returned items) only on its own day while its shift is open.
|
|
18
|
+
# Sales of an outlet run either here or through outlet_sales (Jalur A), never both: an outlet whose sales_source is
|
|
19
|
+
# 'kasir' takes no daily form or POS file, and a sale needs that source when outlet_sales is installed.
|
|
20
|
+
requires: {rangka: '>=0.5', users: ^1.2, catalogue: ^1.3, outlets: ^1.5, stock: ^1.2}
|
|
21
|
+
hooks: [stock.reverse_moves]
|
|
22
|
+
optional: {accounting: ^1.2, outlet_sales: ^1.1}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E untuk thermal, sama dengan nota faktur: hitam putih, nama usaha tebal, angka rata kanan. */
|
|
3
|
+
body { font-size: 8.5pt; }
|
|
4
|
+
.c { text-align: center; }
|
|
5
|
+
.brand { font-size: 1.25em; font-weight: 700; }
|
|
6
|
+
.rule { border-top: 1px dashed #1C1917; margin: 2mm 0; }
|
|
7
|
+
.row { display: flex; justify-content: space-between; gap: 2mm; }
|
|
8
|
+
.row .num { white-space: nowrap; }
|
|
9
|
+
.line { margin: 1mm 0; }
|
|
10
|
+
.line .sub { color: #57534E; }
|
|
11
|
+
.big { font-size: 1.35em; font-weight: 700; }
|
|
12
|
+
.status { font-weight: 700; }
|
|
13
|
+
.muted { color: #57534E; }
|
|
14
|
+
{{end}}
|
|
15
|
+
{{define "letterhead"}}{{with .Letterhead}}<div class="c">
|
|
16
|
+
<div class="brand">{{.legal_name}}</div>
|
|
17
|
+
{{with .address}}<div style="white-space:pre-line">{{.}}</div>{{end}}
|
|
18
|
+
{{with .phone}}<div>{{.}}</div>{{end}}
|
|
19
|
+
{{with .npwp}}<div>NPWP {{.}}</div>{{end}}
|
|
20
|
+
</div>{{end}}{{end}}
|
|
21
|
+
{{template "letterhead" .}}
|
|
22
|
+
{{- $ds := printf "%v" .Doc.docstatus -}}
|
|
23
|
+
<div class="c">{{.Links.outlet.outlet_name}}</div>
|
|
24
|
+
<div class="rule"></div>
|
|
25
|
+
<div class="row"><span>Struk</span><span>{{.Doc.name}}</span></div>
|
|
26
|
+
<div class="row"><span>Tanggal</span><span>{{date .Doc.date}}</span></div>
|
|
27
|
+
{{with .Doc.buyer}}<div class="row"><span>Pembeli</span><span>{{.}}</span></div>{{end}}
|
|
28
|
+
<div class="rule"></div>
|
|
29
|
+
{{range $row := .Doc.items}}
|
|
30
|
+
<div class="line">
|
|
31
|
+
<div>{{if $row.description}}{{$row.description}}{{else}}{{$row.item}}{{end}}</div>
|
|
32
|
+
<div class="row sub"><span>{{number $row.qty}} x {{rupiah $row.rate}}{{if $row.discount_pct}} (-{{number $row.discount_pct}}%){{end}}</span><span class="num">{{rupiah $row.amount}}</span></div>
|
|
33
|
+
</div>
|
|
34
|
+
{{end}}
|
|
35
|
+
<div class="rule"></div>
|
|
36
|
+
{{if .Doc.discount_amount}}<div class="row"><span>Subtotal</span><span class="num">{{rupiah .Doc.subtotal}}</span></div>
|
|
37
|
+
<div class="row"><span>Diskon nota</span><span class="num">-{{rupiah .Doc.discount_amount}}</span></div>{{end}}
|
|
38
|
+
<div class="row big"><span>Total</span><span class="num">{{rupiah .Doc.grand_total}}</span></div>
|
|
39
|
+
{{if .Doc.ppn_in_sales}}<div class="row muted"><span>Termasuk PPN</span><span class="num">{{rupiah .Doc.ppn_in_sales}}</span></div>{{end}}
|
|
40
|
+
{{range $p := .Doc.payments}}<div class="row"><span>{{if eq (printf "%v" $p.method) "qris"}}QRIS{{with $p.ref}} {{.}}{{end}}{{else}}Tunai{{end}}</span><span class="num">{{rupiah $p.amount}}</span></div>
|
|
41
|
+
{{else}}<div class="row"><span>Tunai</span><span class="num">{{rupiah $.Doc.grand_total}}</span></div>
|
|
42
|
+
{{end}}
|
|
43
|
+
{{if .Doc.change_amount}}<div class="row"><span>Kembalian</span><span class="num">{{rupiah .Doc.change_amount}}</span></div>{{end}}
|
|
44
|
+
<div class="c status">
|
|
45
|
+
{{- if eq $ds "0"}}DRAF, BELUM DIBAYAR
|
|
46
|
+
{{- else if eq $ds "2"}}BATAL
|
|
47
|
+
{{- else}}LUNAS{{end -}}
|
|
48
|
+
</div>
|
|
49
|
+
<div class="rule"></div>
|
|
50
|
+
<div class="c muted">Terima kasih</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
# Struk for an 80 mm receipt printer, printed from the browser (contract 0008) until rangka-edge drives the printer
|
|
3
|
+
# itself (contract 0003). Same look as the invoice nota: lines, discounts, total, how it was paid, change.
|
|
4
|
+
name: pos_receipt
|
|
5
|
+
model: pos_sale
|
|
6
|
+
label: {id: Struk (printer kasir 80 mm), en: Receipt (80 mm)}
|
|
7
|
+
paper: 80mm
|
|
8
|
+
default: true
|
|
9
|
+
template: pos_receipt.html
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
|
|
2
|
+
# The cashier's work screen (contract 0030 §2 counter): the kernel web app renders it from these slots. Money, stock
|
|
3
|
+
# and numbering stay in pos_sale (computes, rules, stock: block, journal flows); the screen only fills the sale.
|
|
4
|
+
name: kasir
|
|
5
|
+
type: counter
|
|
6
|
+
label: {id: Kasir, en: Cashier}
|
|
7
|
+
icon: wallet
|
|
8
|
+
roles: [cashier, head_office]
|
|
9
|
+
device: tablet
|
|
10
|
+
needs: [print, scan]
|
|
11
|
+
offline: queue
|
|
12
|
+
counter:
|
|
13
|
+
catalogue:
|
|
14
|
+
model: item
|
|
15
|
+
filter: "kind != 'material' && active != false"
|
|
16
|
+
title: item_name
|
|
17
|
+
search: [item_name, sku, barcode]
|
|
18
|
+
group_by: category
|
|
19
|
+
price: rate
|
|
20
|
+
barcode: barcode
|
|
21
|
+
available: {model: stock_balance, item: item, qty: qty, match: {outlet: outlet}}
|
|
22
|
+
document:
|
|
23
|
+
model: pos_sale
|
|
24
|
+
lines: items
|
|
25
|
+
line: {item: item, qty: qty, price: rate, note: note}
|
|
26
|
+
total: grand_total
|
|
27
|
+
change: change_amount
|
|
28
|
+
summary: [gross_total, discount_total, grand_total]
|
|
29
|
+
set: {date: "today()"}
|
|
30
|
+
payments: {table: payments, method: method, amount: amount, ref: ref, methods: [cash, qris]}
|
|
31
|
+
session:
|
|
32
|
+
model: pos_shift
|
|
33
|
+
link: shift
|
|
34
|
+
filter: "cashier == user.email"
|
|
35
|
+
state: {field: state, open: open, closed: closed}
|
|
36
|
+
open: [outlet, opening_cash]
|
|
37
|
+
set: {outlet: "user.outlets.size() > 0 ? user.outlets[0] : ''"}
|
|
38
|
+
close: {model: pos_shift_close, link: shift, fields: [counted_cash, closing_note]}
|
|
39
|
+
customer: {field: buyer}
|
|
40
|
+
hold: true
|
|
41
|
+
print: pos_receipt
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
name: project_vendor_cost_on_cancel
|
|
3
|
+
label: {id: Biaya pemasok proyek batal}
|
|
4
|
+
# Project ledger row (projects): a cancel writes the opposite row on the document's date, only when the document has a + row (documents submitted before the ledger existed have none).
|
|
5
|
+
on: vendor_bill.cancelled
|
|
6
|
+
if: event.project != ''
|
|
7
|
+
steps:
|
|
8
|
+
- find: project_ledger
|
|
9
|
+
where: source_name == event.name && kind == 'vendor' && entry == 'post'
|
|
10
|
+
as: orig
|
|
11
|
+
- if: orig != null
|
|
12
|
+
create: project_ledger
|
|
13
|
+
set:
|
|
14
|
+
project: event.project
|
|
15
|
+
posting_date: orig.posting_date
|
|
16
|
+
entry: "'reverse'"
|
|
17
|
+
reverses: orig.name
|
|
18
|
+
kind: "'vendor'"
|
|
19
|
+
source_model: event.model
|
|
20
|
+
source_name: event.name
|
|
21
|
+
vendor_bill: event.name
|
|
22
|
+
amount: "0 - orig.amount"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
name: project_vendor_cost_on_submit
|
|
3
|
+
label: {id: Biaya pemasok proyek}
|
|
4
|
+
# Project ledger row (projects): the sum of a project's rows is its margin.
|
|
5
|
+
on: vendor_bill.submitted
|
|
6
|
+
if: event.project != ''
|
|
7
|
+
steps:
|
|
8
|
+
- create: project_ledger
|
|
9
|
+
set:
|
|
10
|
+
project: event.project
|
|
11
|
+
posting_date: event.bill_date
|
|
12
|
+
entry: "'post'"
|
|
13
|
+
kind: "'vendor'"
|
|
14
|
+
source_model: event.model
|
|
15
|
+
source_name: event.name
|
|
16
|
+
vendor_bill: event.name
|
|
17
|
+
amount: "0 - event.dpp"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/import.json
|
|
2
|
+
# Opening stock of one outlet with its value: one goods receipt per file (rows grouped by Tanggal) from the vendor
|
|
3
|
+
# named "Saldo awal", so the moving average starts at the shop's own cost price. A goods receipt is the only document
|
|
4
|
+
# that brings valued stock in (stock_adjustment only takes out, stock_count has no cost column); without a purchase
|
|
5
|
+
# order it moves stock and writes no payable (payables come only from vendor_bill).
|
|
6
|
+
# Headers: Tanggal, SKU, Qty, Harga pokok (per stock unit). Each SKU once per outlet (key), so a second upload of the
|
|
7
|
+
# same list is skipped. The receipt arrives as a draft: check it, then submit it to post the stock.
|
|
8
|
+
name: opening_stock
|
|
9
|
+
label: {id: Stok awal, en: Opening stock}
|
|
10
|
+
model: goods_receipt
|
|
11
|
+
source: csv
|
|
12
|
+
header_row: 1
|
|
13
|
+
per: outlet
|
|
14
|
+
key: [SKU]
|
|
15
|
+
group: [Tanggal]
|
|
16
|
+
map:
|
|
17
|
+
received_on: Tanggal
|
|
18
|
+
vendor: {value: "='Saldo awal'", match: vendor_name}
|
|
19
|
+
notes: "='Stok awal per ' + row['Tanggal']"
|
|
20
|
+
lines:
|
|
21
|
+
field: items
|
|
22
|
+
map:
|
|
23
|
+
item: {value: SKU, match: sku}
|
|
24
|
+
qty: Qty
|
|
25
|
+
rate: Harga pokok
|
|
@@ -10,7 +10,7 @@ on_submit: [stock.post_moves]
|
|
|
10
10
|
on_cancel: [stock.reverse_moves]
|
|
11
11
|
permissions:
|
|
12
12
|
- {role: purchasing_manager, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
13
|
-
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
13
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, import: true, print: true}
|
|
14
14
|
- {role: outlet_staff, read: true, create: true, write: true, submit: true}
|
|
15
15
|
fields:
|
|
16
16
|
- name: purchase_order
|
|
@@ -29,6 +29,8 @@ fields:
|
|
|
29
29
|
to: outlet
|
|
30
30
|
label: {id: Diterima di}
|
|
31
31
|
required: true
|
|
32
|
+
# staff with one outlet do not pick it (C1-2, kartu t_5b5a3ae5); head office with several picks as before
|
|
33
|
+
default: "user.outlets.size() == 1 ? user.outlets[0] : ''"
|
|
32
34
|
in_list: true
|
|
33
35
|
- name: received_on
|
|
34
36
|
type: date
|
|
@@ -21,6 +21,13 @@ fields:
|
|
|
21
21
|
type: link
|
|
22
22
|
to: purchase_request
|
|
23
23
|
label: {id: Permintaan pembelian}
|
|
24
|
+
# The project this purchase is for (projects module, optional): subcontract and material costs land in its margin.
|
|
25
|
+
- name: project
|
|
26
|
+
type: link
|
|
27
|
+
to: project
|
|
28
|
+
label: {id: Proyek}
|
|
29
|
+
default: purchase_request.project
|
|
30
|
+
depends_on: app_installed('projects')
|
|
24
31
|
- name: outlet
|
|
25
32
|
type: link
|
|
26
33
|
to: outlet
|
|
@@ -86,6 +93,10 @@ fields:
|
|
|
86
93
|
- {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)"}
|
|
87
94
|
- {name: grand_total_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Total (valas)}, compute: "dpp_fx + ppn_fx"}
|
|
88
95
|
rules:
|
|
96
|
+
- name: project_open
|
|
97
|
+
on: save
|
|
98
|
+
check: project == '' || project.state != 'closed'
|
|
99
|
+
message: {id: Proyek yang sudah ditutup tidak bisa dipakai untuk pembelian baru}
|
|
89
100
|
- name: foreign_needs_rate
|
|
90
101
|
on: save
|
|
91
102
|
check: currency == '' || currency == 'IDR' || exchange_rate > 1
|
|
@@ -94,10 +105,16 @@ rules:
|
|
|
94
105
|
on: save
|
|
95
106
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
96
107
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
108
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
109
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
110
|
+
- name: tax_rate_at_most_config
|
|
111
|
+
on: save
|
|
112
|
+
check: "tax_rate <= tax.ppn_rate"
|
|
113
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
97
114
|
- name: ppn_needs_pkp
|
|
98
115
|
on: save
|
|
99
116
|
check: vendor.pkp || tax_rate == 0
|
|
100
|
-
message: {id: Pemasok bukan PKP
|
|
117
|
+
message: {id: 'Pemasok bukan PKP: tarif PPN harus 0. Status PKP pemasok diatur pemilik atau bagian keuangan'}
|
|
101
118
|
- name: delivery_after_order
|
|
102
119
|
on: save
|
|
103
120
|
check: delivery_date == '' || delivery_date >= order_date
|
|
@@ -117,12 +134,9 @@ actions:
|
|
|
117
134
|
primary: true
|
|
118
135
|
hook: procurement.receive
|
|
119
136
|
if: docstatus == 1 && received_pct < 100
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
when: "grand_total > 5000000"
|
|
124
|
-
approvers: [purchasing_manager, head_office]
|
|
125
|
-
label: {id: Persetujuan pembelian, en: Purchasing approval}
|
|
137
|
+
# No approval policy here: the threshold and the approver are the owner's choice per business, so a site adds them in
|
|
138
|
+
# custom/purchase_order.rk (contract 0007 §1). A policy in the module would be a floor no site could raise or drop.
|
|
139
|
+
# See examples/sites/demo-fnb and demo-jasa.
|
|
126
140
|
views:
|
|
127
141
|
list:
|
|
128
142
|
columns: [name, vendor, outlet, order_date, status, grand_total, received_pct]
|
|
@@ -131,7 +145,7 @@ views:
|
|
|
131
145
|
layout:
|
|
132
146
|
- section: {id: Pesanan}
|
|
133
147
|
columns:
|
|
134
|
-
- [vendor, purchase_request, outlet]
|
|
148
|
+
- [vendor, purchase_request, outlet, project]
|
|
135
149
|
- [order_date, delivery_date, received_pct]
|
|
136
150
|
- section: {id: Barang}
|
|
137
151
|
fields: [items]
|
|
@@ -20,6 +20,12 @@ fields:
|
|
|
20
20
|
to: outlet
|
|
21
21
|
label: {id: Outlet}
|
|
22
22
|
in_list: true
|
|
23
|
+
# The project this purchase is for (projects module, optional): subcontract and material costs land in its margin.
|
|
24
|
+
- name: project
|
|
25
|
+
type: link
|
|
26
|
+
to: project
|
|
27
|
+
label: {id: Proyek}
|
|
28
|
+
depends_on: app_installed('projects')
|
|
23
29
|
- name: needed_by
|
|
24
30
|
type: date
|
|
25
31
|
label: {id: Dibutuhkan tanggal}
|
|
@@ -38,6 +44,7 @@ fields:
|
|
|
38
44
|
label: {id: Perkiraan total}
|
|
39
45
|
compute: items.map(i, i.amount).sum()
|
|
40
46
|
in_list: true
|
|
47
|
+
hidden_for: [outlet_staff]
|
|
41
48
|
- name: state
|
|
42
49
|
type: select
|
|
43
50
|
label: {id: Status permintaan}
|
|
@@ -50,6 +57,10 @@ fields:
|
|
|
50
57
|
- {value: ordered, label: {id: Sudah dipesan}}
|
|
51
58
|
- {value: closed, label: {id: Ditutup}}
|
|
52
59
|
rules:
|
|
60
|
+
- name: project_open
|
|
61
|
+
on: save
|
|
62
|
+
check: project == '' || project.state != 'closed'
|
|
63
|
+
message: {id: Proyek yang sudah ditutup tidak bisa dipakai untuk pembelian baru}
|
|
53
64
|
- name: qty_positive
|
|
54
65
|
on: save
|
|
55
66
|
check: "items.map(i, i.qty <= 0 ? 1 : 0).sum() == 0"
|
|
@@ -70,7 +81,7 @@ views:
|
|
|
70
81
|
layout:
|
|
71
82
|
- section: {id: Permintaan}
|
|
72
83
|
columns:
|
|
73
|
-
- [requested_by, outlet]
|
|
84
|
+
- [requested_by, outlet, project]
|
|
74
85
|
- [needed_by, state]
|
|
75
86
|
- section: {id: Barang}
|
|
76
87
|
fields: [items]
|
|
@@ -9,7 +9,8 @@ on_submit: [procurement.post_payable]
|
|
|
9
9
|
on_cancel: [procurement.reverse_payable]
|
|
10
10
|
permissions:
|
|
11
11
|
- {role: purchasing_manager, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
12
|
-
|
|
12
|
+
# finance downloads the Coretax withholding file (module coretax), an export of these bills
|
|
13
|
+
- {role: finance_manager, read: true, submit: true, print: true, export: true}
|
|
13
14
|
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
14
15
|
fields:
|
|
15
16
|
- name: vendor
|
|
@@ -23,6 +24,13 @@ fields:
|
|
|
23
24
|
type: link
|
|
24
25
|
to: purchase_order
|
|
25
26
|
label: {id: Pesanan pembelian}
|
|
27
|
+
# The project this purchase is for (projects module, optional): subcontract and material costs land in its margin.
|
|
28
|
+
- name: project
|
|
29
|
+
type: link
|
|
30
|
+
to: project
|
|
31
|
+
label: {id: Proyek}
|
|
32
|
+
default: purchase_order.project
|
|
33
|
+
depends_on: app_installed('projects')
|
|
26
34
|
- name: goods_receipt
|
|
27
35
|
type: link
|
|
28
36
|
to: goods_receipt
|
|
@@ -81,6 +89,56 @@ fields:
|
|
|
81
89
|
label: {id: PPh 23 yang kami potong}
|
|
82
90
|
help: {id: 'Dipotong dari pembayaran ke pemasok jasa; bukti potong kami terbitkan'}
|
|
83
91
|
default: '0'
|
|
92
|
+
# The withholding slip (BPPU) of this bill in the Coretax file (module coretax): the tax object, the base (empty =
|
|
93
|
+
# the bill's DPP) and the rate. pph23_amount stays what was withheld; the export refuses a bill whose amount is
|
|
94
|
+
# not base x rate. The recipient's identity is computed from the vendor while the bill is a draft.
|
|
95
|
+
- name: pph23_object_code
|
|
96
|
+
type: data
|
|
97
|
+
label: {id: Kode objek PPh 23}
|
|
98
|
+
default: vendor.pph23_object_code
|
|
99
|
+
depends_on: app_installed('coretax') && pph23_amount > 0
|
|
100
|
+
- name: pph23_dpp
|
|
101
|
+
type: currency
|
|
102
|
+
label: {id: DPP PPh 23}
|
|
103
|
+
help: {id: 'Kosongkan bila sama dengan DPP tagihan'}
|
|
104
|
+
default: '0'
|
|
105
|
+
depends_on: app_installed('coretax') && pph23_amount > 0
|
|
106
|
+
- name: pph23_rate
|
|
107
|
+
type: percent
|
|
108
|
+
label: {id: Tarif PPh 23}
|
|
109
|
+
default: '2'
|
|
110
|
+
depends_on: app_installed('coretax') && pph23_amount > 0
|
|
111
|
+
- name: pph23_base
|
|
112
|
+
type: currency
|
|
113
|
+
label: {id: Dasar PPh 23}
|
|
114
|
+
hidden: true
|
|
115
|
+
compute: "pph23_dpp > 0 ? pph23_dpp : dpp"
|
|
116
|
+
- name: recipient_tin
|
|
117
|
+
type: data
|
|
118
|
+
label: {id: NPWP/NIK penerima penghasilan}
|
|
119
|
+
hidden: true
|
|
120
|
+
depends_on: app_installed('coretax')
|
|
121
|
+
compute: "vendor.npwp != '' ? vendor.npwp : vendor.nik"
|
|
122
|
+
- name: recipient_idtku
|
|
123
|
+
type: data
|
|
124
|
+
label: {id: NITKU penerima penghasilan}
|
|
125
|
+
hidden: true
|
|
126
|
+
depends_on: app_installed('coretax')
|
|
127
|
+
compute: "vendor.nitku != '' ? vendor.nitku : (vendor.npwp != '' ? vendor.npwp + '000000' : (vendor.nik != '' ? vendor.nik + '000000' : ''))"
|
|
128
|
+
# The first bill of the amend chain and its date (frozen at submit): a bill whose chain started in an earlier period
|
|
129
|
+
# had its withholding slip reported there; the correction is a pembetulan in Coretax, not a new slip. Empty when the
|
|
130
|
+
# bill it amends froze before the coretax module and was itself an amend (its origin is unknown).
|
|
131
|
+
- name: replaces
|
|
132
|
+
type: link
|
|
133
|
+
to: vendor_bill
|
|
134
|
+
label: {id: Mengganti tagihan}
|
|
135
|
+
hidden: true
|
|
136
|
+
compute: amended_from
|
|
137
|
+
- name: origin_bill_date
|
|
138
|
+
type: data
|
|
139
|
+
label: {id: Tanggal tagihan asal}
|
|
140
|
+
hidden: true
|
|
141
|
+
compute: "replaces == '' ? bill_date : (replaces.origin_bill_date != '' ? replaces.origin_bill_date : (replaces.replaces == '' ? replaces.bill_date : ''))"
|
|
84
142
|
- name: amount_due
|
|
85
143
|
type: currency
|
|
86
144
|
label: {id: Tagihan bersih}
|
|
@@ -95,6 +153,31 @@ fields:
|
|
|
95
153
|
label: {id: Sisa tagihan}
|
|
96
154
|
compute: amount_due - paid_amount
|
|
97
155
|
in_list: true
|
|
156
|
+
# Accounting (module accounting): what the bill pays for. A project's cost goes to Biaya proyek; goods received
|
|
157
|
+
# into stock through a goods receipt or PO (or consigned goods sold) clear "Utang belum ditagih", only where the
|
|
158
|
+
# stock module keeps stock; anything else to the expense account chosen. The default follows the links on the bill.
|
|
159
|
+
- name: posting
|
|
160
|
+
type: select
|
|
161
|
+
label: {id: Dicatat sebagai}
|
|
162
|
+
default: "project != '' ? 'project' : ((goods_receipt != '' || purchase_order != '') && app_installed('stock') ? 'stock' : 'expense')"
|
|
163
|
+
depends_on: app_installed('accounting')
|
|
164
|
+
options:
|
|
165
|
+
- {value: stock, label: {id: Barang dagang atau bahan (sudah diterima)}}
|
|
166
|
+
- {value: project, label: {id: Biaya proyek}}
|
|
167
|
+
- {value: expense, label: {id: Beban operasional}}
|
|
168
|
+
- name: expense_account
|
|
169
|
+
type: select
|
|
170
|
+
label: {id: Akun beban}
|
|
171
|
+
default: "'61900'"
|
|
172
|
+
depends_on: app_installed('accounting') && posting == 'expense'
|
|
173
|
+
options:
|
|
174
|
+
- {value: '61100', label: {id: Beban gaji kantor}}
|
|
175
|
+
- {value: '61400', label: {id: Beban sewa}}
|
|
176
|
+
- {value: '61500', label: {id: 'Beban listrik, air, internet'}}
|
|
177
|
+
- {value: '61600', label: {id: Beban transport dan kirim}}
|
|
178
|
+
- {value: '61700', label: {id: Beban pemasaran}}
|
|
179
|
+
- {value: '61800', label: {id: Beban perlengkapan dan perawatan}}
|
|
180
|
+
- {value: '61900', label: {id: Beban operasional lain}}
|
|
98
181
|
- name: notes
|
|
99
182
|
type: text
|
|
100
183
|
label: {id: Catatan}
|
|
@@ -106,6 +189,30 @@ fields:
|
|
|
106
189
|
- {name: grand_total_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Total (valas)}, compute: "dpp_fx + ppn_fx"}
|
|
107
190
|
- {name: amount_due_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Tagihan bersih (valas)}, compute: "currency != '' && currency != 'IDR' ? round(grand_total_fx - pph23_amount / exchange_rate, 2) : 0"} # pph23_amount is entered in rupiah only
|
|
108
191
|
rules:
|
|
192
|
+
- name: posting_stock_needs_stock
|
|
193
|
+
on: save
|
|
194
|
+
check: posting != 'stock' || app_installed('stock')
|
|
195
|
+
message: {id: Tagihan barang dagang hanya untuk usaha yang mencatat stok; pilih Beban operasional atau Biaya proyek}
|
|
196
|
+
- name: posting_project_needs_project
|
|
197
|
+
on: save
|
|
198
|
+
check: (posting != 'project' || project != '') && (project == '' || posting == 'project' || posting == null)
|
|
199
|
+
message: {id: 'Tagihan dengan proyek dicatat sebagai biaya proyek, dan biaya proyek perlu proyeknya'}
|
|
200
|
+
- name: pph23_rate_range
|
|
201
|
+
on: save
|
|
202
|
+
check: pph23_rate >= 0 && pph23_rate <= 100
|
|
203
|
+
message: {id: Tarif PPh 23 antara 0 dan 100 persen}
|
|
204
|
+
- name: pph23_dpp_range
|
|
205
|
+
on: save
|
|
206
|
+
check: pph23_dpp >= 0 && pph23_dpp <= dpp
|
|
207
|
+
message: {id: DPP PPh 23 antara 0 dan DPP tagihan}
|
|
208
|
+
- name: pph23_object_code_format
|
|
209
|
+
on: save
|
|
210
|
+
check: "pph23_object_code == '' || pph23_object_code.matches('^24-10[0-6]-[0-9]{2}$')"
|
|
211
|
+
message: {id: 'Kode objek PPh 23 berbentuk 24-1xx-xx (lihat daftar objek pajak Coretax)'}
|
|
212
|
+
- name: project_open
|
|
213
|
+
on: save
|
|
214
|
+
check: project == '' || project.state != 'closed'
|
|
215
|
+
message: {id: Proyek yang sudah ditutup tidak bisa dipakai untuk pembelian baru}
|
|
109
216
|
- name: foreign_needs_rate
|
|
110
217
|
on: save
|
|
111
218
|
check: currency == '' || currency == 'IDR' || exchange_rate > 1
|
|
@@ -122,10 +229,16 @@ rules:
|
|
|
122
229
|
on: save
|
|
123
230
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
124
231
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
232
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
233
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
234
|
+
- name: tax_rate_at_most_config
|
|
235
|
+
on: save
|
|
236
|
+
check: "tax_rate <= tax.ppn_rate || (purchase_order != '' && tax_rate == purchase_order.tax_rate)"
|
|
237
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
125
238
|
- name: ppn_needs_pkp
|
|
126
239
|
on: save
|
|
127
240
|
check: "tax_rate == 0 || (purchase_order != '' ? purchase_order.tax_rate > 0 : vendor.pkp)"
|
|
128
|
-
message: {id: Pemasok bukan PKP (atau PO tanpa PPN)
|
|
241
|
+
message: {id: 'Pemasok bukan PKP (atau PO tanpa PPN): tarif PPN harus 0. Status PKP pemasok diatur pemilik atau bagian keuangan'}
|
|
129
242
|
- name: due_after_bill
|
|
130
243
|
on: save
|
|
131
244
|
check: due_date == '' || due_date >= bill_date
|
|
@@ -150,14 +263,14 @@ views:
|
|
|
150
263
|
layout:
|
|
151
264
|
- section: {id: Pemasok}
|
|
152
265
|
columns:
|
|
153
|
-
- [vendor, bill_no, purchase_order, goods_receipt]
|
|
266
|
+
- [vendor, bill_no, purchase_order, goods_receipt, project]
|
|
154
267
|
- [bill_date, due_date]
|
|
155
268
|
- section: {id: Barang/jasa}
|
|
156
269
|
fields: [items]
|
|
157
270
|
- section: {id: Pajak & potongan}
|
|
158
271
|
columns:
|
|
159
272
|
- [subtotal, dpp, tax_rate, dpp_num, dpp_den, ppn, grand_total]
|
|
160
|
-
- [pph23_amount, amount_due, paid_amount, outstanding]
|
|
273
|
+
- [pph23_amount, pph23_object_code, pph23_dpp, pph23_rate, amount_due, paid_amount, outstanding]
|
|
161
274
|
- section: {id: Catatan}
|
|
162
275
|
fields: [notes]
|
|
163
276
|
- section: {id: Mata uang asing}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
2
|
name: procurement
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.1.5
|
|
4
4
|
title: {id: Pembelian, en: Procurement}
|
|
5
|
+
summary:
|
|
6
|
+
id: Permintaan dan pesanan pembelian, barang datang dan tagihan pemasok.
|
|
7
|
+
en: Purchase requests and orders, goods received and supplier bills.
|
|
8
|
+
category: purchasing
|
|
9
|
+
icon: shopping-bag-line
|
|
5
10
|
requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0}
|
|
6
|
-
optional: {outlets: ^1.0, currency: ^1.0, stock: ^1.0}
|
|
11
|
+
optional: {outlets: ^1.0, currency: ^1.0, stock: ^1.0, projects: ^1.0}
|
|
7
12
|
# Semantics fixed in docs/kernel-hooks.md (section procurement). stock.post_moves is a core hook (goods_receipt.on_submit);
|
|
8
13
|
# stock.reverse_moves (goods_receipt.on_cancel) is declared here too, since stock is optional for procurement (a no-op without it).
|
|
9
14
|
hooks: [procurement.make_po, procurement.receive, procurement.post_payable, procurement.reverse_payable, stock.reverse_moves]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# Inside a batch's cancel: refused when the finished-goods outlet no longer holds the batch's outputs (they were used
|
|
3
|
+
# by a later batch or sold), or the reversal would leave that stock below zero while its value sits elsewhere.
|
|
4
|
+
name: batch_cancel_guard
|
|
5
|
+
label: {id: Batch yang hasilnya sudah terpakai tidak bisa dibatalkan}
|
|
6
|
+
on: production_batch.cancelled
|
|
7
|
+
steps:
|
|
8
|
+
# the cancel has already reversed the moves: a balance of any output (product or by-product) below zero means it was used
|
|
9
|
+
- {find_all: stock_balance, where: "outlet == event.output_outlet && item in event.outputs.map(o, o.item) && qty < -0.0005", as: used}
|
|
10
|
+
- if: size(used) > 0
|
|
11
|
+
create: production_guard
|
|
12
|
+
set: {reason: "'output_used'", document: event.name}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# A new batch with no lines yet is drafted from its BOM, scaled to the planned qty: materials, the main product with
|
|
3
|
+
# the BOM's material share and the by-products with theirs. Outlet staff fill a batch by hand (they cannot read a BOM
|
|
4
|
+
# back through an update, see work_order_materials_created).
|
|
5
|
+
name: batch_from_bom
|
|
6
|
+
label: {id: Batch diisi dari resep}
|
|
7
|
+
on: production_batch.created
|
|
8
|
+
if: "event.bom != '' && event.planned_qty > 0 && size(event.materials) == 0 && size(event.outputs) == 0 && !('outlet_staff' in user.roles)"
|
|
9
|
+
steps:
|
|
10
|
+
- {find: bom, where: name == event.bom, as: b}
|
|
11
|
+
- {find: production_batch, where: name == event.name, as: pb}
|
|
12
|
+
- update: b
|
|
13
|
+
if: b != null
|
|
14
|
+
set: {bom_name: b.bom_name}
|
|
15
|
+
- update: pb
|
|
16
|
+
if: b != null && b.output_qty > 0
|
|
17
|
+
set:
|
|
18
|
+
materials: "b.lines.map(l, {'item': l.item, 'qty': round(l.qty * event.planned_qty / b.output_qty * 1000) / 1000, 'uom': l.uom})"
|
|
19
|
+
outputs: "[{'item': event.item, 'qty': event.planned_qty, 'cost_share': 100 - b.byproduct_share}] + b.byproducts.map(x, {'item': x.item, 'qty': round(x.qty * event.planned_qty / b.output_qty * 1000) / 1000, 'cost_share': x.cost_share})"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# A cancelled batch cancels its wage sheet, line by line (the weekly recap reads the lines).
|
|
3
|
+
name: wage_sheet_on_batch_cancelled
|
|
4
|
+
label: {id: Upah borongan batch dibatalkan}
|
|
5
|
+
on: production_batch.cancelled
|
|
6
|
+
steps:
|
|
7
|
+
- {find: wage_sheet, where: production_batch == event.name && !cancelled, as: ws}
|
|
8
|
+
- update: ws
|
|
9
|
+
if: ws != null
|
|
10
|
+
set: {cancelled: true}
|
|
11
|
+
- update: ws
|
|
12
|
+
if: ws != null
|
|
13
|
+
set:
|
|
14
|
+
lines: "ws.lines.map(l, {'name': l.name, 'worker': l.worker, 'stage': l.stage, 'qty': l.qty, 'rate': l.rate, 'amount': l.amount, 'work_date': l.work_date, 'cancelled': true})"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# The wages of a submitted batch become a wage sheet (one line per labour row), dated the production day.
|
|
3
|
+
name: wage_sheet_on_batch_submitted
|
|
4
|
+
label: {id: Upah borongan dari batch}
|
|
5
|
+
on: production_batch.submitted
|
|
6
|
+
if: size(event.labour) > 0
|
|
7
|
+
steps:
|
|
8
|
+
- create: wage_sheet
|
|
9
|
+
set:
|
|
10
|
+
production_batch: event.name
|
|
11
|
+
work_date: event.production_date
|
|
12
|
+
lines: "event.labour.map(l, {'worker': l.worker, 'stage': l.stage, 'qty': l.qty, 'rate': l.rate, 'amount': l.amount, 'work_date': event.production_date, 'cancelled': false})"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# Fills the SPK's material need from its BOM, scaled to the planned qty, whenever the qty or the BOM differs from
|
|
3
|
+
# the ones it was filled for; lines edited by hand stay until then. A find returns a record without its table rows,
|
|
4
|
+
# so the BOM is read back through an update that changes nothing (head office may write BOMs).
|
|
5
|
+
name: work_order_materials_created
|
|
6
|
+
label: {id: Kebutuhan bahan SPK dari resep}
|
|
7
|
+
on: work_order.created
|
|
8
|
+
if: "event.docstatus == 0 && event.bom != '' && event.qty > 0 && (event.materials_qty != event.qty || event.materials_bom != event.bom) && !('outlet_staff' in user.roles)"
|
|
9
|
+
steps:
|
|
10
|
+
- {find: bom, where: name == event.bom, as: b}
|
|
11
|
+
- {find: work_order, where: name == event.name, as: wo}
|
|
12
|
+
- update: b
|
|
13
|
+
if: b != null
|
|
14
|
+
set: {bom_name: b.bom_name}
|
|
15
|
+
- update: wo
|
|
16
|
+
if: b != null && b.output_qty > 0
|
|
17
|
+
set:
|
|
18
|
+
materials: "b.lines.map(l, {'item': l.item, 'qty': round(l.qty * event.qty / b.output_qty * 1000) / 1000, 'uom': l.uom})"
|
|
19
|
+
materials_qty: event.qty
|
|
20
|
+
materials_bom: event.bom
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# Fills the SPK's material need from its BOM, scaled to the planned qty, whenever the qty or the BOM differs from
|
|
3
|
+
# the ones it was filled for; lines edited by hand stay until then. A find returns a record without its table rows,
|
|
4
|
+
# so the BOM is read back through an update that changes nothing (head office may write BOMs).
|
|
5
|
+
name: work_order_materials_updated
|
|
6
|
+
label: {id: Kebutuhan bahan SPK dari resep}
|
|
7
|
+
on: work_order.updated
|
|
8
|
+
if: "event.docstatus == 0 && event.bom != '' && event.qty > 0 && (event.materials_qty != event.qty || event.materials_bom != event.bom) && !('outlet_staff' in user.roles)"
|
|
9
|
+
steps:
|
|
10
|
+
- {find: bom, where: name == event.bom, as: b}
|
|
11
|
+
- {find: work_order, where: name == event.name, as: wo}
|
|
12
|
+
- update: b
|
|
13
|
+
if: b != null
|
|
14
|
+
set: {bom_name: b.bom_name}
|
|
15
|
+
- update: wo
|
|
16
|
+
if: b != null && b.output_qty > 0
|
|
17
|
+
set:
|
|
18
|
+
materials: "b.lines.map(l, {'item': l.item, 'qty': round(l.qty * event.qty / b.output_qty * 1000) / 1000, 'uom': l.uom})"
|
|
19
|
+
materials_qty: event.qty
|
|
20
|
+
materials_bom: event.bom
|