@rangka-os/create 0.0.0-stage → 0.5.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +137 -0
- package/package.json +29 -4
- package/template/base/README.md +32 -0
- package/template/base/_gitignore +3 -0
- package/template/base/_vscode/settings.json +4 -0
- package/template/base/apps/crm/app.rk +44 -0
- package/template/base/apps/crm/dashboards/crm_overview.rk +88 -0
- package/template/base/apps/crm/dashboards/sales_overview.rk +66 -0
- package/template/base/apps/crm/processes/lead_to_cash.rk +8 -0
- package/template/base/apps/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 +46 -0
- package/template/base/apps/fnb_cabang/dashboards/fnb_overview.rk +104 -0
- package/template/base/apps/fnb_cabang/dashboards/outlet_harian.rk +36 -0
- package/template/base/apps/fnb_cabang/dashboards/stock_recap.rk +132 -0
- package/template/base/apps/grosir_distribusi/app.rk +56 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_ar.rk +62 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +87 -0
- package/template/base/apps/jasa_proyek/app.rk +64 -0
- package/template/base/apps/jasa_proyek/dashboards/absen_saya.rk +15 -0
- package/template/base/apps/jasa_proyek/dashboards/ar_aging.rk +88 -0
- package/template/base/apps/jasa_proyek/dashboards/jasa_overview.rk +148 -0
- package/template/base/apps/jasa_proyek/dashboards/project_margin.rk +94 -0
- package/template/base/apps/jasa_proyek/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 +64 -0
- package/template/base/apps/kelas_kursus/app.rk +29 -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 +32 -0
- package/template/base/apps/langganan_jasa/dashboards/langganan_ringkas.rk +167 -0
- package/template/base/apps/langganan_jasa/dashboards/penagihan_saya.rk +54 -0
- package/template/base/apps/mutasi_bank/app.rk +22 -0
- package/template/base/apps/pajak/app.rk +25 -0
- package/template/base/apps/pembelian_pemasok/app.rk +23 -0
- package/template/base/apps/pembukuan/app.rk +19 -0
- package/template/base/apps/penjualan_harian/app.rk +34 -0
- package/template/base/apps/penjualan_harian/dashboards/penjualan_ringkas.rk +87 -0
- package/template/base/apps/produksi_pabrik/app.rk +54 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +101 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_upah.rk +39 -0
- package/template/base/apps/ritel_cabang/app.rk +58 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_overview.rk +137 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_stock.rk +147 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_tax.rk +76 -0
- package/template/base/apps/sewa_alat/app.rk +31 -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 +206 -0
- package/template/base/connectors/loyverse/connector.rk +98 -0
- package/template/base/connectors/moka/connector.rk +120 -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/whatsapp_business/connector.rk +89 -0
- package/template/base/connectors/whatsapp_business/templates.md +32 -0
- package/template/base/connectors/xendit/connector.rk +184 -0
- package/template/base/docker-compose.yml +16 -0
- package/template/base/env.example +12 -0
- package/template/base/modules/accounting/flows/financial_report_compute.rk +47 -0
- package/template/base/modules/accounting/flows/financial_report_recompute.rk +47 -0
- package/template/base/modules/accounting/flows/gl_delivery_note_post.rk +37 -0
- package/template/base/modules/accounting/flows/gl_delivery_note_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_goods_receipt_post.rk +41 -0
- package/template/base/modules/accounting/flows/gl_goods_receipt_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_opening_balance_post.rk +132 -0
- package/template/base/modules/accounting/flows/gl_opening_balance_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_return_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_outlet_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_sales_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_outlet_sales_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_takings_post.rk +71 -0
- package/template/base/modules/accounting/flows/gl_outlet_takings_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_payment_post.rk +63 -0
- package/template/base/modules/accounting/flows/gl_payment_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_payroll_close_post.rk +89 -0
- package/template/base/modules/accounting/flows/gl_payroll_close_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_pos_sale_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_pos_sale_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_pos_shift_close_post.rk +59 -0
- package/template/base/modules/accounting/flows/gl_pos_shift_close_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_production_batch_post.rk +62 -0
- package/template/base/modules/accounting/flows/gl_production_batch_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_project_expense_post.rk +64 -0
- package/template/base/modules/accounting/flows/gl_project_expense_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_rental_booking_post.rk +35 -0
- package/template/base/modules/accounting/flows/gl_rental_booking_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_rental_return_post.rk +47 -0
- package/template/base/modules/accounting/flows/gl_rental_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_sales_invoice_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_sales_invoice_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_sales_return_post.rk +40 -0
- package/template/base/modules/accounting/flows/gl_sales_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_adjustment_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_adjustment_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_count_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_count_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_timesheet_post.rk +35 -0
- package/template/base/modules/accounting/flows/gl_timesheet_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +63 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_reverse.rk +194 -0
- package/template/base/modules/accounting/imports/opening_balance_sheet.rk +22 -0
- package/template/base/modules/accounting/models/financial_report.rk +85 -0
- package/template/base/modules/accounting/models/gl_entry.rk +161 -0
- package/template/base/modules/accounting/models/opening_balance.rk +48 -0
- package/template/base/modules/accounting/models/period_close.rk +33 -0
- package/template/base/modules/accounting/module.rk +16 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +19 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +43 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_link_locked.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_matched.rk +13 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_release.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +31 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_unmatched.rk +11 -0
- package/template/base/modules/bank_statement/imports/bank_statement_csv.rk +25 -0
- package/template/base/modules/bank_statement/models/bank_transaction.rk +124 -0
- package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +49 -0
- package/template/base/modules/bank_statement/module.rk +12 -0
- package/template/base/modules/catalogue/imports/item_list.rk +20 -0
- package/template/base/modules/catalogue/imports/item_master.rk +25 -0
- package/template/base/modules/catalogue/models/item.rk +129 -0
- package/template/base/modules/catalogue/models/item_category.rk +27 -0
- package/template/base/modules/catalogue/models/price_list.rk +34 -0
- package/template/base/modules/catalogue/models/price_list_item.rk +21 -0
- package/template/base/modules/catalogue/models/uom.rk +34 -0
- package/template/base/modules/catalogue/models/uom_conversion.rk +44 -0
- package/template/base/modules/catalogue/module.rk +11 -0
- package/template/base/modules/consignment/flows/consignment_bill.rk +39 -0
- package/template/base/modules/consignment/flows/consignment_bill_cancelled.rk +14 -0
- package/template/base/modules/consignment/models/consignment_settlement.rk +111 -0
- package/template/base/modules/consignment/models/consignment_settlement_item.rk +37 -0
- package/template/base/modules/consignment/module.rk +15 -0
- package/template/base/modules/contacts/imports/customer_list.rk +17 -0
- package/template/base/modules/contacts/imports/vendor_list.rk +16 -0
- package/template/base/modules/contacts/models/contact_person.rk +21 -0
- package/template/base/modules/contacts/models/credit_guard.rk +40 -0
- package/template/base/modules/contacts/models/customer.rk +180 -0
- package/template/base/modules/contacts/models/vendor.rk +104 -0
- package/template/base/modules/contacts/module.rk +10 -0
- package/template/base/modules/coretax/models/tax_period.rk +89 -0
- package/template/base/modules/coretax/module.rk +13 -0
- package/template/base/modules/coretax/print/coretax_bupot.rk +26 -0
- package/template/base/modules/coretax/print/coretax_bupot.xml +28 -0
- package/template/base/modules/coretax/print/coretax_faktur.rk +34 -0
- package/template/base/modules/coretax/print/coretax_faktur.xml +58 -0
- package/template/base/modules/courses/flows/charge_cancel_guard.rk +23 -0
- package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +56 -0
- package/template/base/modules/courses/flows/enrollment_seats_on_create.rk +15 -0
- package/template/base/modules/courses/flows/enrollment_seats_on_update.rk +35 -0
- package/template/base/modules/courses/flows/invoice_course_once.rk +22 -0
- package/template/base/modules/courses/flows/invoice_course_tag_lock.rk +16 -0
- package/template/base/modules/courses/flows/session_fill_attendance.rk +16 -0
- package/template/base/modules/courses/flows/student_billing_on_create.rk +25 -0
- package/template/base/modules/courses/models/course_attendance.rk +22 -0
- package/template/base/modules/courses/models/course_batch.rk +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 +93 -0
- package/template/base/modules/courses/models/enrollment.rk +136 -0
- package/template/base/modules/courses/models/student.rk +68 -0
- package/template/base/modules/courses/module.rk +14 -0
- package/template/base/modules/courses/roles/instructor.rk +7 -0
- package/template/base/modules/currency/models/currency.rk +34 -0
- package/template/base/modules/currency/models/exchange_rate.rk +39 -0
- package/template/base/modules/currency/module.rk +10 -0
- package/template/base/modules/delivery/flows/delivery_cancel_guard.rk +18 -0
- package/template/base/modules/delivery/flows/fulfilment_on_delivery_cancelled.rk +21 -0
- package/template/base/modules/delivery/flows/fulfilment_on_delivery_submitted.rk +28 -0
- package/template/base/modules/delivery/flows/fulfilment_on_invoice_cancelled.rk +22 -0
- package/template/base/modules/delivery/flows/fulfilment_on_invoice_submitted.rk +22 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_created.rk +18 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_submitted.rk +16 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_updated.rk +19 -0
- package/template/base/modules/delivery/flows/fulfilment_on_return_cancelled.rk +16 -0
- package/template/base/modules/delivery/flows/fulfilment_on_return_submitted.rk +16 -0
- package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +20 -0
- package/template/base/modules/delivery/flows/order_cancel_guard.rk +10 -0
- package/template/base/modules/delivery/flows/return_cancel_guard.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_payment_cancelled.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_payment_submitted.rk +21 -0
- package/template/base/modules/delivery/flows/return_credit_on_return_cancelled.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_return_submitted.rk +10 -0
- package/template/base/modules/delivery/models/delivery_guard.rk +48 -0
- package/template/base/modules/delivery/models/delivery_note.rk +101 -0
- package/template/base/modules/delivery/models/delivery_note_item.rk +11 -0
- package/template/base/modules/delivery/models/order_fulfilment.rk +27 -0
- package/template/base/modules/delivery/models/order_fulfilment_item.rk +10 -0
- package/template/base/modules/delivery/models/return_credit.rk +23 -0
- package/template/base/modules/delivery/models/sales_return.rk +87 -0
- package/template/base/modules/delivery/models/sales_return_item.rk +16 -0
- package/template/base/modules/delivery/module.rk +16 -0
- package/template/base/modules/delivery/print/delivery_note.html +96 -0
- package/template/base/modules/delivery/print/delivery_note.rk +9 -0
- package/template/base/modules/distribution/flows/credit_on_invoice_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_invoice_submitted.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_order_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_order_submitted.rk +25 -0
- package/template/base/modules/distribution/flows/credit_on_payment_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_payment_submitted.rk +17 -0
- package/template/base/modules/distribution/flows/giro_bounced.rk +20 -0
- package/template/base/modules/distribution/flows/giro_from_payment.rk +21 -0
- package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +17 -0
- package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +17 -0
- package/template/base/modules/distribution/models/giro.rk +79 -0
- package/template/base/modules/distribution/module.rk +14 -0
- package/template/base/modules/invoicing/flows/invoice_due_digest.rk +12 -0
- package/template/base/modules/invoicing/flows/milestone_invoiced.rk +23 -0
- package/template/base/modules/invoicing/flows/milestone_reopened.rk +19 -0
- package/template/base/modules/invoicing/flows/payment_instruction_on_submit.rk +25 -0
- package/template/base/modules/invoicing/flows/project_billed_on_cancel.rk +16 -0
- package/template/base/modules/invoicing/flows/project_billed_on_submit.rk +16 -0
- package/template/base/modules/invoicing/flows/project_revenue_on_cancel.rk +22 -0
- package/template/base/modules/invoicing/flows/project_revenue_on_submit.rk +17 -0
- package/template/base/modules/invoicing/flows/sales_invoice_credit_recheck.rk +18 -0
- package/template/base/modules/invoicing/models/bank_account.rk +134 -0
- package/template/base/modules/invoicing/models/invoice_reminder.rk +83 -0
- package/template/base/modules/invoicing/models/payment_instruction.rk +72 -0
- package/template/base/modules/invoicing/models/sales_invoice.rk +480 -0
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +53 -0
- package/template/base/modules/invoicing/module.rk +14 -0
- package/template/base/modules/invoicing/print/sales_invoice.html +163 -0
- package/template/base/modules/invoicing/print/sales_invoice.rk +14 -0
- package/template/base/modules/invoicing/print/sales_invoice_nota.html +71 -0
- package/template/base/modules/invoicing/print/sales_invoice_nota.rk +13 -0
- package/template/base/modules/invoicing/print/sales_invoice_whatsapp.html +45 -0
- package/template/base/modules/invoicing/print/sales_invoice_whatsapp.rk +15 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_sale.rk +29 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_update.rk +26 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_void.rk +15 -0
- package/template/base/modules/kitchen/models/kitchen_guard.rk +35 -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 +78 -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 +186 -0
- package/template/base/modules/orders/models/customer_order_item.rk +49 -0
- package/template/base/modules/orders/module.rk +14 -0
- package/template/base/modules/outlet_sales/flows/moka_daily_sales.rk +57 -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 +14 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_staged.rk +90 -0
- package/template/base/modules/outlet_sales/flows/refund_on_return_cancelled.rk +15 -0
- package/template/base/modules/outlet_sales/flows/refund_on_return_submitted.rk +26 -0
- package/template/base/modules/outlet_sales/flows/refund_on_sales_submitted.rk +14 -0
- package/template/base/modules/outlet_sales/flows/sales_cancel_guard.rk +14 -0
- package/template/base/modules/outlet_sales/imports/daily_form.rk +22 -0
- package/template/base/modules/outlet_sales/imports/loyverse_receipts.rk +28 -0
- package/template/base/modules/outlet_sales/imports/moka_item_details.rk +34 -0
- package/template/base/modules/outlet_sales/imports/pos_sales_file.rk +28 -0
- package/template/base/modules/outlet_sales/imports/takings_file.rk +23 -0
- package/template/base/modules/outlet_sales/models/moka_sale_line.rk +53 -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 +176 -0
- package/template/base/modules/outlet_sales/models/outlet_sales_guard.rk +35 -0
- package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +40 -0
- package/template/base/modules/outlet_sales/models/outlet_takings.rk +85 -0
- package/template/base/modules/outlet_sales/models/outlet_takings_line.rk +37 -0
- package/template/base/modules/outlet_sales/models/pos_refund.rk +33 -0
- package/template/base/modules/outlet_sales/models/pos_refund_item.rk +9 -0
- package/template/base/modules/outlet_sales/module.rk +12 -0
- package/template/base/modules/outlets/models/outlet.rk +84 -0
- package/template/base/modules/outlets/module.rk +10 -0
- 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/models/gateway_ref_claim.rk +42 -0
- package/template/base/modules/payments/models/payment.rk +215 -0
- package/template/base/modules/payments/models/payment_allocation.rk +35 -0
- package/template/base/modules/payments/models/withholding.rk +76 -0
- package/template/base/modules/payments/module.rk +13 -0
- package/template/base/modules/payments/print/statement.html +55 -0
- package/template/base/modules/payments/print/statement.rk +13 -0
- package/template/base/modules/payroll/flows/invoice_payroll_once.rk +20 -0
- package/template/base/modules/payroll/flows/invoice_payroll_tag_lock.rk +13 -0
- package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +35 -0
- package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +66 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_totals_on_payslip_cancel.rk +29 -0
- package/template/base/modules/payroll/flows/payroll_totals_on_payslip_submit.rk +29 -0
- package/template/base/modules/payroll/flows/payslip_cancel_guard.rk +14 -0
- package/template/base/modules/payroll/flows/payslip_from_recap.rk +47 -0
- package/template/base/modules/payroll/flows/payslip_month_guard_created.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_month_guard_submitted.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_order_guard_cancelled.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_order_guard_submitted.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_pay_overlap_guard.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_ytd_guard.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +20 -0
- package/template/base/modules/payroll/flows/recap_cancel_guard.rk +15 -0
- package/template/base/modules/payroll/models/payroll_close.rk +80 -0
- package/template/base/modules/payroll/models/payroll_guard.rk +74 -0
- package/template/base/modules/payroll/models/payroll_profile.rk +136 -0
- package/template/base/modules/payroll/models/payroll_run.rk +220 -0
- package/template/base/modules/payroll/models/payslip.rk +293 -0
- package/template/base/modules/payroll/module.rk +13 -0
- package/template/base/modules/payroll/print/payslip.html +53 -0
- package/template/base/modules/payroll/print/payslip.rk +7 -0
- package/template/base/modules/pipeline/flows/morning_follow_up.rk +10 -0
- package/template/base/modules/pipeline/flows/whatsapp_to_lead.rk +24 -0
- package/template/base/modules/pipeline/models/activity.rk +83 -0
- package/template/base/modules/pipeline/models/deal.rk +139 -0
- package/template/base/modules/pipeline/models/lead.rk +119 -0
- package/template/base/modules/pipeline/module.rk +12 -0
- package/template/base/modules/pos/flows/pos_daily_form_guard.rk +18 -0
- package/template/base/modules/pos/flows/pos_sale_on_cancel.rk +33 -0
- package/template/base/modules/pos/flows/pos_sale_on_submit.rk +46 -0
- package/template/base/modules/pos/flows/pos_shift_close_on_cancel.rk +26 -0
- package/template/base/modules/pos/flows/pos_shift_close_on_submit.rk +23 -0
- package/template/base/modules/pos/flows/pos_shift_on_create.rk +21 -0
- package/template/base/modules/pos/flows/pos_shift_on_update.rk +10 -0
- package/template/base/modules/pos/flows/pos_takings_guard.rk +28 -0
- package/template/base/modules/pos/models/pos_guard.rk +76 -0
- package/template/base/modules/pos/models/pos_payment.rk +17 -0
- package/template/base/modules/pos/models/pos_sale.rk +222 -0
- package/template/base/modules/pos/models/pos_sale_item.rk +43 -0
- package/template/base/modules/pos/models/pos_shift.rk +92 -0
- package/template/base/modules/pos/models/pos_shift_close.rk +77 -0
- package/template/base/modules/pos/module.rk +22 -0
- package/template/base/modules/pos/print/pos_receipt.html +50 -0
- package/template/base/modules/pos/print/pos_receipt.rk +9 -0
- package/template/base/modules/pos/screens/kasir.rk +41 -0
- package/template/base/modules/procurement/flows/project_vendor_cost_on_cancel.rk +22 -0
- package/template/base/modules/procurement/flows/project_vendor_cost_on_submit.rk +17 -0
- package/template/base/modules/procurement/imports/opening_stock.rk +25 -0
- package/template/base/modules/procurement/models/goods_receipt.rk +85 -0
- package/template/base/modules/procurement/models/goods_receipt_item.rk +42 -0
- package/template/base/modules/procurement/models/purchase_order.rk +156 -0
- package/template/base/modules/procurement/models/purchase_order_item.rk +46 -0
- package/template/base/modules/procurement/models/purchase_request.rk +91 -0
- package/template/base/modules/procurement/models/purchase_request_item.rk +35 -0
- package/template/base/modules/procurement/models/vendor_bill.rk +272 -0
- package/template/base/modules/procurement/models/vendor_bill_item.rk +33 -0
- package/template/base/modules/procurement/module.rk +14 -0
- package/template/base/modules/procurement/print/purchase_order.html +120 -0
- package/template/base/modules/procurement/print/purchase_order.rk +7 -0
- package/template/base/modules/production/flows/batch_cancel_guard.rk +12 -0
- package/template/base/modules/production/flows/batch_from_bom.rk +19 -0
- package/template/base/modules/production/flows/wage_sheet_on_batch_cancelled.rk +14 -0
- package/template/base/modules/production/flows/wage_sheet_on_batch_submitted.rk +12 -0
- package/template/base/modules/production/flows/work_order_materials_created.rk +20 -0
- package/template/base/modules/production/flows/work_order_materials_updated.rk +20 -0
- package/template/base/modules/production/models/bom.rk +67 -0
- package/template/base/modules/production/models/bom_byproduct.rk +7 -0
- package/template/base/modules/production/models/bom_line.rk +11 -0
- package/template/base/modules/production/models/production_batch.rk +149 -0
- package/template/base/modules/production/models/production_guard.rk +23 -0
- package/template/base/modules/production/models/production_labour.rk +10 -0
- package/template/base/modules/production/models/production_material.rk +8 -0
- package/template/base/modules/production/models/production_output.rk +8 -0
- package/template/base/modules/production/models/production_stage.rk +19 -0
- package/template/base/modules/production/models/wage_line.rk +15 -0
- package/template/base/modules/production/models/wage_sheet.rk +28 -0
- package/template/base/modules/production/models/work_order.rk +63 -0
- package/template/base/modules/production/models/work_order_material.rk +8 -0
- package/template/base/modules/production/module.rk +17 -0
- package/template/base/modules/production/print/wage_sheet.html +75 -0
- package/template/base/modules/production/print/wage_sheet.rk +9 -0
- package/template/base/modules/projects/flows/attendance_close_cancel_guard.rk +15 -0
- package/template/base/modules/projects/flows/attendance_close_on_submit.rk +64 -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 +15 -0
- package/template/base/modules/projects/flows/attendance_log_guard_submitted.rk +34 -0
- package/template/base/modules/projects/flows/attendance_log_guard_updated.rk +14 -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/acceptance.rk +68 -0
- package/template/base/modules/projects/models/assignment.rk +116 -0
- package/template/base/modules/projects/models/attendance_close.rk +63 -0
- package/template/base/modules/projects/models/attendance_guard.rk +57 -0
- package/template/base/modules/projects/models/attendance_log.rk +266 -0
- package/template/base/modules/projects/models/billing_milestone.rk +217 -0
- package/template/base/modules/projects/models/project.rk +155 -0
- package/template/base/modules/projects/models/project_expense.rk +121 -0
- package/template/base/modules/projects/models/project_guard.rk +27 -0
- package/template/base/modules/projects/models/project_ledger.rk +146 -0
- package/template/base/modules/projects/models/timesheet.rk +167 -0
- package/template/base/modules/projects/models/work_site.rk +73 -0
- package/template/base/modules/projects/module.rk +11 -0
- package/template/base/modules/projects/roles/field_worker.rk +7 -0
- package/template/base/modules/projects/roles/site_supervisor.rk +7 -0
- package/template/base/modules/quotation/models/quotation.rk +201 -0
- package/template/base/modules/quotation/models/quotation_item.rk +37 -0
- package/template/base/modules/quotation/module.rk +14 -0
- package/template/base/modules/quotation/print/quotation.html +65 -0
- package/template/base/modules/quotation/print/quotation.rk +7 -0
- package/template/base/modules/rental/flows/rental_booking_on_cancel.rk +19 -0
- package/template/base/modules/rental/flows/rental_booking_on_submit.rk +45 -0
- package/template/base/modules/rental/flows/rental_checkout_on_cancel.rk +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 +26 -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 +96 -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 +142 -0
- package/template/base/modules/rental/models/rental_return_unit.rk +29 -0
- package/template/base/modules/rental/models/rental_schedule.rk +51 -0
- package/template/base/modules/rental/models/rental_unit.rk +73 -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/stock/flows/adjustment_value_backfill.rk +95 -0
- package/template/base/modules/stock/flows/adjustment_value_on_cancel.rk +19 -0
- package/template/base/modules/stock/flows/adjustment_value_on_submit.rk +17 -0
- package/template/base/modules/stock/flows/stock_negative_alert.rk +15 -0
- package/template/base/modules/stock/models/recipe.rk +68 -0
- package/template/base/modules/stock/models/recipe_line.rk +24 -0
- package/template/base/modules/stock/models/stock_adjustment.rk +62 -0
- package/template/base/modules/stock/models/stock_adjustment_item.rk +32 -0
- package/template/base/modules/stock/models/stock_adjustment_value.rk +79 -0
- package/template/base/modules/stock/models/stock_balance.rk +27 -0
- package/template/base/modules/stock/models/stock_count.rk +54 -0
- package/template/base/modules/stock/models/stock_count_item.rk +33 -0
- package/template/base/modules/stock/models/stock_move.rk +53 -0
- package/template/base/modules/stock/models/stock_transfer.rk +70 -0
- package/template/base/modules/stock/models/stock_transfer_item.rk +34 -0
- package/template/base/modules/stock/models/stock_transfer_receipt.rk +57 -0
- package/template/base/modules/stock/models/stock_transfer_receipt_item.rk +18 -0
- package/template/base/modules/stock/module.rk +13 -0
- package/template/base/modules/subscriptions/flows/collector_deposit_on_submit.rk +57 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_kept.rk +17 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_not_cancelled.rk +14 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_not_deleted.rk +14 -0
- package/template/base/modules/subscriptions/flows/field_collection_cap_created.rk +24 -0
- package/template/base/modules/subscriptions/flows/field_collection_cap_updated.rk +24 -0
- package/template/base/modules/subscriptions/flows/field_collection_locked.rk +12 -0
- package/template/base/modules/subscriptions/flows/field_collection_not_deleted.rk +10 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_kept.rk +19 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_once.rk +34 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_tag_lock.rk +13 -0
- package/template/base/modules/subscriptions/flows/service_area_collector.rk +14 -0
- package/template/base/modules/subscriptions/flows/subscription_billing.rk +79 -0
- package/template/base/modules/subscriptions/flows/subscription_dunning.rk +81 -0
- package/template/base/modules/subscriptions/flows/subscription_extra_locked.rk +14 -0
- package/template/base/modules/subscriptions/flows/subscription_status_on_payment.rk +48 -0
- package/template/base/modules/subscriptions/models/collector_deposit.rk +36 -0
- package/template/base/modules/subscriptions/models/field_collection.rk +42 -0
- package/template/base/modules/subscriptions/models/service_area.rk +19 -0
- package/template/base/modules/subscriptions/models/subscription.rk +233 -0
- package/template/base/modules/subscriptions/models/subscription_bill.rk +48 -0
- package/template/base/modules/subscriptions/models/subscription_extra.rk +50 -0
- package/template/base/modules/subscriptions/models/subscription_guard.rk +65 -0
- package/template/base/modules/subscriptions/models/subscription_month.rk +29 -0
- package/template/base/modules/subscriptions/models/subscription_plan.rk +75 -0
- package/template/base/modules/subscriptions/models/subscription_status_log.rk +27 -0
- package/template/base/modules/subscriptions/module.rk +18 -0
- package/template/base/modules/subscriptions/roles/collector.rk +7 -0
- package/template/base/modules/tax_id/models/tax_code.rk +49 -0
- package/template/base/modules/tax_id/module.rk +10 -0
- package/template/base/modules/users/models/user.rk +29 -0
- package/template/base/modules/users/module.rk +10 -0
- package/template/base/modules/users/roles/cashier.rk +8 -0
- package/template/base/modules/users/roles/course_admin.rk +4 -0
- package/template/base/modules/users/roles/field_sales.rk +7 -0
- package/template/base/modules/users/roles/finance_manager.rk +4 -0
- package/template/base/modules/users/roles/head_office.rk +4 -0
- package/template/base/modules/users/roles/outlet_staff.rk +6 -0
- package/template/base/modules/users/roles/project_admin.rk +4 -0
- package/template/base/modules/users/roles/purchasing_manager.rk +4 -0
- package/template/base/modules/users/roles/sales_manager.rk +4 -0
- package/template/base/modules/users/roles/sales_rep.rk +4 -0
- package/template/base/modules/workforce/imports/worker_list.rk +21 -0
- package/template/base/modules/workforce/models/certification.rk +25 -0
- package/template/base/modules/workforce/models/worker.rk +94 -0
- package/template/base/modules/workforce/module.rk +10 -0
- package/template/base/package.json +17 -0
- package/template/blank/fixtures/start.rk +5 -0
- package/template/blank/site/config.rk +13 -0
- package/template/blank/site/custom/README.md +2 -0
- package/template/blank/site/features.rk +13 -0
- package/template/blank/site/layouts/main.rk +14 -0
- package/template/blank/site/system.rk +20 -0
- package/template/blank/site/themes/main.rk +8 -0
- package/template/demo/fixtures/crm_demo.rk +168 -0
- package/template/demo/fixtures/demo.rk +417 -0
- package/template/demo/site/config.rk +13 -0
- package/template/demo/site/features.rk +13 -0
- package/template/demo/site/layouts/crm_first.rk +23 -0
- package/template/demo/site/system.rk +26 -0
- package/template/demo/site/themes/kopi_senja.rk +10 -0
- package/README.md +0 -3
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_booking
|
|
3
|
+
label: {id: Pesanan sewa, en: Rental booking}
|
|
4
|
+
icon: calendar
|
|
5
|
+
is_submittable: true
|
|
6
|
+
naming: SWA-{YYYY}-{#####}
|
|
7
|
+
title_field: customer
|
|
8
|
+
# One rental item, a number of units and a range of dates [start_date, end_date): the end date is the planned return
|
|
9
|
+
# day, free for the next booking. Submitting it books the units (flow rental_booking_on_submit refuses a booking that
|
|
10
|
+
# needs more units than the item has on its busiest day, under the read lock of contract 0025, so two bookings sent at
|
|
11
|
+
# the same moment never both pass), records the deposit received and drafts the rent invoice. Cancelling is allowed
|
|
12
|
+
# only while the equipment has not gone out (rental_booking_on_cancel); the deposit journal is reversed (paid back).
|
|
13
|
+
# The person types the number of days; the return date is computed (the rule language has no date difference).
|
|
14
|
+
permissions:
|
|
15
|
+
- {role: sales_manager, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
16
|
+
- {role: finance_manager, read: true, cancel: true, export: true, print: true}
|
|
17
|
+
- {role: rental_staff, read: true}
|
|
18
|
+
- {role: head_office, read: true, export: true, print: true}
|
|
19
|
+
fields:
|
|
20
|
+
- name: customer
|
|
21
|
+
type: link
|
|
22
|
+
to: customer
|
|
23
|
+
label: {id: Pelanggan}
|
|
24
|
+
required: true
|
|
25
|
+
in_list: true
|
|
26
|
+
- name: rental_item
|
|
27
|
+
type: link
|
|
28
|
+
to: rental_item
|
|
29
|
+
label: {id: Alat}
|
|
30
|
+
required: true
|
|
31
|
+
in_list: true
|
|
32
|
+
- name: qty
|
|
33
|
+
type: int
|
|
34
|
+
label: {id: Jumlah unit}
|
|
35
|
+
required: true
|
|
36
|
+
default: '1'
|
|
37
|
+
in_list: true
|
|
38
|
+
- name: booking_date
|
|
39
|
+
type: date
|
|
40
|
+
label: {id: Tanggal pesan}
|
|
41
|
+
required: true
|
|
42
|
+
default: today()
|
|
43
|
+
- name: start_date
|
|
44
|
+
type: date
|
|
45
|
+
label: {id: Mulai sewa}
|
|
46
|
+
required: true
|
|
47
|
+
in_list: true
|
|
48
|
+
- name: days
|
|
49
|
+
type: int
|
|
50
|
+
label: {id: Lama sewa (hari)}
|
|
51
|
+
required: true
|
|
52
|
+
default: '1'
|
|
53
|
+
in_list: true
|
|
54
|
+
- name: end_date
|
|
55
|
+
type: date
|
|
56
|
+
label: {id: Tanggal kembali}
|
|
57
|
+
help: {id: Mulai sewa ditambah lama sewa. Di hari itu alat sudah bisa disewa orang lain}
|
|
58
|
+
compute: start_date + duration(days)
|
|
59
|
+
in_list: true
|
|
60
|
+
- name: daily_rate
|
|
61
|
+
type: currency
|
|
62
|
+
label: {id: Tarif per unit per hari}
|
|
63
|
+
default: rental_item.daily_rate
|
|
64
|
+
- name: rent_amount
|
|
65
|
+
type: currency
|
|
66
|
+
label: {id: Biaya sewa}
|
|
67
|
+
compute: qty * daily_rate * days
|
|
68
|
+
in_list: true
|
|
69
|
+
- name: deposit
|
|
70
|
+
type: currency
|
|
71
|
+
label: {id: Deposit diterima}
|
|
72
|
+
default: rental_item.deposit_per_unit * qty
|
|
73
|
+
- name: deposit_method
|
|
74
|
+
type: select
|
|
75
|
+
label: {id: Deposit dibayar lewat}
|
|
76
|
+
default: "'cash'"
|
|
77
|
+
options:
|
|
78
|
+
- {value: cash, label: {id: Tunai}}
|
|
79
|
+
- {value: transfer, label: {id: Transfer bank}}
|
|
80
|
+
- name: late_fee_per_day
|
|
81
|
+
type: currency
|
|
82
|
+
label: {id: Denda telat per unit per hari}
|
|
83
|
+
default: rental_item.late_fee_per_day
|
|
84
|
+
- name: notes
|
|
85
|
+
type: text
|
|
86
|
+
label: {id: Catatan}
|
|
87
|
+
rules:
|
|
88
|
+
- name: qty_positive
|
|
89
|
+
on: save
|
|
90
|
+
check: qty > 0
|
|
91
|
+
message: {id: Jumlah unit minimal 1}
|
|
92
|
+
- name: days_range
|
|
93
|
+
on: save
|
|
94
|
+
check: days >= 1 && days <= 366
|
|
95
|
+
message: {id: Lama sewa 1 sampai 366 hari}
|
|
96
|
+
- name: within_units
|
|
97
|
+
on: save
|
|
98
|
+
check: qty <= rental_item.units
|
|
99
|
+
message: {id: Jumlah unit melebihi unit alat yang dimiliki}
|
|
100
|
+
- name: item_active
|
|
101
|
+
on: save
|
|
102
|
+
check: rental_item.active
|
|
103
|
+
message: {id: Alat ini sudah tidak disewakan}
|
|
104
|
+
- name: money_not_negative
|
|
105
|
+
on: save
|
|
106
|
+
check: daily_rate >= 0 && deposit >= 0 && late_fee_per_day >= 0
|
|
107
|
+
message: {id: 'Tarif, deposit, dan denda tidak boleh minus'}
|
|
108
|
+
views:
|
|
109
|
+
list:
|
|
110
|
+
columns: [name, customer, rental_item, qty, start_date, end_date, rent_amount, status]
|
|
111
|
+
filters: [customer, rental_item]
|
|
112
|
+
sort: -start_date
|
|
113
|
+
form:
|
|
114
|
+
layout:
|
|
115
|
+
- section: {id: Pesanan}
|
|
116
|
+
columns:
|
|
117
|
+
- [customer, rental_item, qty]
|
|
118
|
+
- [booking_date, start_date, days, end_date]
|
|
119
|
+
- section: {id: Biaya dan deposit}
|
|
120
|
+
columns:
|
|
121
|
+
- [daily_rate, rent_amount, late_fee_per_day]
|
|
122
|
+
- [deposit, deposit_method]
|
|
123
|
+
- section: {id: Catatan}
|
|
124
|
+
fields: [notes]
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_checkout
|
|
3
|
+
label: {id: Alat keluar, en: Rental checkout}
|
|
4
|
+
icon: truck
|
|
5
|
+
is_submittable: true
|
|
6
|
+
naming: KLR-{YYYY}-{#####}
|
|
7
|
+
title_field: booking
|
|
8
|
+
# The equipment of a booking leaves on its actual date. Submitting it moves the booking's schedule from booked to out
|
|
9
|
+
# (flow rental_checkout_on_submit refuses a booking that is not waiting to go out); cancelling it moves it back.
|
|
10
|
+
# Handover (berita acara serah terima): the checklist lists each unit handed over and its condition; an item with
|
|
11
|
+
# track_units must list exactly the booked number of units, and the customer who receives them signs (signed_by,
|
|
12
|
+
# required on submit). A photo and the drawn signature are attachments of this record (contract 0011); their ids are
|
|
13
|
+
# kept in photo and signature, the image and signature fields of contract 0030 §5 (the camera and signature pad come
|
|
14
|
+
# with kernel WS6). The BAST prints from rental_bast_out. The flow marks each unit out with this booking and refuses
|
|
15
|
+
# a unit that is already out.
|
|
16
|
+
permissions:
|
|
17
|
+
- {role: sales_manager, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
18
|
+
# warehouse staff hand the equipment over (no money moves on a checkout); undoing one is the admin's
|
|
19
|
+
- {role: rental_staff, read: true, create: true, write: true, delete: true, submit: true, export: true, print: true}
|
|
20
|
+
- {role: finance_manager, read: true, export: true, print: true}
|
|
21
|
+
- {role: head_office, read: true, export: true, print: true}
|
|
22
|
+
fields:
|
|
23
|
+
- {name: booking, type: link, to: rental_booking, label: {id: Pesanan sewa}, required: true, in_list: true}
|
|
24
|
+
- {name: customer, type: data, label: {id: Pelanggan}, compute: booking.customer, in_list: true}
|
|
25
|
+
- {name: rental_item, type: data, label: {id: Alat}, compute: booking.rental_item, in_list: true}
|
|
26
|
+
- {name: qty, type: int, label: {id: Jumlah unit}, compute: booking.qty}
|
|
27
|
+
# names for the BAST (prints only resolve top-level links)
|
|
28
|
+
- {name: customer_name, type: data, label: {id: Nama pelanggan}, hidden: true, compute: booking.customer.customer_name}
|
|
29
|
+
- {name: item_title, type: data, label: {id: Nama alat}, hidden: true, compute: booking.rental_item.title}
|
|
30
|
+
- {name: track_units, type: check, label: {id: Serah terima per unit}, compute: booking.rental_item.track_units}
|
|
31
|
+
- {name: out_date, type: date, label: {id: Tanggal keluar}, required: true, default: today(), in_list: true}
|
|
32
|
+
- {name: units, type: table, of: rental_checkout_unit, label: {id: Checklist unit}}
|
|
33
|
+
- {name: notes, type: text, label: {id: 'Catatan (kondisi alat, kelengkapan)'}}
|
|
34
|
+
- {name: signed_by, type: data, label: {id: Diterima oleh (nama penyewa)}, in_list: true}
|
|
35
|
+
- {name: handed_by, type: data, label: {id: Diserahkan oleh (petugas)}}
|
|
36
|
+
- {name: photo, type: image, label: {id: Foto alat saat keluar}, help: {id: 'Id lampiran foto (att_...). Foto lain cukup dilampirkan ke catatan ini'}}
|
|
37
|
+
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: 'Id lampiran gambar tanda tangan (att_...)'}}
|
|
38
|
+
rules:
|
|
39
|
+
- name: booking_submitted
|
|
40
|
+
on: save
|
|
41
|
+
check: booking.docstatus == 1
|
|
42
|
+
message: {id: Pesanan sewa belum diajukan atau sudah batal}
|
|
43
|
+
- name: units_required
|
|
44
|
+
on: save
|
|
45
|
+
check: "!track_units || units.size() > 0"
|
|
46
|
+
message: {id: 'Alat ini diserahkan per unit: isi checklist unit yang keluar'}
|
|
47
|
+
- name: units_match_qty
|
|
48
|
+
on: save
|
|
49
|
+
check: units.size() == 0 || units.size() == qty
|
|
50
|
+
message: {id: Jumlah unit di checklist harus sama dengan jumlah unit pesanan}
|
|
51
|
+
- name: units_of_item
|
|
52
|
+
on: save
|
|
53
|
+
check: "units.map(r, r.unit_item == rental_item ? 0 : 1).sum() == 0"
|
|
54
|
+
message: {id: Ada unit dari alat lain di checklist}
|
|
55
|
+
- name: units_unique
|
|
56
|
+
on: save
|
|
57
|
+
check: "units.map(r, units.map(x, x.unit == r.unit ? 1 : 0).sum()).sum() == units.size()"
|
|
58
|
+
message: {id: Unit yang sama tercatat dua kali di checklist}
|
|
59
|
+
- name: unit_fit
|
|
60
|
+
on: save
|
|
61
|
+
check: "units.map(r, r.condition == 'rusak' || r.condition == 'hilang' ? 1 : 0).sum() == 0"
|
|
62
|
+
message: {id: 'Unit rusak atau hilang tidak bisa disewakan. Ganti dengan unit lain.'}
|
|
63
|
+
- name: signed_by_required
|
|
64
|
+
on: submit
|
|
65
|
+
check: "!track_units || signed_by != ''"
|
|
66
|
+
message: {id: Isi nama penyewa yang menerima alat (tanda tangan berita acara)}
|
|
67
|
+
- name: signature_needs_name
|
|
68
|
+
on: save
|
|
69
|
+
check: signature == '' || signed_by != ''
|
|
70
|
+
message: {id: Tanda tangan perlu nama penyewa yang menandatangani}
|
|
71
|
+
- name: photo_is_attachment
|
|
72
|
+
on: save
|
|
73
|
+
check: "photo == '' || photo.startsWith('att_')"
|
|
74
|
+
message: {id: 'Foto harus berupa lampiran catatan ini (id att_...)'}
|
|
75
|
+
- name: signature_is_attachment
|
|
76
|
+
on: save
|
|
77
|
+
check: "signature == '' || signature.startsWith('att_')"
|
|
78
|
+
message: {id: 'Tanda tangan harus berupa lampiran catatan ini (id att_...)'}
|
|
79
|
+
views:
|
|
80
|
+
list:
|
|
81
|
+
columns: [name, booking, customer, rental_item, out_date, signed_by, status]
|
|
82
|
+
sort: -out_date
|
|
83
|
+
form:
|
|
84
|
+
layout:
|
|
85
|
+
- section: {id: Alat keluar}
|
|
86
|
+
columns:
|
|
87
|
+
- [booking, out_date]
|
|
88
|
+
- [customer, rental_item, qty, track_units]
|
|
89
|
+
- section: {id: Checklist unit}
|
|
90
|
+
fields: [units]
|
|
91
|
+
- section: {id: Serah terima}
|
|
92
|
+
columns:
|
|
93
|
+
- [signed_by, handed_by]
|
|
94
|
+
- [photo, signature]
|
|
95
|
+
- section: {id: Catatan}
|
|
96
|
+
fields: [notes]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# A row of the checkout checklist: one unit handed to the customer and its condition as both sides saw it. A unit
|
|
3
|
+
# that is broken or missing cannot go out (rules of rental_checkout); scratches are noted and go out.
|
|
4
|
+
name: rental_checkout_unit
|
|
5
|
+
is_child: true
|
|
6
|
+
fields:
|
|
7
|
+
- {name: unit, type: link, to: rental_unit, label: {id: Unit}, required: true, peek: [serial_no, condition]}
|
|
8
|
+
- {name: unit_code, type: data, label: {id: Kode unit}, compute: unit.code}
|
|
9
|
+
- {name: serial_no, type: data, label: {id: Nomor seri}, compute: unit.serial_no}
|
|
10
|
+
# the rental item of the unit picked (rule units_of_item: a unit of this checkout's item)
|
|
11
|
+
- {name: unit_item, type: data, label: {id: Alat unit}, hidden: true, compute: unit.rental_item}
|
|
12
|
+
- name: condition
|
|
13
|
+
type: select
|
|
14
|
+
label: {id: Kondisi}
|
|
15
|
+
required: true
|
|
16
|
+
default: "'lengkap'"
|
|
17
|
+
options:
|
|
18
|
+
- {value: lengkap, label: {id: 'Lengkap, baik'}}
|
|
19
|
+
- {value: lecet, label: {id: Lecet}}
|
|
20
|
+
- {value: rusak, label: {id: Rusak}}
|
|
21
|
+
- {value: hilang, label: {id: Hilang}}
|
|
22
|
+
- {name: notes, type: data, label: {id: Catatan}, help: {id: 'Misalnya baterai 2, tas, strap; lecet di sisi kiri'}}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_guard
|
|
3
|
+
label: {id: Penjaga jadwal sewa, en: Rental guard}
|
|
4
|
+
icon: check
|
|
5
|
+
naming: RGD-{######}
|
|
6
|
+
title_field: reason
|
|
7
|
+
# Never stored: a flow of this module creates one when the document it runs in must be refused (the pattern of
|
|
8
|
+
# credit_guard); the matching rule fails with the reason's message, which rolls the whole submit or cancel back.
|
|
9
|
+
# Create is granted to the roles whose submits and cancels run those flows.
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: sales_manager, create: true}
|
|
12
|
+
- {role: finance_manager, create: true}
|
|
13
|
+
- {role: rental_staff, create: true}
|
|
14
|
+
fields:
|
|
15
|
+
- name: reason
|
|
16
|
+
type: select
|
|
17
|
+
label: {id: Alasan}
|
|
18
|
+
required: true
|
|
19
|
+
options:
|
|
20
|
+
- {value: over_capacity, label: {id: Unit tidak cukup}}
|
|
21
|
+
- {value: not_booked, label: {id: Bukan pesanan yang menunggu keluar}}
|
|
22
|
+
- {value: not_out, label: {id: Alat belum keluar}}
|
|
23
|
+
- {value: in_use, label: {id: Alat sudah keluar}}
|
|
24
|
+
- {value: already_returned, label: {id: Alat sudah kembali}}
|
|
25
|
+
- {value: invoice_submitted, label: {id: Fakturnya sudah diajukan}}
|
|
26
|
+
- {value: invoice_stale, label: {id: Faktur untuk dokumen batal atau sudah ditagih}}
|
|
27
|
+
- {value: invoice_tag, label: {id: Catatan faktur sewa diubah}}
|
|
28
|
+
- {value: still_out, label: {id: Unit masih di luar}}
|
|
29
|
+
- {value: before_out, label: {id: Kembali sebelum keluar}}
|
|
30
|
+
- {value: unit_busy, label: {id: Unit tidak bisa keluar}}
|
|
31
|
+
- {value: unit_not_out, label: {id: Unit bukan milik pesanan ini}}
|
|
32
|
+
- {value: units_mismatch, label: {id: Unit kembali tidak sama dengan unit keluar}}
|
|
33
|
+
- {value: unit_moved, label: {id: Unit sudah dipakai lagi}}
|
|
34
|
+
- name: document
|
|
35
|
+
type: data
|
|
36
|
+
label: {id: Dokumen}
|
|
37
|
+
rules:
|
|
38
|
+
- name: over_capacity
|
|
39
|
+
on: save
|
|
40
|
+
check: reason != 'over_capacity'
|
|
41
|
+
message: {id: 'Unit alat tidak cukup di tanggal itu: sudah dipesan pelanggan lain. Pilih tanggal lain atau kurangi jumlahnya.'}
|
|
42
|
+
- name: not_booked
|
|
43
|
+
on: save
|
|
44
|
+
check: reason != 'not_booked'
|
|
45
|
+
message: {id: 'Pesanan ini tidak sedang menunggu alat keluar (sudah keluar, kembali, atau batal).'}
|
|
46
|
+
- name: not_out
|
|
47
|
+
on: save
|
|
48
|
+
check: reason != 'not_out'
|
|
49
|
+
message: {id: 'Alat pesanan ini belum tercatat keluar, atau sudah kembali.'}
|
|
50
|
+
- name: in_use
|
|
51
|
+
on: save
|
|
52
|
+
check: reason != 'in_use'
|
|
53
|
+
message: {id: 'Alat pesanan ini sudah keluar. Catat alat kembali dulu, pesanan tidak bisa dibatalkan.'}
|
|
54
|
+
- name: already_returned
|
|
55
|
+
on: save
|
|
56
|
+
check: reason != 'already_returned'
|
|
57
|
+
message: {id: 'Alat sudah tercatat kembali. Batalkan catatan alat kembali dulu.'}
|
|
58
|
+
- name: invoice_submitted
|
|
59
|
+
on: save
|
|
60
|
+
check: reason != 'invoice_submitted'
|
|
61
|
+
message: {id: 'Fakturnya sudah diajukan. Batalkan fakturnya dulu.'}
|
|
62
|
+
- name: invoice_stale
|
|
63
|
+
on: save
|
|
64
|
+
check: reason != 'invoice_stale'
|
|
65
|
+
message: {id: 'Faktur ini untuk pesanan atau catatan alat kembali yang sudah batal, atau sudah ditagih di faktur lain. Hapus draf ini.'}
|
|
66
|
+
- name: invoice_tag
|
|
67
|
+
on: save
|
|
68
|
+
check: reason != 'invoice_tag'
|
|
69
|
+
message: {id: 'Catatan faktur sewa tidak bisa diubah: nomor pesanan di dalamnya dipakai untuk mencocokkan faktur.'}
|
|
70
|
+
- name: still_out
|
|
71
|
+
on: save
|
|
72
|
+
check: reason != 'still_out'
|
|
73
|
+
message: {id: 'Unit alat ini masih di luar (ada yang belum kembali). Catat alat kembali dulu sebelum alat keluar lagi.'}
|
|
74
|
+
- name: before_out
|
|
75
|
+
on: save
|
|
76
|
+
check: reason != 'before_out'
|
|
77
|
+
message: {id: Tanggal kembali tidak boleh sebelum tanggal alat keluar}
|
|
78
|
+
- name: unit_busy
|
|
79
|
+
on: save
|
|
80
|
+
check: reason != 'unit_busy'
|
|
81
|
+
message: {id: 'Ada unit yang masih keluar, sudah tidak dipakai, atau tercatat rusak atau hilang. Pilih unit lain, atau ubah kondisinya setelah diperbaiki.'}
|
|
82
|
+
- name: unit_not_out
|
|
83
|
+
on: save
|
|
84
|
+
check: reason != 'unit_not_out'
|
|
85
|
+
message: {id: 'Ada unit di checklist yang tidak sedang keluar untuk pesanan ini.'}
|
|
86
|
+
- name: units_mismatch
|
|
87
|
+
on: save
|
|
88
|
+
check: reason != 'units_mismatch'
|
|
89
|
+
message: {id: 'Unit yang kembali harus sama dengan semua unit yang keluar untuk pesanan ini (unit hilang tetap dicatat, kondisi Hilang).'}
|
|
90
|
+
- name: unit_moved
|
|
91
|
+
on: save
|
|
92
|
+
check: reason != 'unit_moved'
|
|
93
|
+
message: {id: 'Ada unit yang sudah tercatat keluar atau kembali di dokumen lain sesudah ini. Batalkan dokumen itu dulu.'}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_item
|
|
3
|
+
label: {id: Alat sewa, en: Rental item}
|
|
4
|
+
icon: stock
|
|
5
|
+
naming: ALT-{####}
|
|
6
|
+
title_field: title
|
|
7
|
+
# A catalogue item rented out by the day: how many units there are, the rate per unit per day, the deposit per unit
|
|
8
|
+
# and the late fee per unit per day. A booking copies the rate, deposit and late fee when it is made. With track_units
|
|
9
|
+
# on, its units are registered one by one (rental_unit) and every checkout and return lists which units, with a
|
|
10
|
+
# condition checklist, the customer's signature and a printed BAST (berita acara serah terima).
|
|
11
|
+
permissions:
|
|
12
|
+
- {role: finance_manager, read: true, create: true, write: true, export: true, print: true}
|
|
13
|
+
- {role: sales_manager, read: true, export: true}
|
|
14
|
+
- {role: rental_staff, read: true}
|
|
15
|
+
- {role: head_office, read: true, export: true}
|
|
16
|
+
fields:
|
|
17
|
+
- name: item
|
|
18
|
+
type: link
|
|
19
|
+
to: item
|
|
20
|
+
label: {id: Barang}
|
|
21
|
+
required: true
|
|
22
|
+
unique: true
|
|
23
|
+
in_list: true
|
|
24
|
+
- name: title
|
|
25
|
+
type: data
|
|
26
|
+
label: {id: Nama alat}
|
|
27
|
+
compute: item.item_name
|
|
28
|
+
in_list: true
|
|
29
|
+
- name: units
|
|
30
|
+
type: int
|
|
31
|
+
label: {id: Jumlah unit}
|
|
32
|
+
required: true
|
|
33
|
+
default: '1'
|
|
34
|
+
in_list: true
|
|
35
|
+
- name: daily_rate
|
|
36
|
+
type: currency
|
|
37
|
+
label: {id: Tarif per hari}
|
|
38
|
+
required: true
|
|
39
|
+
in_list: true
|
|
40
|
+
- name: deposit_per_unit
|
|
41
|
+
type: currency
|
|
42
|
+
label: {id: Deposit per unit}
|
|
43
|
+
default: '0'
|
|
44
|
+
in_list: true
|
|
45
|
+
- name: late_fee_per_day
|
|
46
|
+
type: currency
|
|
47
|
+
label: {id: Denda telat per hari}
|
|
48
|
+
help: {id: Per unit untuk setiap hari lewat dari tanggal kembali}
|
|
49
|
+
default: '0'
|
|
50
|
+
- name: track_units
|
|
51
|
+
type: check
|
|
52
|
+
label: {id: Serah terima per unit}
|
|
53
|
+
help: {id: 'Nyalakan kalau tiap unit punya kode atau nomor seri: alat keluar dan kembali wajib mencatat unit, kondisi, dan nama penyewa'}
|
|
54
|
+
default: 'false'
|
|
55
|
+
- name: active
|
|
56
|
+
type: check
|
|
57
|
+
label: {id: Masih disewakan}
|
|
58
|
+
default: 'true'
|
|
59
|
+
- name: notes
|
|
60
|
+
type: text
|
|
61
|
+
label: {id: Catatan}
|
|
62
|
+
rules:
|
|
63
|
+
- name: units_positive
|
|
64
|
+
on: save
|
|
65
|
+
check: units > 0
|
|
66
|
+
message: {id: Jumlah unit minimal 1}
|
|
67
|
+
- name: money_not_negative
|
|
68
|
+
on: save
|
|
69
|
+
check: daily_rate >= 0 && deposit_per_unit >= 0 && late_fee_per_day >= 0
|
|
70
|
+
message: {id: 'Tarif, deposit, dan denda tidak boleh minus'}
|
|
71
|
+
views:
|
|
72
|
+
list:
|
|
73
|
+
columns: [name, title, units, daily_rate, deposit_per_unit, late_fee_per_day]
|
|
74
|
+
filters: [active]
|
|
75
|
+
sort: name
|
|
76
|
+
form:
|
|
77
|
+
layout:
|
|
78
|
+
- section: {id: Alat}
|
|
79
|
+
columns:
|
|
80
|
+
- [item, title, units, track_units, active]
|
|
81
|
+
- [daily_rate, deposit_per_unit, late_fee_per_day]
|
|
82
|
+
- section: {id: Catatan}
|
|
83
|
+
fields: [notes]
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_return
|
|
3
|
+
label: {id: Alat kembali, en: Rental return}
|
|
4
|
+
icon: undo
|
|
5
|
+
is_submittable: true
|
|
6
|
+
naming: KBL-{YYYY}-{#####}
|
|
7
|
+
title_field: booking
|
|
8
|
+
# The equipment comes back on its actual date. Each day after the booking's end date costs the late fee per unit
|
|
9
|
+
# (copied on the booking); damage is typed in. Both are kept from the deposit, late fee first, and the rest of the
|
|
10
|
+
# deposit is paid back (journal: 2-1400 against 4-9200 Pendapatan denda dan ganti rugi and cash or bank). What the
|
|
11
|
+
# deposit does not cover (extra_due) becomes a draft invoice to the customer. Submitting it moves the schedule from
|
|
12
|
+
# out to returned (flow rental_return_on_submit); cancelling it moves it back, refused once the extra invoice is
|
|
13
|
+
# submitted. The late fee counts at most 60 days; a loss beyond that is charged as damage (Biaya kerusakan atau hilang).
|
|
14
|
+
# Handover: the checklist lists each unit back, its condition and what its damage or loss costs (fee per row). The
|
|
15
|
+
# fees of the rows (unit_damage) plus any other damage typed in damage_fee are the damage (total_damage) kept from the
|
|
16
|
+
# deposit after the late fee. A return must bring back exactly the units that went out with the booking (the lost
|
|
17
|
+
# ones as rows marked hilang; checked by flow rental_return_on_submit, so a booking that went out by count before
|
|
18
|
+
# track_units was switched on still comes back by count), and for an item with track_units the customer signs. Photo and signature are attachments,
|
|
19
|
+
# as on the checkout. The BAST prints from rental_bast_in. Warehouse staff fill the checklist; the admin submits,
|
|
20
|
+
# since the submit pays the deposit back.
|
|
21
|
+
permissions:
|
|
22
|
+
- {role: sales_manager, read: true, create: true, write: true, delete: true, submit: true, export: true, print: true}
|
|
23
|
+
- {role: rental_staff, read: true, create: true, write: true, delete: true, export: true, print: true}
|
|
24
|
+
- {role: finance_manager, read: true, cancel: true, amend: true, export: true, print: true}
|
|
25
|
+
- {role: head_office, read: true, export: true, print: true}
|
|
26
|
+
fields:
|
|
27
|
+
- {name: booking, type: link, to: rental_booking, label: {id: Pesanan sewa}, required: true, in_list: true}
|
|
28
|
+
- {name: customer, type: data, label: {id: Pelanggan}, compute: booking.customer, in_list: true}
|
|
29
|
+
- {name: rental_item, type: data, label: {id: Alat}, compute: booking.rental_item}
|
|
30
|
+
- {name: track_units, type: check, label: {id: Serah terima per unit}, compute: booking.rental_item.track_units}
|
|
31
|
+
- {name: qty, type: int, label: {id: Jumlah unit}, compute: booking.qty}
|
|
32
|
+
# names for the BAST (prints only resolve top-level links)
|
|
33
|
+
- {name: customer_name, type: data, label: {id: Nama pelanggan}, hidden: true, compute: booking.customer.customer_name}
|
|
34
|
+
- {name: item_title, type: data, label: {id: Nama alat}, hidden: true, compute: booking.rental_item.title}
|
|
35
|
+
- {name: return_date, type: date, label: {id: Tanggal kembali aktual}, required: true, default: today(), in_list: true}
|
|
36
|
+
- {name: planned_end, type: date, label: {id: Seharusnya kembali}, compute: booking.end_date}
|
|
37
|
+
- name: late_days
|
|
38
|
+
type: int
|
|
39
|
+
label: {id: Telat (hari)}
|
|
40
|
+
# 60 conditions summed (no date difference in the rule language): days after the planned end, at most 60.
|
|
41
|
+
compute: >-
|
|
42
|
+
(booking.end_date + duration(1) <= return_date ? 1 : 0) + (booking.end_date + duration(2) <= return_date ? 1 : 0) + (booking.end_date + duration(3) <= return_date ? 1 : 0) + (booking.end_date + duration(4) <= return_date ? 1 : 0) + (booking.end_date + duration(5) <= return_date ? 1 : 0) + (booking.end_date + duration(6) <= return_date ? 1 : 0) + (booking.end_date + duration(7) <= return_date ? 1 : 0) + (booking.end_date + duration(8) <= return_date ? 1 : 0) + (booking.end_date + duration(9) <= return_date ? 1 : 0) + (booking.end_date + duration(10) <= return_date ? 1 : 0) + (booking.end_date + duration(11) <= return_date ? 1 : 0) + (booking.end_date + duration(12) <= return_date ? 1 : 0) + (booking.end_date + duration(13) <= return_date ? 1 : 0) + (booking.end_date + duration(14) <= return_date ? 1 : 0) + (booking.end_date + duration(15) <= return_date ? 1 : 0) + (booking.end_date + duration(16) <= return_date ? 1 : 0) + (booking.end_date + duration(17) <= return_date ? 1 : 0) + (booking.end_date + duration(18) <= return_date ? 1 : 0) + (booking.end_date + duration(19) <= return_date ? 1 : 0) + (booking.end_date + duration(20) <= return_date ? 1 : 0) + (booking.end_date + duration(21) <= return_date ? 1 : 0) + (booking.end_date + duration(22) <= return_date ? 1 : 0) + (booking.end_date + duration(23) <= return_date ? 1 : 0) + (booking.end_date + duration(24) <= return_date ? 1 : 0) + (booking.end_date + duration(25) <= return_date ? 1 : 0) + (booking.end_date + duration(26) <= return_date ? 1 : 0) + (booking.end_date + duration(27) <= return_date ? 1 : 0) + (booking.end_date + duration(28) <= return_date ? 1 : 0) + (booking.end_date + duration(29) <= return_date ? 1 : 0) + (booking.end_date + duration(30) <= return_date ? 1 : 0) + (booking.end_date + duration(31) <= return_date ? 1 : 0) + (booking.end_date + duration(32) <= return_date ? 1 : 0) + (booking.end_date + duration(33) <= return_date ? 1 : 0) + (booking.end_date + duration(34) <= return_date ? 1 : 0) + (booking.end_date + duration(35) <= return_date ? 1 : 0) + (booking.end_date + duration(36) <= return_date ? 1 : 0) + (booking.end_date + duration(37) <= return_date ? 1 : 0) + (booking.end_date + duration(38) <= return_date ? 1 : 0) + (booking.end_date + duration(39) <= return_date ? 1 : 0) + (booking.end_date + duration(40) <= return_date ? 1 : 0) + (booking.end_date + duration(41) <= return_date ? 1 : 0) + (booking.end_date + duration(42) <= return_date ? 1 : 0) + (booking.end_date + duration(43) <= return_date ? 1 : 0) + (booking.end_date + duration(44) <= return_date ? 1 : 0) + (booking.end_date + duration(45) <= return_date ? 1 : 0) + (booking.end_date + duration(46) <= return_date ? 1 : 0) + (booking.end_date + duration(47) <= return_date ? 1 : 0) + (booking.end_date + duration(48) <= return_date ? 1 : 0) + (booking.end_date + duration(49) <= return_date ? 1 : 0) + (booking.end_date + duration(50) <= return_date ? 1 : 0) + (booking.end_date + duration(51) <= return_date ? 1 : 0) + (booking.end_date + duration(52) <= return_date ? 1 : 0) + (booking.end_date + duration(53) <= return_date ? 1 : 0) + (booking.end_date + duration(54) <= return_date ? 1 : 0) + (booking.end_date + duration(55) <= return_date ? 1 : 0) + (booking.end_date + duration(56) <= return_date ? 1 : 0) + (booking.end_date + duration(57) <= return_date ? 1 : 0) + (booking.end_date + duration(58) <= return_date ? 1 : 0) + (booking.end_date + duration(59) <= return_date ? 1 : 0) + (booking.end_date + duration(60) <= return_date ? 1 : 0)
|
|
43
|
+
in_list: true
|
|
44
|
+
- {name: late_fee, type: currency, label: {id: Denda telat}, compute: late_days * booking.qty * booking.late_fee_per_day}
|
|
45
|
+
- {name: units, type: table, of: rental_return_unit, label: {id: Checklist unit}}
|
|
46
|
+
- {name: unit_damage, type: currency, label: {id: Kerusakan dari checklist}, compute: "units.map(r, r.fee).sum()"}
|
|
47
|
+
- {name: damage_fee, type: currency, label: {id: Biaya kerusakan atau hilang lain}, help: {id: 'Di luar checklist unit, misalnya kerugian telat lebih dari 60 hari'}, default: '0'}
|
|
48
|
+
- {name: total_damage, type: currency, label: {id: Total kerusakan atau hilang}, compute: unit_damage + damage_fee}
|
|
49
|
+
- {name: damage_notes, type: text, label: {id: Catatan kerusakan}}
|
|
50
|
+
- {name: deposit, type: currency, label: {id: Deposit diterima}, compute: booking.deposit}
|
|
51
|
+
# A PKP business charges PPN on the fee: nothing is kept from the deposit, the whole fee goes on the invoice (finding 3).
|
|
52
|
+
- {name: deposit_kept, type: check, label: {id: Denda dipotong dari deposit}, compute: '!tax.pkp'}
|
|
53
|
+
- {name: covered_late, type: currency, label: {id: Denda telat dipotong dari deposit}, compute: "!deposit_kept ? 0 : (late_fee < deposit ? late_fee : deposit)"}
|
|
54
|
+
- {name: covered_damage, type: currency, label: {id: Kerusakan dipotong dari deposit}, compute: "!deposit_kept ? 0 : (total_damage < deposit - covered_late ? total_damage : deposit - covered_late)"}
|
|
55
|
+
- {name: deposit_refund, type: currency, label: {id: Deposit dikembalikan}, compute: deposit - covered_late - covered_damage, in_list: true}
|
|
56
|
+
- {name: extra_due, type: currency, label: {id: Kekurangan ditagih}, compute: late_fee + total_damage - covered_late - covered_damage, in_list: true}
|
|
57
|
+
- name: refund_method
|
|
58
|
+
type: select
|
|
59
|
+
label: {id: Deposit dikembalikan lewat}
|
|
60
|
+
default: "'cash'"
|
|
61
|
+
options:
|
|
62
|
+
- {value: cash, label: {id: Tunai}}
|
|
63
|
+
- {value: transfer, label: {id: Transfer bank}}
|
|
64
|
+
- {name: signed_by, type: data, label: {id: Diserahkan kembali oleh (nama penyewa)}, in_list: true}
|
|
65
|
+
- {name: received_by, type: data, label: {id: Diterima oleh (petugas)}}
|
|
66
|
+
- {name: photo, type: image, label: {id: Foto alat saat kembali}, help: {id: 'Id lampiran foto (att_...). Foto kerusakan lain cukup dilampirkan ke catatan ini'}}
|
|
67
|
+
- {name: signature, type: signature, label: {id: Tanda tangan penyewa}, help: {id: 'Id lampiran gambar tanda tangan (att_...)'}}
|
|
68
|
+
rules:
|
|
69
|
+
- name: booking_submitted
|
|
70
|
+
on: save
|
|
71
|
+
check: booking.docstatus == 1
|
|
72
|
+
message: {id: Pesanan sewa belum diajukan atau sudah batal}
|
|
73
|
+
- name: not_before_start
|
|
74
|
+
on: save
|
|
75
|
+
check: return_date >= booking.start_date
|
|
76
|
+
message: {id: Tanggal kembali tidak boleh sebelum mulai sewa}
|
|
77
|
+
- name: late_over_60_days
|
|
78
|
+
on: save
|
|
79
|
+
level: warn
|
|
80
|
+
check: return_date <= booking.end_date + duration(60)
|
|
81
|
+
message: {id: 'Telat lebih dari 60 hari: denda telat dihitung 60 hari saja. Masukkan sisa kerugian di biaya kerusakan atau hilang lain.'}
|
|
82
|
+
- name: damage_not_negative
|
|
83
|
+
on: save
|
|
84
|
+
check: "damage_fee >= 0 && units.map(r, r.fee < 0 ? 1 : 0).sum() == 0"
|
|
85
|
+
message: {id: Biaya kerusakan tidak boleh minus}
|
|
86
|
+
- name: units_match_qty
|
|
87
|
+
on: save
|
|
88
|
+
check: units.size() == 0 || units.size() == qty
|
|
89
|
+
message: {id: 'Jumlah unit di checklist harus sama dengan jumlah unit pesanan (unit hilang tetap dicatat, kondisi Hilang)'}
|
|
90
|
+
- name: units_of_item
|
|
91
|
+
on: save
|
|
92
|
+
check: "units.map(r, r.unit_item == rental_item ? 0 : 1).sum() == 0"
|
|
93
|
+
message: {id: Ada unit dari alat lain di checklist}
|
|
94
|
+
- name: units_unique
|
|
95
|
+
on: save
|
|
96
|
+
check: "units.map(r, units.map(x, x.unit == r.unit ? 1 : 0).sum()).sum() == units.size()"
|
|
97
|
+
message: {id: Unit yang sama tercatat dua kali di checklist}
|
|
98
|
+
- name: damage_without_fee
|
|
99
|
+
on: save
|
|
100
|
+
level: warn
|
|
101
|
+
check: "units.map(r, (r.condition == 'rusak' || r.condition == 'hilang') && r.fee == 0 ? 1 : 0).sum() == 0"
|
|
102
|
+
message: {id: 'Ada unit rusak atau hilang tanpa biaya. Isi biayanya kalau ditagihkan ke penyewa.'}
|
|
103
|
+
- name: signed_by_required
|
|
104
|
+
on: submit
|
|
105
|
+
check: "!track_units || signed_by != ''"
|
|
106
|
+
message: {id: Isi nama penyewa yang mengembalikan alat (tanda tangan berita acara)}
|
|
107
|
+
- name: signature_needs_name
|
|
108
|
+
on: save
|
|
109
|
+
check: signature == '' || signed_by != ''
|
|
110
|
+
message: {id: Tanda tangan perlu nama penyewa yang menandatangani}
|
|
111
|
+
- name: photo_is_attachment
|
|
112
|
+
on: save
|
|
113
|
+
check: "photo == '' || photo.startsWith('att_')"
|
|
114
|
+
message: {id: 'Foto harus berupa lampiran catatan ini (id att_...)'}
|
|
115
|
+
- name: signature_is_attachment
|
|
116
|
+
on: save
|
|
117
|
+
check: "signature == '' || signature.startsWith('att_')"
|
|
118
|
+
message: {id: 'Tanda tangan harus berupa lampiran catatan ini (id att_...)'}
|
|
119
|
+
views:
|
|
120
|
+
list:
|
|
121
|
+
columns: [name, booking, customer, return_date, late_days, signed_by, deposit_refund, extra_due, status]
|
|
122
|
+
sort: -return_date
|
|
123
|
+
form:
|
|
124
|
+
layout:
|
|
125
|
+
- section: {id: Alat kembali}
|
|
126
|
+
columns:
|
|
127
|
+
- [booking, return_date, refund_method]
|
|
128
|
+
- [customer, rental_item, qty, planned_end, late_days, track_units]
|
|
129
|
+
- section: {id: Checklist unit}
|
|
130
|
+
fields: [units]
|
|
131
|
+
- section: {id: Denda dan kerusakan}
|
|
132
|
+
columns:
|
|
133
|
+
- [late_fee, unit_damage, damage_fee, total_damage, damage_notes]
|
|
134
|
+
- [deposit, deposit_kept, covered_late, covered_damage]
|
|
135
|
+
- section: {id: Hasil}
|
|
136
|
+
columns:
|
|
137
|
+
- [deposit_refund]
|
|
138
|
+
- [extra_due]
|
|
139
|
+
- section: {id: Serah terima}
|
|
140
|
+
columns:
|
|
141
|
+
- [signed_by, received_by]
|
|
142
|
+
- [photo, signature]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# A row of the return checklist: one unit back from the customer, its condition when it went out (from the unit) and
|
|
3
|
+
# now, and what the damage or loss of this unit costs. The fees of all rows are the checklist damage of the return
|
|
4
|
+
# (rental_return.unit_damage), kept from the deposit like the late fee.
|
|
5
|
+
name: rental_return_unit
|
|
6
|
+
is_child: true
|
|
7
|
+
fields:
|
|
8
|
+
- {name: unit, type: link, to: rental_unit, label: {id: Unit}, required: true, peek: [serial_no, condition]}
|
|
9
|
+
- {name: unit_code, type: data, label: {id: Kode unit}, compute: unit.code}
|
|
10
|
+
- {name: serial_no, type: data, label: {id: Nomor seri}, compute: unit.serial_no}
|
|
11
|
+
- {name: unit_item, type: data, label: {id: Alat unit}, hidden: true, compute: unit.rental_item}
|
|
12
|
+
# the unit's condition at checkout; the unit keeps it while it is out (computed when the row is saved)
|
|
13
|
+
- {name: out_condition, type: data, label: {id: Kondisi saat keluar}, compute: "unit.state == 'out' ? unit.out_condition : ''"}
|
|
14
|
+
- name: condition
|
|
15
|
+
type: select
|
|
16
|
+
label: {id: Kondisi kembali}
|
|
17
|
+
required: true
|
|
18
|
+
default: "'lengkap'"
|
|
19
|
+
options:
|
|
20
|
+
- {value: lengkap, label: {id: 'Lengkap, baik'}}
|
|
21
|
+
- {value: lecet, label: {id: Lecet}}
|
|
22
|
+
- {value: rusak, label: {id: Rusak}}
|
|
23
|
+
- {value: hilang, label: {id: Hilang}}
|
|
24
|
+
- name: fee
|
|
25
|
+
type: currency
|
|
26
|
+
label: {id: Biaya kerusakan atau hilang}
|
|
27
|
+
help: {id: 'Biaya perbaikan atau ganti unit ini. Dipotong dari deposit bersama denda telat'}
|
|
28
|
+
default: '0'
|
|
29
|
+
- {name: notes, type: data, label: {id: Catatan}, help: {id: 'Misalnya lensa tergores, charger tidak kembali'}}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: rental_schedule
|
|
3
|
+
label: {id: Jadwal alat, en: Rental schedule}
|
|
4
|
+
icon: calendar
|
|
5
|
+
naming: JDW-{######}
|
|
6
|
+
title_field: rental_item
|
|
7
|
+
# One row per submitted booking, made and kept current by the flows of this module (a submitted document cannot
|
|
8
|
+
# change): booked, out, returned or cancelled, with the actual dates. The availability check of a new booking reads
|
|
9
|
+
# these rows. Its state fields are read_only, so a person cannot change them by hand; only the flows write them.
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: sales_manager, read: true, create: true, write: true, export: true}
|
|
12
|
+
- {role: finance_manager, read: true, write: true, export: true}
|
|
13
|
+
# write: the checkout flow of the warehouse staff moves the schedule to out (its fields are read_only)
|
|
14
|
+
- {role: rental_staff, read: true, write: true}
|
|
15
|
+
- {role: head_office, read: true, export: true}
|
|
16
|
+
fields:
|
|
17
|
+
- {name: booking, type: link, to: rental_booking, label: {id: Pesanan sewa}, required: true, unique: true, read_only: true, in_list: true}
|
|
18
|
+
- {name: customer, type: link, to: customer, label: {id: Pelanggan}, read_only: true, in_list: true}
|
|
19
|
+
- {name: rental_item, type: link, to: rental_item, label: {id: Alat}, required: true, read_only: true, in_list: true}
|
|
20
|
+
- {name: qty, type: int, label: {id: Jumlah unit}, read_only: true, in_list: true}
|
|
21
|
+
- {name: start_date, type: date, label: {id: Mulai sewa}, read_only: true, in_list: true}
|
|
22
|
+
- {name: end_date, type: date, label: {id: Tanggal kembali}, read_only: true, in_list: true}
|
|
23
|
+
- {name: deposit, type: currency, label: {id: Deposit}, read_only: true}
|
|
24
|
+
- name: state
|
|
25
|
+
type: select
|
|
26
|
+
label: {id: Status}
|
|
27
|
+
default: "'booked'"
|
|
28
|
+
read_only: true
|
|
29
|
+
in_list: true
|
|
30
|
+
chip: true
|
|
31
|
+
options:
|
|
32
|
+
- {value: booked, label: {id: Dipesan}}
|
|
33
|
+
- {value: out, label: {id: Keluar}}
|
|
34
|
+
- {value: returned, label: {id: Kembali}}
|
|
35
|
+
- {value: cancelled, label: {id: Batal}}
|
|
36
|
+
- {name: out_date, type: date, label: {id: Tanggal keluar}, read_only: true}
|
|
37
|
+
- {name: returned_date, type: date, label: {id: Tanggal kembali aktual}, read_only: true}
|
|
38
|
+
- {name: checkout, type: link, to: rental_checkout, label: {id: Bukti alat keluar}, read_only: true}
|
|
39
|
+
- {name: rental_return, type: link, to: rental_return, label: {id: Bukti alat kembali}, read_only: true}
|
|
40
|
+
rules:
|
|
41
|
+
# Made by rental_booking_on_submit inside the booking's submit; a row for a draft booking (made by hand) would hold
|
|
42
|
+
# units for a booking that was never confirmed, and would block that booking's own row (booking is unique).
|
|
43
|
+
- name: booking_submitted
|
|
44
|
+
on: save
|
|
45
|
+
check: booking.docstatus != 0
|
|
46
|
+
message: {id: Jadwal hanya dibuat dari pesanan sewa yang sudah diajukan}
|
|
47
|
+
views:
|
|
48
|
+
list:
|
|
49
|
+
columns: [booking, customer, rental_item, qty, start_date, end_date, state]
|
|
50
|
+
filters: [rental_item, state, customer]
|
|
51
|
+
sort: start_date
|