@rangka-os/create 0.5.0-alpha.2 → 0.5.0-alpha.20
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/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 +90 -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 +1 -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/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 +59 -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 +263 -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 +74 -0
- package/template/base/modules/projects/module.rk +7 -2
- package/template/base/modules/projects/roles/field_worker.rk +9 -0
- package/template/base/modules/projects/roles/site_supervisor.rk +7 -0
- package/template/base/modules/projects/screens/absen.rk +21 -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_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 +2 -0
- package/template/base/modules/users/module.rk +6 -1
- 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 +45 -4
- package/template/base/modules/workforce/module.rk +5 -0
- package/template/demo/fixtures/demo.rk +2 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Bill of materials (resep produksi) for output_qty of a product. A line may be a semi-finished item that has its own
|
|
3
|
+
# BOM (item.default_bom): its unit cost is that BOM's unit_cost, so the cost rolls up any number of levels
|
|
4
|
+
# (multi-level). Each level is made with its own work order. By-products take a share of the material cost.
|
|
5
|
+
name: bom
|
|
6
|
+
label: {id: Resep produksi (BOM), en: Bill of materials}
|
|
7
|
+
icon: stock
|
|
8
|
+
naming: BOM-{####}
|
|
9
|
+
title_field: bom_name
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, export: true, print: true}
|
|
12
|
+
- {role: outlet_staff, read: true, print: true}
|
|
13
|
+
fields:
|
|
14
|
+
- {name: bom_name, type: data, label: {id: Nama resep}, required: true, in_list: true}
|
|
15
|
+
- {name: item, type: link, to: item, label: {id: Produk}, required: true, in_list: true}
|
|
16
|
+
- {name: output_qty, type: float, label: {id: Hasil standar per batch}, default: '1', required: true, in_list: true}
|
|
17
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan hasil}, default: item.stock_uom}
|
|
18
|
+
- {name: yield_percent, type: float, label: {id: Rendemen standar (%)}, default: '100', help: {id: Hasil baik dibanding bahan yang masuk}}
|
|
19
|
+
- {name: active, type: check, label: {id: Aktif}, default: 'true', in_list: true}
|
|
20
|
+
- {name: lines, type: table, of: bom_line, label: {id: Bahan}, min_rows: 1}
|
|
21
|
+
- {name: byproducts, type: table, of: bom_byproduct, label: {id: Produk sampingan}}
|
|
22
|
+
- {name: labour_per_unit, type: currency, label: {id: Upah borongan per satuan}, help: {id: Jumlah tarif semua tahap per satuan hasil}}
|
|
23
|
+
- {name: overhead_per_unit, type: currency, label: {id: Overhead per satuan}, help: {id: 'Tarif sederhana: listrik, gas, sewa dibagi hasil sebulan'}, hidden_for: [outlet_staff]}
|
|
24
|
+
- {name: material_cost, type: currency, label: {id: Biaya bahan per batch}, compute: "lines.map(l, l.cost).sum()", hidden_for: [outlet_staff]}
|
|
25
|
+
- {name: byproduct_share, type: float, label: {id: Porsi produk sampingan (%)}, compute: "byproducts.map(b, b.cost_share).sum()"}
|
|
26
|
+
- name: unit_cost
|
|
27
|
+
type: currency
|
|
28
|
+
label: {id: HPP standar per satuan}
|
|
29
|
+
compute: "output_qty > 0 ? round(material_cost * (100 - byproduct_share) / 100 / output_qty) + labour_per_unit + overhead_per_unit : 0"
|
|
30
|
+
in_list: true
|
|
31
|
+
hidden_for: [outlet_staff]
|
|
32
|
+
- {name: notes, type: text, label: {id: Catatan}}
|
|
33
|
+
rules:
|
|
34
|
+
- name: output_positive
|
|
35
|
+
on: save
|
|
36
|
+
check: output_qty > 0
|
|
37
|
+
message: {id: Hasil standar harus lebih dari 0}
|
|
38
|
+
- name: not_itself
|
|
39
|
+
on: save
|
|
40
|
+
check: "lines.map(l, l.item == item ? 1 : 0).sum() == 0"
|
|
41
|
+
message: {id: Produk tidak boleh menjadi bahannya sendiri}
|
|
42
|
+
- name: share_below_100
|
|
43
|
+
on: save
|
|
44
|
+
check: byproduct_share < 100
|
|
45
|
+
message: {id: Porsi produk sampingan harus di bawah 100%}
|
|
46
|
+
- name: qty_positive
|
|
47
|
+
on: save
|
|
48
|
+
check: "lines.map(l, l.qty <= 0 ? 1 : 0).sum() == 0"
|
|
49
|
+
message: {id: Jumlah bahan harus lebih dari 0}
|
|
50
|
+
views:
|
|
51
|
+
list:
|
|
52
|
+
columns: [name, bom_name, item, output_qty, unit_cost, active]
|
|
53
|
+
form:
|
|
54
|
+
layout:
|
|
55
|
+
- section: {id: Resep}
|
|
56
|
+
columns:
|
|
57
|
+
- [bom_name, item, active]
|
|
58
|
+
- [output_qty, uom, yield_percent]
|
|
59
|
+
- section: {id: Bahan}
|
|
60
|
+
fields: [lines]
|
|
61
|
+
- section: {id: Produk sampingan}
|
|
62
|
+
fields: [byproducts]
|
|
63
|
+
- section: {id: Biaya standar}
|
|
64
|
+
columns:
|
|
65
|
+
- [material_cost, labour_per_unit, overhead_per_unit]
|
|
66
|
+
- [byproduct_share, unit_cost]
|
|
67
|
+
- section: {id: Catatan}
|
|
68
|
+
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: bom_byproduct
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: item, type: link, to: item, label: {id: Produk sampingan}, required: true}
|
|
6
|
+
- {name: qty, type: float, label: {id: Qty per batch}, default: '1'}
|
|
7
|
+
- {name: cost_share, type: float, label: {id: Porsi biaya bahan (%)}, default: '0'}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: bom_line
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: item, type: link, to: item, label: {id: Bahan}, required: true}
|
|
6
|
+
- {name: qty, type: float, label: {id: Qty}, default: '1'}
|
|
7
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, default: item.stock_uom}
|
|
8
|
+
- {name: semi_finished, type: check, label: {id: Setengah jadi}, compute: "item.default_bom != ''"}
|
|
9
|
+
# a semi-finished item costs what its own BOM says (rolled up); a raw material its standard cost
|
|
10
|
+
- {name: unit_cost, type: currency, label: {id: Biaya per satuan}, compute: "item.default_bom != '' ? item.default_bom.unit_cost : item.standard_cost", hidden_for: [outlet_staff]}
|
|
11
|
+
- {name: cost, type: currency, label: {id: Biaya}, compute: round(qty * unit_cost), hidden_for: [outlet_staff]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Hasil produksi per batch. The batch number is the production code printed on the pack; the expiry date follows the
|
|
3
|
+
# product's shelf life. Submit takes the materials out of the production outlet at their moving average and puts
|
|
4
|
+
# the outputs into the finished-goods outlet at the value of those materials, split by cost_share (contract 0021,
|
|
5
|
+
# K-o). The actual cost (HPP) of the batch adds the piece-rate wages and the overhead rate to the material cost; the
|
|
6
|
+
# stock value holds the material cost only until K-r. Cancel reverses the stock (stock.reverse_moves).
|
|
7
|
+
name: production_batch
|
|
8
|
+
label: {id: Hasil produksi (batch), en: Production batch}
|
|
9
|
+
icon: stock
|
|
10
|
+
is_submittable: true
|
|
11
|
+
naming: BATCH-{YY}{MM}-{####}
|
|
12
|
+
title_field: item
|
|
13
|
+
on_submit: [stock.post_moves]
|
|
14
|
+
on_cancel: [stock.reverse_moves]
|
|
15
|
+
permissions:
|
|
16
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
17
|
+
- {role: outlet_staff, read: true, create: true, write: true, submit: true, print: true}
|
|
18
|
+
fields:
|
|
19
|
+
- {name: work_order, type: link, to: work_order, label: {id: SPK}, required: true, in_list: true, peek: [qty, due_date]}
|
|
20
|
+
- {name: item, type: link, to: item, label: {id: Produk}, default: work_order.item, read_only: true, in_list: true}
|
|
21
|
+
- {name: bom, type: link, to: bom, label: {id: Resep (BOM)}, default: work_order.bom, read_only: true}
|
|
22
|
+
- {name: outlet, type: link, to: outlet, label: {id: Tempat produksi (bahan keluar)}, default: work_order.outlet, required: true}
|
|
23
|
+
- {name: output_outlet, type: link, to: outlet, label: {id: Gudang barang jadi}, required: true}
|
|
24
|
+
- {name: production_date, type: date, label: {id: Tanggal produksi}, default: today(), required: true, in_list: true}
|
|
25
|
+
- {name: shelf_life_days, type: int, label: {id: Umur simpan (hari)}, default: item.shelf_life_days}
|
|
26
|
+
- name: expiry_date
|
|
27
|
+
type: date
|
|
28
|
+
label: {id: Kedaluwarsa}
|
|
29
|
+
compute: "shelf_life_days > 0 ? production_date + duration(shelf_life_days) : ''"
|
|
30
|
+
in_list: true
|
|
31
|
+
# the SPK's qty, not typed on the batch: output, materials and wages are checked against it
|
|
32
|
+
- {name: planned_qty, type: float, label: {id: Qty rencana}, default: work_order.qty, read_only: true}
|
|
33
|
+
# no min_rows: a batch created empty is drafted from its BOM by the flow batch_from_bom (rules check at submit)
|
|
34
|
+
- {name: materials, type: table, of: production_material, label: {id: Bahan terpakai}}
|
|
35
|
+
- {name: outputs, type: table, of: production_output, label: {id: Hasil}}
|
|
36
|
+
- {name: reject_qty, type: float, label: {id: Qty reject}}
|
|
37
|
+
- {name: labour, type: table, of: production_labour, label: {id: Upah borongan}}
|
|
38
|
+
- {name: good_qty, type: float, label: {id: Hasil baik (produk utama)}, compute: "outputs.map(o, o.item == item ? o.qty : 0).sum()", in_list: true}
|
|
39
|
+
# the unit good_qty is counted in (the product's stock unit), so a list of batches of different products never reads
|
|
40
|
+
# 100 pak and 30 kg as the same kind of number (gladi G10)
|
|
41
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, compute: item.stock_uom, in_list: true}
|
|
42
|
+
- {name: yield_percent, type: float, label: {id: Rendemen aktual (%)}, compute: "planned_qty > 0 ? round(good_qty * 10000 / planned_qty) / 100 : 0"}
|
|
43
|
+
- {name: share_total, type: float, label: {id: Total porsi biaya (%)}, compute: "outputs.map(o, o.cost_share).sum()"}
|
|
44
|
+
- {name: main_share, type: float, label: {id: Porsi biaya produk utama (%)}, compute: "outputs.map(o, o.item == item ? o.cost_share : 0).sum()"}
|
|
45
|
+
- {name: material_cost, type: currency, label: {id: Biaya bahan (aktual)}, read_only: true, hidden_for: [outlet_staff]}
|
|
46
|
+
- {name: labour_cost, type: currency, label: {id: Upah borongan}, compute: "labour.map(l, l.amount).sum()"}
|
|
47
|
+
- {name: overhead_rate, type: currency, label: {id: Overhead per satuan}, default: bom.overhead_per_unit, hidden_for: [outlet_staff]}
|
|
48
|
+
- {name: overhead_cost, type: currency, label: {id: Overhead}, compute: round(good_qty * overhead_rate), hidden_for: [outlet_staff]}
|
|
49
|
+
# The product's share of the materials, plus all wages and overhead (by-products carry only their material share).
|
|
50
|
+
- name: hpp_total
|
|
51
|
+
type: currency
|
|
52
|
+
label: {id: HPP batch (produk utama)}
|
|
53
|
+
compute: "round(material_cost * main_share / 100) + labour_cost + overhead_cost"
|
|
54
|
+
in_list: true
|
|
55
|
+
hidden_for: [outlet_staff]
|
|
56
|
+
- {name: hpp_per_unit, type: currency, label: {id: HPP per satuan}, compute: "good_qty > 0 ? round(hpp_total / good_qty) : 0", in_list: true, hidden_for: [outlet_staff]}
|
|
57
|
+
- {name: standard_unit_cost, type: currency, label: {id: HPP standar per satuan}, default: bom.unit_cost, read_only: true, hidden_for: [outlet_staff]}
|
|
58
|
+
- {name: notes, type: text, label: {id: Catatan}}
|
|
59
|
+
stock:
|
|
60
|
+
date: production_date
|
|
61
|
+
moves:
|
|
62
|
+
- {lines: materials, out: outlet, reason: production_out, cogs: cogs}
|
|
63
|
+
- {lines: outputs, in: output_outlet, reason: production_in, cost: {consumed: true, split: cost_share}}
|
|
64
|
+
cogs_total: material_cost
|
|
65
|
+
# Deviations from the plan wait for head office: materials that are not in the BOM, or more good output than 110% of
|
|
66
|
+
# the planned qty (a batch puts stock in at the value of what it took out, so an inflated output dilutes the cost).
|
|
67
|
+
approvals:
|
|
68
|
+
- name: material_outside_bom
|
|
69
|
+
on: submit
|
|
70
|
+
when: "materials.map(m, bom.lines.map(b, b.item == m.item ? 1 : 0).sum() > 0 ? 0 : 1).sum() > 0"
|
|
71
|
+
approvers: [head_office]
|
|
72
|
+
label: {id: Bahan di luar resep, en: Material not in the BOM}
|
|
73
|
+
# materials per BOM line against the recipe scaled to the good output: under 90% (output inflated against what was
|
|
74
|
+
# used, so the stock comes in too cheap) or over 120% (waste, or materials booked to the wrong batch)
|
|
75
|
+
- name: material_off_bom
|
|
76
|
+
on: submit
|
|
77
|
+
when: "good_qty > 0 && bom.output_qty > 0 && bom.lines.map(b, materials.map(m, m.item == b.item ? m.qty : 0).sum() < b.qty * good_qty / bom.output_qty * 0.9 || materials.map(m, m.item == b.item ? m.qty : 0).sum() > b.qty * good_qty / bom.output_qty * 1.2 ? 1 : 0).sum() > 0"
|
|
78
|
+
approvers: [head_office]
|
|
79
|
+
label: {id: Pemakaian bahan menyimpang dari resep, en: Materials off the BOM}
|
|
80
|
+
# wages above the BOM's standard piece cost for the good output (+10%)
|
|
81
|
+
- name: labour_above_standard
|
|
82
|
+
on: submit
|
|
83
|
+
when: labour_cost > round(bom.labour_per_unit * good_qty * 1.1)
|
|
84
|
+
approvers: [head_office]
|
|
85
|
+
label: {id: Upah borongan di atas standar, en: Piece-rate wages above standard}
|
|
86
|
+
# outputs against the BOM: the product's cost share is 100% less the by-products', each by-product keeps its share and
|
|
87
|
+
# at most 120% of its standard qty for the good output (a share or qty moved between outputs shifts stock value)
|
|
88
|
+
- name: output_off_bom
|
|
89
|
+
on: submit
|
|
90
|
+
when: "main_share < 100 - bom.byproduct_share - 0.005 || main_share > 100 - bom.byproduct_share + 0.005 || bom.byproducts.map(b, outputs.map(o, o.item == b.item ? o.cost_share : 0).sum() < b.cost_share - 0.005 || outputs.map(o, o.item == b.item ? o.cost_share : 0).sum() > b.cost_share + 0.005 || (bom.output_qty > 0 && outputs.map(o, o.item == b.item ? o.qty : 0).sum() > b.qty * good_qty / bom.output_qty * 1.2) ? 1 : 0).sum() > 0"
|
|
91
|
+
approvers: [head_office]
|
|
92
|
+
label: {id: Hasil atau porsi biaya menyimpang dari resep, en: Outputs off the BOM}
|
|
93
|
+
- name: over_planned_output
|
|
94
|
+
on: submit
|
|
95
|
+
when: good_qty > planned_qty * 1.1
|
|
96
|
+
approvers: [head_office]
|
|
97
|
+
label: {id: Hasil melebihi rencana, en: Output above plan}
|
|
98
|
+
rules:
|
|
99
|
+
- name: outputs_of_bom
|
|
100
|
+
on: save
|
|
101
|
+
check: "outputs.map(o, o.item == item || bom.byproducts.map(b, b.item == o.item ? 1 : 0).sum() > 0 ? 0 : 1).sum() == 0"
|
|
102
|
+
message: {id: Hasil hanya produk SPK atau produk sampingan resepnya}
|
|
103
|
+
- name: output_outlet_of_staff
|
|
104
|
+
on: save
|
|
105
|
+
check: "!('outlet_staff' in user.roles) || output_outlet in user.outlets"
|
|
106
|
+
message: {id: Gudang barang jadi harus outlet tempat kamu bekerja}
|
|
107
|
+
- name: work_order_released
|
|
108
|
+
on: save
|
|
109
|
+
check: work_order.docstatus == 1 && item == work_order.item && bom == work_order.bom && planned_qty == work_order.qty
|
|
110
|
+
message: {id: 'Batch hanya untuk SPK yang sudah dirilis (diajukan); kalau SPK-nya diganti, buat batch baru'}
|
|
111
|
+
- name: has_lines
|
|
112
|
+
on: submit
|
|
113
|
+
check: size(materials) > 0 && size(outputs) > 0
|
|
114
|
+
message: {id: Isi bahan terpakai dan hasil}
|
|
115
|
+
- name: shares_add_up
|
|
116
|
+
on: save
|
|
117
|
+
check: "size(outputs) == 0 || (share_total > 99.995 && share_total < 100.005)"
|
|
118
|
+
message: {id: Porsi biaya semua hasil harus berjumlah 100%}
|
|
119
|
+
- name: main_product_out
|
|
120
|
+
on: submit
|
|
121
|
+
check: good_qty > 0
|
|
122
|
+
message: {id: Isi hasil baik produk utama}
|
|
123
|
+
- name: qty_positive
|
|
124
|
+
on: save
|
|
125
|
+
check: "materials.map(m, m.qty <= 0 ? 1 : 0).sum() + outputs.map(o, o.qty <= 0 ? 1 : 0).sum() + labour.map(l, l.qty <= 0 ? 1 : 0).sum() == 0"
|
|
126
|
+
message: {id: 'Jumlah bahan, hasil dan upah harus lebih dari 0'}
|
|
127
|
+
- name: reject_not_negative
|
|
128
|
+
on: save
|
|
129
|
+
check: reject_qty >= 0
|
|
130
|
+
message: {id: Qty reject tidak boleh minus}
|
|
131
|
+
views:
|
|
132
|
+
list:
|
|
133
|
+
columns: [name, production_date, item, good_qty, yield_percent, hpp_per_unit, expiry_date, status]
|
|
134
|
+
filters: [item, outlet, work_order]
|
|
135
|
+
sort: -production_date
|
|
136
|
+
form:
|
|
137
|
+
layout:
|
|
138
|
+
- section: {id: Batch}
|
|
139
|
+
columns:
|
|
140
|
+
- [work_order, item, bom, planned_qty]
|
|
141
|
+
- [production_date, shelf_life_days, expiry_date, outlet, output_outlet]
|
|
142
|
+
- section: {id: Bahan terpakai}
|
|
143
|
+
fields: [materials]
|
|
144
|
+
- section: {id: Hasil}
|
|
145
|
+
fields: [outputs, reject_qty]
|
|
146
|
+
- section: {id: Upah borongan}
|
|
147
|
+
fields: [labour]
|
|
148
|
+
- section: {id: HPP aktual}
|
|
149
|
+
columns:
|
|
150
|
+
- [material_cost, labour_cost, overhead_rate, overhead_cost]
|
|
151
|
+
- [good_qty, yield_percent, hpp_total, hpp_per_unit, standard_unit_cost]
|
|
152
|
+
- section: {id: Catatan}
|
|
153
|
+
fields: [notes]
|
|
@@ -0,0 +1,23 @@
|
|
|
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 a batch cancel creates one with a reason, and the matching rule fails with
|
|
3
|
+
# its message, rolling the cancel back (like project_guard).
|
|
4
|
+
name: production_guard
|
|
5
|
+
label: {id: Penjaga produksi, en: Production guard}
|
|
6
|
+
icon: check
|
|
7
|
+
naming: PGR-{######}
|
|
8
|
+
title_field: reason
|
|
9
|
+
permissions:
|
|
10
|
+
- {role: head_office, create: true}
|
|
11
|
+
fields:
|
|
12
|
+
- name: reason
|
|
13
|
+
type: select
|
|
14
|
+
label: {id: Alasan}
|
|
15
|
+
required: true
|
|
16
|
+
options:
|
|
17
|
+
- {value: output_used, label: {id: Hasil batch sudah terpakai}}
|
|
18
|
+
- {name: document, type: data, label: {id: Dokumen}}
|
|
19
|
+
rules:
|
|
20
|
+
- name: output_used
|
|
21
|
+
on: save
|
|
22
|
+
check: reason != 'output_used'
|
|
23
|
+
message: {id: 'Hasil batch ini sudah terpakai atau terjual (stoknya di bawah qty hasil); batalkan dokumen pemakainya dulu'}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: production_labour
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: worker, type: link, to: worker, label: {id: Pekerja}, required: true}
|
|
6
|
+
- {name: stage, type: link, to: production_stage, label: {id: Tahap}, required: true}
|
|
7
|
+
- {name: qty, type: float, label: {id: Qty dikerjakan}}
|
|
8
|
+
# always the stage's rate: the piece rate is head office's (production_stage), not typed on the batch
|
|
9
|
+
- {name: rate, type: currency, label: {id: Tarif}, compute: stage.rate}
|
|
10
|
+
- {name: amount, type: currency, label: {id: Upah}, compute: round(qty * rate)}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: production_material
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: item, type: link, to: item, label: {id: Bahan}, required: true}
|
|
6
|
+
- {name: qty, type: float, label: {id: Qty terpakai}}
|
|
7
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, default: item.stock_uom}
|
|
8
|
+
- {name: cogs, type: currency, label: {id: Biaya bahan}, read_only: true, hidden_for: [outlet_staff]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: production_output
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: item, type: link, to: item, label: {id: Hasil}, required: true}
|
|
6
|
+
- {name: qty, type: float, label: {id: Qty}}
|
|
7
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, default: item.stock_uom}
|
|
8
|
+
- {name: cost_share, type: float, label: {id: Porsi biaya bahan (%)}, default: '100'}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# A production stage paid by the piece (borongan): giling, cetak, kemas. The rate is per unit of work; a stage per
|
|
3
|
+
# product when products pay differently ("Cetak dimsum", "Cetak nugget").
|
|
4
|
+
name: production_stage
|
|
5
|
+
label: {id: Tahap borongan, en: Piece-rate stage}
|
|
6
|
+
icon: stock
|
|
7
|
+
naming: TAHAP-{###}
|
|
8
|
+
title_field: stage_name
|
|
9
|
+
permissions:
|
|
10
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, export: true}
|
|
11
|
+
- {role: outlet_staff, read: true}
|
|
12
|
+
fields:
|
|
13
|
+
- {name: stage_name, type: data, label: {id: Tahap}, required: true, in_list: true}
|
|
14
|
+
- {name: unit, type: data, label: {id: Satuan kerja}, default: "'pak'", in_list: true}
|
|
15
|
+
- {name: rate, type: currency, label: {id: Tarif per satuan}, required: true, in_list: true}
|
|
16
|
+
- {name: active, type: check, label: {id: Aktif}, default: 'true'}
|
|
17
|
+
views:
|
|
18
|
+
list:
|
|
19
|
+
columns: [name, stage_name, unit, rate, active]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: wage_line
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: worker, type: link, to: worker, label: {id: Pekerja}, read_only: true}
|
|
6
|
+
- {name: stage, type: link, to: production_stage, label: {id: Tahap}, read_only: true}
|
|
7
|
+
# names for the printed wage sheet (a print reads only top-level links): copied from the worker and stage on save
|
|
8
|
+
- {name: worker_name, type: data, label: {id: Nama pekerja}, hidden: true, compute: worker.worker_name}
|
|
9
|
+
- {name: stage_name, type: data, label: {id: Nama tahap}, hidden: true, compute: stage.stage_name}
|
|
10
|
+
- {name: unit, type: data, label: {id: Satuan kerja}, hidden: true, compute: stage.unit}
|
|
11
|
+
- {name: qty, type: float, label: {id: Qty}, read_only: true}
|
|
12
|
+
- {name: rate, type: currency, label: {id: Tarif}, read_only: true}
|
|
13
|
+
- {name: amount, type: currency, label: {id: Upah}, read_only: true}
|
|
14
|
+
- {name: work_date, type: date, label: {id: Tanggal kerja}, read_only: true}
|
|
15
|
+
- {name: cancelled, type: check, label: {id: Batal}, read_only: true}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Piece-rate wages earned in one submitted batch, one line per worker and stage, dated the production day. Made by
|
|
3
|
+
# the flow wage_sheet_on_batch_submitted; a cancelled batch marks its lines cancelled. The weekly recap per worker
|
|
4
|
+
# (dashboard produksi_upah) reads the lines. Every field is read_only: wages are changed on the batch, not here.
|
|
5
|
+
name: wage_sheet
|
|
6
|
+
label: {id: Lembar upah borongan, en: Piece-rate wage sheet}
|
|
7
|
+
icon: card
|
|
8
|
+
naming: UPAH-{YYYY}-{#####}
|
|
9
|
+
title_field: production_batch
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: head_office, read: true, create: true, write: true, export: true, print: true}
|
|
12
|
+
# staff submitting a batch makes its sheet (the flow), but only head office reads wages
|
|
13
|
+
- {role: outlet_staff, create: true}
|
|
14
|
+
fields:
|
|
15
|
+
- {name: production_batch, type: data, label: {id: Batch}, read_only: true, in_list: true}
|
|
16
|
+
- {name: work_date, type: date, label: {id: Tanggal kerja}, read_only: true, in_list: true}
|
|
17
|
+
- {name: cancelled, type: check, label: {id: Batal}, read_only: true, in_list: true}
|
|
18
|
+
- {name: lines, type: table, of: wage_line, label: {id: Upah}, read_only: true}
|
|
19
|
+
- {name: total, type: currency, label: {id: Total upah}, compute: "cancelled ? 0 : lines.map(l, l.amount).sum()", in_list: true}
|
|
20
|
+
rules:
|
|
21
|
+
- name: made_by_batch
|
|
22
|
+
on: save
|
|
23
|
+
check: production_batch != ''
|
|
24
|
+
message: {id: Lembar upah dibuat dari batch yang diajukan}
|
|
25
|
+
views:
|
|
26
|
+
list:
|
|
27
|
+
columns: [name, production_batch, work_date, total, cancelled]
|
|
28
|
+
sort: -work_date
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Surat perintah kerja (SPK): make qty of a product with a BOM, for stock or for a customer order. The material need
|
|
3
|
+
# is filled from the BOM scaled to qty (flow work_order_materials) and can be edited before release (submit). A
|
|
4
|
+
# semi-finished line is made with its own SPK first. Batches (production_batch) report what was made against it.
|
|
5
|
+
name: work_order
|
|
6
|
+
label: {id: SPK produksi, en: Work order}
|
|
7
|
+
icon: stock
|
|
8
|
+
is_submittable: true
|
|
9
|
+
naming: SPK-{YYYY}-{#####}
|
|
10
|
+
title_field: item
|
|
11
|
+
permissions:
|
|
12
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
13
|
+
- {role: outlet_staff, read: true, print: true}
|
|
14
|
+
fields:
|
|
15
|
+
- {name: item, type: link, to: item, label: {id: Produk}, required: true, in_list: true}
|
|
16
|
+
- {name: bom, type: link, to: bom, label: {id: Resep (BOM)}, default: item.default_bom, required: true}
|
|
17
|
+
- {name: qty, type: float, label: {id: Qty rencana}, required: true, in_list: true}
|
|
18
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, default: item.stock_uom}
|
|
19
|
+
- {name: outlet, type: link, to: outlet, label: {id: Tempat produksi}, required: true, in_list: true}
|
|
20
|
+
- {name: start_date, type: date, label: {id: Mulai}, default: today(), required: true, in_list: true}
|
|
21
|
+
- {name: due_date, type: date, label: {id: Target selesai}, in_list: true}
|
|
22
|
+
- name: customer_order
|
|
23
|
+
type: link
|
|
24
|
+
to: customer_order
|
|
25
|
+
label: {id: Untuk pesanan}
|
|
26
|
+
depends_on: app_installed('orders')
|
|
27
|
+
- {name: size_notes, type: text, label: {id: Rincian ukuran / spesifikasi}}
|
|
28
|
+
- {name: materials, type: table, of: work_order_material, label: {id: Kebutuhan bahan}}
|
|
29
|
+
# the qty and BOM the material need was last filled for (flow work_order_materials); a change refills it
|
|
30
|
+
- {name: materials_qty, type: float, label: {id: Bahan dihitung untuk qty}, read_only: true}
|
|
31
|
+
- {name: materials_bom, type: data, label: {id: Bahan dihitung dari resep}, read_only: true}
|
|
32
|
+
- {name: notes, type: text, label: {id: Catatan}}
|
|
33
|
+
rules:
|
|
34
|
+
- name: qty_positive
|
|
35
|
+
on: save
|
|
36
|
+
check: qty > 0
|
|
37
|
+
message: {id: Qty rencana harus lebih dari 0}
|
|
38
|
+
- name: bom_of_item
|
|
39
|
+
on: save
|
|
40
|
+
check: bom == '' || bom.item == item
|
|
41
|
+
message: {id: Resep ini untuk produk lain}
|
|
42
|
+
- name: bom_active
|
|
43
|
+
on: submit
|
|
44
|
+
check: bom.active
|
|
45
|
+
message: {id: Resep tidak aktif}
|
|
46
|
+
- name: due_after_start
|
|
47
|
+
on: save
|
|
48
|
+
check: due_date == '' || due_date >= start_date
|
|
49
|
+
message: {id: Target selesai tidak boleh sebelum tanggal mulai}
|
|
50
|
+
views:
|
|
51
|
+
list:
|
|
52
|
+
columns: [name, item, qty, outlet, start_date, due_date, status]
|
|
53
|
+
sort: -start_date
|
|
54
|
+
form:
|
|
55
|
+
layout:
|
|
56
|
+
- section: {id: SPK}
|
|
57
|
+
columns:
|
|
58
|
+
- [item, bom, qty, uom]
|
|
59
|
+
- [outlet, start_date, due_date, customer_order]
|
|
60
|
+
- section: {id: Kebutuhan bahan}
|
|
61
|
+
fields: [materials]
|
|
62
|
+
- section: {id: Spesifikasi}
|
|
63
|
+
fields: [size_notes, notes]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: work_order_material
|
|
3
|
+
is_child: true
|
|
4
|
+
fields:
|
|
5
|
+
- {name: item, type: link, to: item, label: {id: Bahan}, required: true}
|
|
6
|
+
- {name: qty, type: float, label: {id: Qty dibutuhkan}}
|
|
7
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}, default: item.stock_uom}
|
|
8
|
+
- {name: semi_finished, type: check, label: {id: Setengah jadi (SPK sendiri)}, compute: "item.default_bom != ''"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
|
+
# Small-factory production: multi-level bills of materials with a rolled-up standard cost, work orders (SPK), batch
|
|
3
|
+
# results with expiry, actual cost per batch (materials at the cost the kernel took them out, piece-rate wages and a
|
|
4
|
+
# simple overhead rate) and piece-rate wage sheets per worker. A batch takes materials out and puts the products in
|
|
5
|
+
# at the value of those materials through the declarative stock block of contract 0021 (K-o). Wages and overhead are
|
|
6
|
+
# in the batch's actual cost (HPP) but not in the stock value until K-r.
|
|
7
|
+
name: production
|
|
8
|
+
version: 1.2.2
|
|
9
|
+
title: {id: Produksi, en: Production}
|
|
10
|
+
summary:
|
|
11
|
+
id: Resep produksi, SPK, hasil per batch dan upah borongan.
|
|
12
|
+
en: Bills of materials, work orders, batch output and piece-rate wages.
|
|
13
|
+
category: operations
|
|
14
|
+
icon: hammer-line
|
|
15
|
+
requires: {rangka: '>=0.5', users: ^1.0, catalogue: ^1.0, outlets: ^1.0, stock: ^1.0, workforce: ^1.0}
|
|
16
|
+
optional: {orders: ^1.0}
|
|
17
|
+
hooks: [stock.reverse_moves]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E: netral, satu tanda merek, total upah paling besar, kolom tanda terima per baris. */
|
|
3
|
+
.lh { display: flex; gap: 4mm; align-items: flex-start; padding-bottom: 4mm; margin-bottom: 5mm; border-bottom: 1px solid #1C1917; }
|
|
4
|
+
.lh .logo { max-height: 16mm; max-width: 40mm; }
|
|
5
|
+
.lh .mono { width: 12mm; height: 12mm; border-radius: 2.5mm; background: #1C1917; color: #fff; font-weight: 700; font-size: 16pt; line-height: 12mm; text-align: center; flex: none; }
|
|
6
|
+
.lh .legal-name { font-size: 1.3em; font-weight: 600; }
|
|
7
|
+
.lh .address { white-space: pre-line; }
|
|
8
|
+
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
|
|
9
|
+
.head h1 { font-size: 1.6em; margin: 0; letter-spacing: 0.02em; }
|
|
10
|
+
.head .no { font-size: 1.1em; font-weight: 600; margin-top: 1mm; }
|
|
11
|
+
.status { display: inline-block; margin-top: 2mm; padding: 0.6mm 2.4mm; border: 1px solid #1C1917; border-radius: 99px; font-size: 0.9em; font-weight: 600; }
|
|
12
|
+
.box { min-width: 62mm; padding: 3mm 4mm; border: 1px solid #D6D3D1; border-radius: 2mm; background: #F5F5F4; text-align: right; }
|
|
13
|
+
.box .k { color: #57534E; }
|
|
14
|
+
.box .v { font-size: 1.9em; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
|
|
15
|
+
.meta { margin: 5mm 0 2mm; }
|
|
16
|
+
.meta td { border: 0; padding: 0.6mm 0; }
|
|
17
|
+
.meta td:first-child { color: #57534E; width: 32mm; }
|
|
18
|
+
.items { margin-top: 4mm; }
|
|
19
|
+
.items th { border-bottom: 1px solid #1C1917; color: #57534E; font-weight: 600; font-size: 0.9em; }
|
|
20
|
+
.items td { padding-top: 3mm; padding-bottom: 3mm; }
|
|
21
|
+
.items td.sign { width: 34mm; }
|
|
22
|
+
.items tr.cancel td { color: #57534E; text-decoration: line-through; }
|
|
23
|
+
.items tfoot td { border-top: 1px solid #1C1917; border-bottom: 0; font-weight: 700; font-size: 1.1em; }
|
|
24
|
+
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
25
|
+
.note { margin-top: 3mm; font-size: 0.9em; }
|
|
26
|
+
.signoff { display: flex; justify-content: flex-end; gap: 10mm; margin-top: 10mm; break-inside: avoid; }
|
|
27
|
+
.signoff > div { width: 55mm; text-align: center; }
|
|
28
|
+
.signoff .space { height: 18mm; border-bottom: 1px solid #1C1917; margin-bottom: 1.5mm; }
|
|
29
|
+
{{end}}
|
|
30
|
+
{{define "letterhead"}}{{with .Letterhead}}<header class="lh">
|
|
31
|
+
{{if .logo_src}}<img class="logo" src="{{.logo_src}}" alt="">{{else if .legal_name}}<div class="mono" aria-hidden="true">{{upper (slice .legal_name 0 1)}}</div>{{end}}
|
|
32
|
+
<div>
|
|
33
|
+
<div class="legal-name">{{.legal_name}}</div>
|
|
34
|
+
{{with .tagline}}<div class="muted">{{.}}</div>{{end}}
|
|
35
|
+
{{with .address}}<div class="address">{{.}}</div>{{end}}
|
|
36
|
+
</div></header>{{end}}{{end}}
|
|
37
|
+
{{template "letterhead" .}}
|
|
38
|
+
{{- $cancelled := .Doc.cancelled -}}
|
|
39
|
+
<div class="head">
|
|
40
|
+
<div>
|
|
41
|
+
<h1>Lembar upah borongan</h1>
|
|
42
|
+
<div class="no">{{.Doc.name}}</div>
|
|
43
|
+
<div class="status">{{if $cancelled}}Batal, upah tidak dibayar{{else}}Siap dibayar{{end}}</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="box">
|
|
46
|
+
<div class="k">Total upah</div>
|
|
47
|
+
<div class="v">{{rupiah .Doc.total}}</div>
|
|
48
|
+
<div class="k">{{len .Doc.lines}} baris kerja</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<table class="meta">
|
|
52
|
+
<tr><td>Tanggal kerja</td><td>{{date .Doc.work_date "long"}}</td></tr>
|
|
53
|
+
<tr><td>Batch produksi</td><td>{{.Doc.production_batch}}</td></tr>
|
|
54
|
+
</table>
|
|
55
|
+
<table class="items">
|
|
56
|
+
<thead><tr><th>Pekerja</th><th>Tahap</th><th class="num">Hasil kerja</th><th class="num">Tarif</th><th class="num">Upah</th><th>Tanda terima</th></tr></thead>
|
|
57
|
+
<tbody>
|
|
58
|
+
{{range $l := .Doc.lines}}
|
|
59
|
+
{{- $who := or $l.worker_name $l.worker -}}{{- $stage := or $l.stage_name $l.stage -}}{{- $unit := $l.unit -}}
|
|
60
|
+
<tr{{if $l.cancelled}} class="cancel"{{end}}>
|
|
61
|
+
<td><strong>{{$who}}</strong></td>
|
|
62
|
+
<td>{{$stage}}</td>
|
|
63
|
+
<td class="num">{{number $l.qty}} {{$unit}}</td>
|
|
64
|
+
<td class="num">{{rupiah $l.rate}}{{with $unit}}<span class="muted">/{{.}}</span>{{end}}</td>
|
|
65
|
+
<td class="num">{{rupiah $l.amount}}</td>
|
|
66
|
+
<td class="sign"></td>
|
|
67
|
+
</tr>
|
|
68
|
+
{{end}}
|
|
69
|
+
</tbody>
|
|
70
|
+
<tfoot><tr><td colspan="4">Total upah</td><td class="num">{{rupiah .Doc.total}}</td><td></td></tr></tfoot>
|
|
71
|
+
</table>
|
|
72
|
+
<p class="note muted">Upah dihitung dari hasil kerja di batch ini. Kalau ada yang salah, betulkan di batch produksinya, bukan di lembar ini.</p>
|
|
73
|
+
<div class="signoff">
|
|
74
|
+
<div><div>Dibayar oleh</div><div class="space"></div><div class="muted">Nama dan tanggal</div></div>
|
|
75
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
# Lembar upah borongan of one batch: who did which stage, how much, the wage, and a column to sign on receipt
|
|
3
|
+
# when the wage is paid in cash. Names come from the line (worker_name, stage_name, unit).
|
|
4
|
+
name: wage_sheet
|
|
5
|
+
model: wage_sheet
|
|
6
|
+
label: {id: Lembar upah, en: Wage sheet}
|
|
7
|
+
paper: A4
|
|
8
|
+
template: wage_sheet.html
|
|
9
|
+
default: true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
name: attendance_close_cancel_guard
|
|
3
|
+
label: {id: Rekap absen yang sudah jadi timesheet tidak bisa dibatalkan}
|
|
4
|
+
# Its recap timesheets carry the days into payroll: delete the drafts or cancel the submitted ones first (a recap used by
|
|
5
|
+
# a submitted payslip cannot be cancelled either, recap_cancel_guard), then cancel the close.
|
|
6
|
+
on: attendance_close.cancelled
|
|
7
|
+
steps:
|
|
8
|
+
- find: timesheet
|
|
9
|
+
where: attendance_close == event.name && docstatus != 2
|
|
10
|
+
as: ts
|
|
11
|
+
- if: ts != null
|
|
12
|
+
create: attendance_guard
|
|
13
|
+
set:
|
|
14
|
+
reason: "'close_has_recap'"
|
|
15
|
+
document: ts.name
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
name: attendance_close_on_submit
|
|
3
|
+
label: {id: Rekap absen lapangan jadi timesheet bulanan}
|
|
4
|
+
# For each assignment of the project during the period: the submitted daily logs of that assignment in the period become
|
|
5
|
+
# one draft monthly recap timesheet (days present, overtime hours, per day) with the assignment's rates. Only submitted
|
|
6
|
+
# logs count: drafts, logs waiting for the supervisor and rejected ones do not.
|
|
7
|
+
# Refused (the whole close rolls back), so a day is never paid or booked twice and never at the wrong rate:
|
|
8
|
+
# - another submitted close of the project overlaps the period;
|
|
9
|
+
# - a worker has logs on two assignments of the project in the period (payroll pays one slip per worker per month at one
|
|
10
|
+
# rate): close the period at the end of the first assignment instead;
|
|
11
|
+
# - a worker with logs already has a live timesheet of the project inside the period (a daily timesheet, an imported
|
|
12
|
+
# recap or a recap of another close).
|
|
13
|
+
# Reads in the order attendance_close, assignment, attendance_log, timesheet (contract 0025 locks), like the log guards.
|
|
14
|
+
on: attendance_close.submitted
|
|
15
|
+
steps:
|
|
16
|
+
- find: attendance_close
|
|
17
|
+
where: project == event.project && name != event.name && docstatus == 1 && period_from <= event.period_to && period_to >= event.period_from
|
|
18
|
+
as: other
|
|
19
|
+
- if: other != null
|
|
20
|
+
create: attendance_guard
|
|
21
|
+
set:
|
|
22
|
+
reason: "'close_overlap'"
|
|
23
|
+
document: other.name
|
|
24
|
+
- find_all: assignment
|
|
25
|
+
where: project == event.project && start_date <= event.period_to && end_date >= event.period_from
|
|
26
|
+
sort: start_date
|
|
27
|
+
as: asgs
|
|
28
|
+
- find_all: attendance_log
|
|
29
|
+
where: project == event.project && docstatus == 1 && work_date >= event.period_from && work_date <= event.period_to
|
|
30
|
+
as: logs
|
|
31
|
+
- for_each: asgs
|
|
32
|
+
as: a
|
|
33
|
+
do:
|
|
34
|
+
- if: "logs.map(l, l.assignment == a.name ? 1 : 0).sum() > 0 && logs.map(l, l.worker == a.worker && l.assignment != a.name ? 1 : 0).sum() > 0"
|
|
35
|
+
create: attendance_guard
|
|
36
|
+
set:
|
|
37
|
+
reason: "'two_assignments'"
|
|
38
|
+
document: a.name
|
|
39
|
+
- if: "logs.map(l, l.assignment == a.name ? 1 : 0).sum() > 0"
|
|
40
|
+
find: timesheet
|
|
41
|
+
where: >-
|
|
42
|
+
project == event.project && worker == a.worker && docstatus != 2 && work_date <= event.period_to
|
|
43
|
+
&& (period_to == '' ? work_date >= event.period_from : period_to >= event.period_from)
|
|
44
|
+
as: ts
|
|
45
|
+
- if: "logs.map(l, l.assignment == a.name ? 1 : 0).sum() > 0 && ts != null"
|
|
46
|
+
create: attendance_guard
|
|
47
|
+
set:
|
|
48
|
+
reason: "'recap_overlap'"
|
|
49
|
+
document: ts.name
|
|
50
|
+
- if: "logs.map(l, l.assignment == a.name ? 1 : 0).sum() > 0"
|
|
51
|
+
create: timesheet
|
|
52
|
+
set:
|
|
53
|
+
project: event.project
|
|
54
|
+
worker: a.worker
|
|
55
|
+
# An hourly assignment's cost rate is per hour: its per-day recap keeps the worker's day pay (no assignment,
|
|
56
|
+
# audit r2 R2-1) and takes the assignment's day and overtime rates, as an imported recap does (audit r3 R3-1).
|
|
57
|
+
assignment: "a.rate_basis == 'hour' ? '' : a.name"
|
|
58
|
+
day_rate: a.day_rate
|
|
59
|
+
hour_rate: a.hour_rate
|
|
60
|
+
overtime_rate: a.overtime_rate
|
|
61
|
+
overtime_cost_rate: a.overtime_cost_rate
|
|
62
|
+
work_date: event.period_from
|
|
63
|
+
period_to: event.period_to
|
|
64
|
+
rate_basis: "'day'"
|
|
65
|
+
days: "logs.map(l, l.assignment == a.name ? 1 : 0).sum()"
|
|
66
|
+
overtime_hours: "logs.map(l, l.assignment == a.name ? l.overtime_hours : 0.0).sum()"
|
|
67
|
+
description: "'Rekap absen lapangan ' + event.name"
|
|
68
|
+
attendance_close: event.name
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
name: attendance_log_cancel_guard
|
|
3
|
+
label: {id: Absen di periode yang sudah direkap tidak bisa dibatalkan}
|
|
4
|
+
# The day is already in a recap timesheet (and maybe a payslip): cancel the close first.
|
|
5
|
+
on: attendance_log.cancelled
|
|
6
|
+
steps:
|
|
7
|
+
- find: attendance_close
|
|
8
|
+
where: project == event.project && docstatus == 1 && period_from <= event.work_date && period_to >= event.work_date
|
|
9
|
+
as: closed
|
|
10
|
+
- if: closed != null
|
|
11
|
+
create: attendance_guard
|
|
12
|
+
set:
|
|
13
|
+
reason: "'period_closed'"
|
|
14
|
+
document: closed.name
|