@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,163 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E: netral, satu tanda merek (logo atau inisial usaha), hierarki dari sisa tagihan, angka rata kanan tabular. */
|
|
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
|
+
.lh .contacts span+span::before { content: " · "; }
|
|
9
|
+
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
|
|
10
|
+
.head h1 { font-size: 1.6em; margin: 0; letter-spacing: 0.02em; }
|
|
11
|
+
.head .no { font-size: 1.1em; font-weight: 600; margin-top: 1mm; }
|
|
12
|
+
.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; }
|
|
13
|
+
.due { min-width: 62mm; padding: 3mm 4mm; border: 1px solid #D6D3D1; border-radius: 2mm; background: #F5F5F4; text-align: right; }
|
|
14
|
+
.due .k { color: #57534E; }
|
|
15
|
+
.due .v { font-size: 1.9em; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
|
|
16
|
+
.meta { display: flex; gap: 8mm; margin: 5mm 0 2mm; }
|
|
17
|
+
.meta > div { flex: 1; }
|
|
18
|
+
.meta table td { border: 0; padding: 0.6mm 0; }
|
|
19
|
+
.meta table td:first-child { color: #57534E; width: 32mm; }
|
|
20
|
+
.meta .k { color: #57534E; }
|
|
21
|
+
.items { margin-top: 4mm; }
|
|
22
|
+
.items th { border-bottom: 1px solid #1C1917; color: #57534E; font-weight: 600; font-size: 0.9em; }
|
|
23
|
+
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
24
|
+
.totals { width: 55%; margin: 3mm 0 0 auto; }
|
|
25
|
+
.totals td { border: 0; padding: 0.8mm 2mm; }
|
|
26
|
+
.totals tr.small td { color: #57534E; font-size: 0.92em; }
|
|
27
|
+
.totals tr.grand td { border-top: 1px solid #1C1917; padding-top: 2mm; font-weight: 700; font-size: 1.15em; }
|
|
28
|
+
.totals tr.net td { font-weight: 700; }
|
|
29
|
+
.note { margin-top: 3mm; font-size: 0.9em; }
|
|
30
|
+
.pay { margin-top: 6mm; display: flex; gap: 8mm; align-items: flex-start; justify-content: space-between; border: 1px solid #D6D3D1; border-radius: 2mm; padding: 4mm; break-inside: avoid; }
|
|
31
|
+
.pay h2 { font-size: 1em; margin: 0 0 2mm; }
|
|
32
|
+
.pay .ref { font-family: ui-monospace, monospace; font-weight: 700; }
|
|
33
|
+
.pay .qris { text-align: center; font-size: 0.85em; flex: none; }
|
|
34
|
+
.pay .qris img { width: 34mm; height: 34mm; object-fit: contain; display: block; margin: 0 auto 1mm; }
|
|
35
|
+
.foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; margin-top: 4mm; }
|
|
36
|
+
.foot .signature { margin-top: 6mm; }
|
|
37
|
+
{{end}}
|
|
38
|
+
{{define "letterhead"}}{{with .Letterhead}}<header class="lh">
|
|
39
|
+
{{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}}
|
|
40
|
+
<div>
|
|
41
|
+
<div class="legal-name">{{.legal_name}}</div>
|
|
42
|
+
{{with .tagline}}<div class="muted">{{.}}</div>{{end}}
|
|
43
|
+
{{with .address}}<div class="address">{{.}}</div>{{end}}
|
|
44
|
+
{{if or .phone .email .website}}<div class="contacts">{{with .phone}}<span>{{.}}</span>{{end}}{{with .email}}<span>{{.}}</span>{{end}}{{with .website}}<span>{{.}}</span>{{end}}</div>{{end}}
|
|
45
|
+
{{with .npwp}}<div>NPWP {{.}}</div>{{end}}
|
|
46
|
+
</div></header>{{end}}{{end}}
|
|
47
|
+
{{template "letterhead" .}}
|
|
48
|
+
{{$fx := and .Doc.currency (ne .Doc.currency "IDR")}}
|
|
49
|
+
{{- $ds := printf "%v" .Doc.docstatus -}}
|
|
50
|
+
{{- $out := printf "%v" .Doc.outstanding -}}
|
|
51
|
+
{{- $owed := and .Doc.outstanding (ne $out "0") (ne (slice (printf "%v-" $out) 0 1) "-") -}}
|
|
52
|
+
{{- $paid := and .Doc.paid_amount (ne (printf "%v" .Doc.paid_amount) "0") -}}
|
|
53
|
+
{{- $late := overdue .Doc.due_date -}}
|
|
54
|
+
{{- $disc := false -}}{{- range .Doc.items -}}{{- if .discount -}}{{- $disc = true -}}{{- end -}}{{- end -}}
|
|
55
|
+
<div class="head">
|
|
56
|
+
<div>
|
|
57
|
+
<h1>Faktur</h1>
|
|
58
|
+
<div class="no">{{.Doc.name}}</div>
|
|
59
|
+
<div class="status">
|
|
60
|
+
{{- if eq $ds "0"}}Draf
|
|
61
|
+
{{- else if eq $ds "2"}}Batal
|
|
62
|
+
{{- else if not $owed}}Lunas
|
|
63
|
+
{{- else if gt $late 0}}Lewat jatuh tempo {{$late}} hari
|
|
64
|
+
{{- else if $paid}}Dibayar sebagian
|
|
65
|
+
{{- else}}Belum dibayar{{end -}}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
{{if and (eq $ds "1") $owed}}<div class="due">
|
|
69
|
+
<div class="k">{{if $paid}}Sisa tagihan{{else if or .Doc.retention_amount .Doc.pph23_amount}}Tagihan bersih{{else}}Total tagihan{{end}}</div>
|
|
70
|
+
<div class="v">{{rupiah .Doc.outstanding}}</div>
|
|
71
|
+
<div class="k">Jatuh tempo {{date .Doc.due_date}}</div>
|
|
72
|
+
</div>{{else if and (eq $ds "1") (not $owed)}}<div class="due">
|
|
73
|
+
<div class="k">Sudah dibayar</div>
|
|
74
|
+
<div class="v">{{rupiah .Doc.paid_amount}}</div>
|
|
75
|
+
<div class="k">Terima kasih</div>
|
|
76
|
+
</div>{{end}}
|
|
77
|
+
</div>
|
|
78
|
+
<div class="meta">
|
|
79
|
+
<div>
|
|
80
|
+
<div class="k">Kepada</div>
|
|
81
|
+
<div><strong>{{.Links.customer.customer_name}}</strong></div>
|
|
82
|
+
{{with .Links.customer.address}}<div class="address" style="white-space:pre-line">{{.}}</div>{{end}}
|
|
83
|
+
{{with .Links.customer.npwp}}<div>NPWP {{.}}</div>{{end}}
|
|
84
|
+
</div>
|
|
85
|
+
<div>
|
|
86
|
+
<table>
|
|
87
|
+
<tr><td>Tanggal faktur</td><td>{{date .Doc.posting_date}}</td></tr>
|
|
88
|
+
<tr><td>Jatuh tempo</td><td>{{date .Doc.due_date}}</td></tr>
|
|
89
|
+
{{if .Doc.po_number}}<tr><td>No. PO pelanggan</td><td>{{.Doc.po_number}}</td></tr>{{end}}
|
|
90
|
+
</table>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<table class="items">
|
|
94
|
+
<thead><tr><th>Uraian</th><th class="num">Qty</th><th>Satuan</th><th class="num">Harga satuan</th>{{if $disc}}<th class="num">Diskon</th>{{end}}<th class="num">Jumlah</th></tr></thead>
|
|
95
|
+
<tbody>
|
|
96
|
+
{{range $row := .Doc.items}}
|
|
97
|
+
{{- $u := or $row.uom_name $row.uom -}}
|
|
98
|
+
<tr>
|
|
99
|
+
<td>{{if $row.description}}{{$row.description}}{{else}}{{$row.item}}{{end}}</td>
|
|
100
|
+
<td class="num">{{number $row.qty}}</td>
|
|
101
|
+
<td>{{$u}}</td>
|
|
102
|
+
<td class="num">{{if $fx}}{{money $row.rate_fx $.Doc.currency}}{{else}}{{rupiah $row.rate}}{{end}}</td>
|
|
103
|
+
{{if $disc}}<td class="num">{{if $row.discount}}{{number $row.discount}}%{{end}}</td>{{end}}
|
|
104
|
+
<td class="num">{{if $fx}}{{money $row.amount_fx $.Doc.currency}}{{else}}{{rupiah $row.amount}}{{end}}</td>
|
|
105
|
+
</tr>
|
|
106
|
+
{{end}}
|
|
107
|
+
</tbody>
|
|
108
|
+
</table>
|
|
109
|
+
{{if $fx}}
|
|
110
|
+
<table class="totals">
|
|
111
|
+
<tr><td>Subtotal</td><td class="num">{{money .Doc.subtotal_fx .Doc.currency}}</td></tr>
|
|
112
|
+
<tr class="small"><td>DPP</td><td class="num">{{money .Doc.dpp_fx .Doc.currency}}</td></tr>
|
|
113
|
+
{{if taxrate .Doc .Tax}}<tr class="small"><td>PPN {{number (taxrate .Doc .Tax)}}%</td><td class="num">{{money .Doc.ppn_fx .Doc.currency}}</td></tr>{{end}}
|
|
114
|
+
<tr class="grand"><td>Total</td><td class="num">{{money .Doc.grand_total_fx .Doc.currency}}</td></tr>
|
|
115
|
+
{{if or .Doc.retention_amount .Doc.pph23_amount}}<tr class="net"><td>Tagihan bersih</td><td class="num">{{money .Doc.amount_due_fx .Doc.currency}}</td></tr>{{end}}
|
|
116
|
+
</table>
|
|
117
|
+
<p class="note">Kurs: 1 {{.Doc.currency}} = {{rupiah .Doc.exchange_rate}}. Setara rupiah (PPN dihitung dalam rupiah):</p>
|
|
118
|
+
{{end}}
|
|
119
|
+
<table class="totals">
|
|
120
|
+
<tr><td>Subtotal</td><td class="num">{{rupiah .Doc.subtotal}}</td></tr>
|
|
121
|
+
{{if .Doc.discount_amount}}<tr><td>Diskon</td><td class="num">-{{rupiah .Doc.discount_amount}}</td></tr>{{end}}
|
|
122
|
+
{{if .Doc.down_payment}}<tr><td>Uang muka</td><td class="num">-{{rupiah .Doc.down_payment}}</td></tr>{{end}}
|
|
123
|
+
{{if taxrate .Doc .Tax}}<tr class="small"><td>DPP</td><td class="num">{{rupiah .Doc.dpp}}</td></tr>{{end}}
|
|
124
|
+
{{if taxrate .Doc .Tax}}<tr class="small"><td>PPN {{number (taxrate .Doc .Tax)}}% (DPP nilai lain {{.Doc.dpp_num}}/{{.Doc.dpp_den}})</td><td class="num">{{rupiah .Doc.ppn}}</td></tr>{{end}}
|
|
125
|
+
<tr class="grand"><td>Total</td><td class="num">{{rupiah .Doc.grand_total}}</td></tr>
|
|
126
|
+
{{if .Doc.retention_amount}}<tr class="small"><td>Retensi {{number .Doc.retention_percent}}% ditahan</td><td class="num">-{{rupiah .Doc.retention_amount}}</td></tr>{{end}}
|
|
127
|
+
{{if .Doc.pph23_amount}}<tr class="small"><td>PPh 23 dipotong pelanggan{{if .Doc.pph23_dpp}} (dasar {{rupiah .Doc.pph23_dpp}}){{end}}</td><td class="num">-{{rupiah .Doc.pph23_amount}}</td></tr>{{end}}
|
|
128
|
+
{{if or .Doc.retention_amount .Doc.pph23_amount}}<tr class="net"><td>Tagihan bersih</td><td class="num">{{rupiah .Doc.amount_due}}</td></tr>{{end}}
|
|
129
|
+
{{if $paid}}<tr><td>Sudah dibayar</td><td class="num">-{{rupiah .Doc.paid_amount}}</td></tr>
|
|
130
|
+
<tr class="net"><td>Sisa tagihan</td><td class="num">{{rupiah .Doc.outstanding}}</td></tr>{{end}}
|
|
131
|
+
</table>
|
|
132
|
+
<p class="note"><span class="muted">Terbilang:</span> {{terbilang .Doc.grand_total}}</p>
|
|
133
|
+
{{if .Doc.notes}}<p class="note">{{.Doc.notes}}</p>{{end}}
|
|
134
|
+
{{/* Cara bayar only while something is owed (or on a draft, which has no copy yet and shows the letterhead accounts):
|
|
135
|
+
a cancelled or paid invoice must not tell the customer to pay. */}}
|
|
136
|
+
{{if or (eq $ds "0") (and (eq $ds "1") $owed)}}
|
|
137
|
+
{{with .Related.cara_bayar}}{{with index . 0}}
|
|
138
|
+
<section class="pay">
|
|
139
|
+
<div>
|
|
140
|
+
<h2>Cara bayar</h2>
|
|
141
|
+
<div>Transfer ke <strong>{{.bank}} {{.account_no}}</strong> a.n. {{.holder}}</div>
|
|
142
|
+
<div>Tulis di berita transfer: <span class="ref">{{.reference}}</span></div>
|
|
143
|
+
{{with .instructions}}<div class="muted">{{.}}</div>{{end}}
|
|
144
|
+
</div>
|
|
145
|
+
{{if .qris_payload}}<div class="qris">
|
|
146
|
+
<img src="{{qr .qris_payload}}" alt="QRIS">
|
|
147
|
+
<div><strong>Scan QRIS</strong>{{with .qris_merchant_name}} {{.}}{{end}}</div>
|
|
148
|
+
{{with .qris_nmid}}<div class="muted">NMID {{.}}</div>{{end}}
|
|
149
|
+
<div class="muted">Isi nominal {{rupiah $.Doc.outstanding}}</div>
|
|
150
|
+
</div>{{end}}
|
|
151
|
+
</section>
|
|
152
|
+
{{end}}{{else}}
|
|
153
|
+
{{template "bank_accounts" .}}
|
|
154
|
+
{{if .Letterhead.bank}}<p class="note">Mohon tulis nomor faktur <strong>{{.Doc.name}}</strong> di berita transfer supaya pembayaran langsung tercatat.</p>{{end}}
|
|
155
|
+
{{end}}
|
|
156
|
+
{{end}}
|
|
157
|
+
<div class="foot">
|
|
158
|
+
<div class="note muted">
|
|
159
|
+
Bila pembayaran dipotong PPh Pasal 23, mohon kirimkan bukti potongnya kepada kami.
|
|
160
|
+
{{if taxrate .Doc .Tax}}<br>Faktur pajak (e-Faktur) diterbitkan terpisah.{{end}}
|
|
161
|
+
</div>
|
|
162
|
+
{{template "signature" .}}
|
|
163
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
name: sales_invoice
|
|
3
|
+
model: sales_invoice
|
|
4
|
+
label: {id: Faktur, en: Invoice}
|
|
5
|
+
paper: A4
|
|
6
|
+
template: sales_invoice.html
|
|
7
|
+
default: true
|
|
8
|
+
# "Cara bayar" copied when the invoice was submitted (payment_instruction); empty for an older invoice or one
|
|
9
|
+
# submitted without a default account, which then shows the letterhead's bank accounts.
|
|
10
|
+
related:
|
|
11
|
+
cara_bayar:
|
|
12
|
+
model: payment_instruction
|
|
13
|
+
match: {sales_invoice: name}
|
|
14
|
+
limit: 1
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E untuk thermal: hitam putih, satu tanda merek (nama usaha tebal), angka rata kanan tabular. */
|
|
3
|
+
body { font-size: 8.5pt; }
|
|
4
|
+
.c { text-align: center; }
|
|
5
|
+
.brand { font-size: 1.25em; font-weight: 700; }
|
|
6
|
+
.rule { border-top: 1px dashed #1C1917; margin: 2mm 0; }
|
|
7
|
+
.row { display: flex; justify-content: space-between; gap: 2mm; }
|
|
8
|
+
.row .num { white-space: nowrap; }
|
|
9
|
+
.line { margin: 1mm 0; }
|
|
10
|
+
.line .sub { color: #57534E; }
|
|
11
|
+
.big { font-size: 1.35em; font-weight: 700; }
|
|
12
|
+
.status { font-weight: 700; }
|
|
13
|
+
.qris img { width: 42mm; height: 42mm; display: block; margin: 1mm auto; }
|
|
14
|
+
.muted { color: #57534E; }
|
|
15
|
+
{{end}}
|
|
16
|
+
{{define "letterhead"}}{{with .Letterhead}}<div class="c">
|
|
17
|
+
<div class="brand">{{.legal_name}}</div>
|
|
18
|
+
{{with .address}}<div style="white-space:pre-line">{{.}}</div>{{end}}
|
|
19
|
+
{{with .phone}}<div>{{.}}</div>{{end}}
|
|
20
|
+
{{with .npwp}}<div>NPWP {{.}}</div>{{end}}
|
|
21
|
+
</div>{{end}}{{end}}
|
|
22
|
+
{{template "letterhead" .}}
|
|
23
|
+
{{- $ds := printf "%v" .Doc.docstatus -}}
|
|
24
|
+
{{- $out := printf "%v" .Doc.outstanding -}}
|
|
25
|
+
{{- $owed := and .Doc.outstanding (ne $out "0") (ne (slice (printf "%v-" $out) 0 1) "-") -}}
|
|
26
|
+
{{- $paid := and .Doc.paid_amount (ne (printf "%v" .Doc.paid_amount) "0") -}}
|
|
27
|
+
<div class="rule"></div>
|
|
28
|
+
<div class="row"><span>Nota</span><span>{{.Doc.name}}</span></div>
|
|
29
|
+
<div class="row"><span>Tanggal</span><span>{{date .Doc.posting_date}}</span></div>
|
|
30
|
+
<div class="row"><span>Pelanggan</span><span>{{.Links.customer.customer_name}}</span></div>
|
|
31
|
+
<div class="rule"></div>
|
|
32
|
+
{{range $row := .Doc.items}}
|
|
33
|
+
{{- $u := or $row.uom_name $row.uom -}}
|
|
34
|
+
<div class="line">
|
|
35
|
+
<div>{{if $row.description}}{{$row.description}}{{else}}{{$row.item}}{{end}}</div>
|
|
36
|
+
<div class="row sub"><span>{{number $row.qty}} {{$u}} x {{rupiah $row.rate}}{{if $row.discount}} (-{{number $row.discount}}%){{end}}</span><span class="num">{{rupiah $row.amount}}</span></div>
|
|
37
|
+
</div>
|
|
38
|
+
{{end}}
|
|
39
|
+
<div class="rule"></div>
|
|
40
|
+
{{if .Doc.discount_amount}}<div class="row"><span>Diskon</span><span class="num">-{{rupiah .Doc.discount_amount}}</span></div>{{end}}
|
|
41
|
+
{{if .Doc.down_payment}}<div class="row"><span>Uang muka</span><span class="num">-{{rupiah .Doc.down_payment}}</span></div>{{end}}
|
|
42
|
+
{{if taxrate .Doc .Tax}}<div class="row muted"><span>PPN {{number (taxrate .Doc .Tax)}}%</span><span class="num">{{rupiah .Doc.ppn}}</span></div>{{end}}
|
|
43
|
+
{{- $net := or .Doc.retention_amount .Doc.pph23_amount -}}
|
|
44
|
+
<div class="row{{if not $net}} big{{end}}"><span>Total</span><span class="num">{{rupiah .Doc.grand_total}}</span></div>
|
|
45
|
+
{{if .Doc.retention_amount}}<div class="row"><span>Retensi {{number .Doc.retention_percent}}% ditahan</span><span class="num">-{{rupiah .Doc.retention_amount}}</span></div>{{end}}
|
|
46
|
+
{{if .Doc.pph23_amount}}<div class="row"><span>PPh 23 dipotong</span><span class="num">-{{rupiah .Doc.pph23_amount}}</span></div>{{end}}
|
|
47
|
+
{{if $net}}<div class="row big"><span>Tagihan bersih</span><span class="num">{{rupiah .Doc.amount_due}}</span></div>{{end}}
|
|
48
|
+
{{if $paid}}<div class="row"><span>Sudah dibayar</span><span class="num">-{{rupiah .Doc.paid_amount}}</span></div>{{end}}
|
|
49
|
+
{{if and (eq $ds "1") $owed $paid}}<div class="row big"><span>Sisa</span><span class="num">{{rupiah .Doc.outstanding}}</span></div>{{end}}
|
|
50
|
+
<div class="c status">
|
|
51
|
+
{{- if eq $ds "0"}}DRAF, BELUM DITAGIHKAN
|
|
52
|
+
{{- else if eq $ds "2"}}BATAL
|
|
53
|
+
{{- else if not $owed}}LUNAS
|
|
54
|
+
{{- else}}Jatuh tempo {{date .Doc.due_date}}{{end -}}
|
|
55
|
+
</div>
|
|
56
|
+
{{if and (eq $ds "1") $owed}}
|
|
57
|
+
{{with .Related.cara_bayar}}{{with index . 0}}
|
|
58
|
+
<div class="rule"></div>
|
|
59
|
+
<div class="c">
|
|
60
|
+
<div>Transfer {{.bank}} {{.account_no}}</div>
|
|
61
|
+
<div>a.n. {{.holder}}</div>
|
|
62
|
+
<div>Berita transfer: <strong>{{.reference}}</strong></div>
|
|
63
|
+
{{if .qris_payload}}<div class="qris"><img src="{{qr .qris_payload}}" alt="QRIS"><div>Scan QRIS, isi {{rupiah $.Doc.outstanding}}</div></div>{{end}}
|
|
64
|
+
</div>
|
|
65
|
+
{{end}}{{else}}{{with .Letterhead.bank}}{{with index . 0}}
|
|
66
|
+
<div class="rule"></div>
|
|
67
|
+
<div class="c"><div>Transfer {{.bank}} {{.account}}</div>{{with .holder}}<div>a.n. {{.}}</div>{{end}}<div>Berita transfer: <strong>{{$.Doc.name}}</strong></div></div>
|
|
68
|
+
{{end}}{{end}}{{end}}
|
|
69
|
+
{{end}}
|
|
70
|
+
<div class="rule"></div>
|
|
71
|
+
<div class="c muted">Terima kasih</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
# Nota for an 80 mm receipt printer: the invoice handed over the counter or with the goods (grosir, ritel). Same
|
|
3
|
+
# figures as the A4 faktur, shortened: lines, total, what is still owed, and how to pay (QRIS when the org has one).
|
|
4
|
+
name: sales_invoice_nota
|
|
5
|
+
model: sales_invoice
|
|
6
|
+
label: {id: Nota (printer kasir 80 mm), en: Receipt (80 mm)}
|
|
7
|
+
paper: 80mm
|
|
8
|
+
template: sales_invoice_nota.html
|
|
9
|
+
related:
|
|
10
|
+
cara_bayar:
|
|
11
|
+
model: payment_instruction
|
|
12
|
+
match: {sales_invoice: name}
|
|
13
|
+
limit: 1
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{{define "style"}}
|
|
2
|
+
/* Arah E: pratinjau pesan netral; tombol utama ink, bukan hijau WhatsApp. */
|
|
3
|
+
h1 { font-size: 1.3em; }
|
|
4
|
+
.to { margin: 0 0 3mm; }
|
|
5
|
+
.msg { white-space: pre-wrap; border: 1px solid #D6D3D1; border-radius: 3mm; border-top-left-radius: 0.8mm; background: #F5F5F4; padding: 4mm; margin: 3mm 0 4mm; font-size: 1.05em; max-width: 120mm; }
|
|
6
|
+
.wa { display: inline-block; padding: 2.4mm 5mm; border-radius: 2mm; background: #1C1917; color: #fff; text-decoration: none; font-weight: 600; }
|
|
7
|
+
.muted { color: #57534E; font-size: 0.9em; }
|
|
8
|
+
@media print { .wa { display: none; } }
|
|
9
|
+
{{end}}
|
|
10
|
+
{{- $c := .Links.customer -}}
|
|
11
|
+
{{- $p := "" -}}{{- with $c.phone -}}{{- $p = . -}}{{- end -}}
|
|
12
|
+
{{- if and $p (eq (slice $p 0 1) "+") -}}{{- $p = slice $p 1 -}}{{- end -}}
|
|
13
|
+
{{- if and $p (eq (slice $p 0 1) "0") -}}{{- $p = printf "62%s" (slice $p 1) -}}{{- end -}}
|
|
14
|
+
{{- $bank := "" -}}{{- with .Letterhead.bank -}}{{- with index . 0 -}}{{- $bank = printf "%s %s a.n. %s" .bank .account .holder -}}{{- end -}}{{- end -}}
|
|
15
|
+
{{- $ref := .Doc.name -}}{{- $qris := "" -}}{{- $howto := "" -}}
|
|
16
|
+
{{- with .Related.cara_bayar -}}{{- with index . 0 -}}
|
|
17
|
+
{{- $bank = printf "%s %s a.n. %s" .bank .account_no .holder -}}{{- $ref = .reference -}}
|
|
18
|
+
{{- if .qris_nmid -}}{{- $qris = printf "\nBisa juga scan QRIS %s (NMID %s), isi nominal %s." .qris_merchant_name .qris_nmid (rupiah $.Doc.outstanding) -}}{{- end -}}
|
|
19
|
+
{{- with .instructions -}}{{- $howto = printf "\n%s" . -}}{{- end -}}
|
|
20
|
+
{{- end -}}{{- end -}}
|
|
21
|
+
{{- $payline := printf "Mohon tulis %s di berita transfer saat membayar." $ref -}}
|
|
22
|
+
{{- if $bank -}}{{- $payline = printf "Pembayaran bisa transfer ke %s. Mohon tulis %s di berita transfer." $bank $ref -}}{{- end -}}
|
|
23
|
+
{{- $late := overdue .Doc.due_date -}}
|
|
24
|
+
{{- $msg := "" -}}
|
|
25
|
+
{{- $open := eq (printf "%v" .Doc.docstatus) "1" -}}
|
|
26
|
+
{{- $owed := gt (printf "%v" .Doc.outstanding | len) 0 -}}{{- if $owed -}}{{- $owed = ne (slice (printf "%v" .Doc.outstanding) 0 1) "-" -}}{{- end -}}
|
|
27
|
+
{{- if not $open -}}
|
|
28
|
+
{{- $p = "" -}}
|
|
29
|
+
{{- if eq (printf "%v" .Doc.docstatus) "2" -}}
|
|
30
|
+
{{- $msg = printf "Faktur %s sudah dibatalkan. Tidak ada tagihan yang dikirim untuk faktur ini." .Doc.name -}}
|
|
31
|
+
{{- else -}}
|
|
32
|
+
{{- $msg = printf "Faktur %s belum diajukan. Ajukan dulu sebelum menagih pelanggan." .Doc.name -}}
|
|
33
|
+
{{- end -}}
|
|
34
|
+
{{- else if or (not .Doc.outstanding) (not $owed) -}}
|
|
35
|
+
{{- $msg = printf "Halo %s, terima kasih. Pembayaran faktur %s sudah kami terima dan faktur ini sudah lunas.\n\n%s" $c.customer_name .Doc.name .Letterhead.legal_name -}}
|
|
36
|
+
{{- else if gt $late 0 -}}
|
|
37
|
+
{{- $msg = printf "Halo %s, kami mengingatkan faktur %s sebesar %s sudah lewat %d hari dari jatuh tempo (%s).\n\n%s%s%s\n\nKalau sudah membayar, abaikan pesan ini. Terima kasih.\n%s" $c.customer_name .Doc.name (rupiah .Doc.outstanding) $late (date .Doc.due_date) $payline $qris $howto .Letterhead.legal_name -}}
|
|
38
|
+
{{- else -}}
|
|
39
|
+
{{- $msg = printf "Halo %s, ini tagihan dari %s.\n\nFaktur %s\nTagihan %s\nJatuh tempo %s\n\n%s%s%s\n\nTerima kasih." $c.customer_name .Letterhead.legal_name .Doc.name (rupiah .Doc.outstanding) (date .Doc.due_date) $payline $qris $howto -}}
|
|
40
|
+
{{- end -}}
|
|
41
|
+
<h1>Pesan tagihan WhatsApp</h1>
|
|
42
|
+
<p class="to">Untuk <strong>{{$c.customer_name}}</strong>{{if $p}} · +{{$p}}{{else if $open}} · <em>nomor WhatsApp pelanggan belum diisi</em>{{end}}</p>
|
|
43
|
+
<div class="msg">{{$msg}}</div>
|
|
44
|
+
{{if $p}}<p><a class="wa" href="https://wa.me/{{$p}}?text={{$msg}}">Buka di WhatsApp</a></p>{{end}}
|
|
45
|
+
<p class="muted">Sesudah terkirim, catat di Pengingat tagihan supaya pelanggan tidak ditagih dua kali di hari yang sama.</p>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/print.json
|
|
2
|
+
# Not paper: the reminder text plus a wa.me link that opens WhatsApp with the text filled in, so the owner sends it
|
|
3
|
+
# from their own phone. Same wording as the WhatsApp Business templates in rangka-connectors.
|
|
4
|
+
name: sales_invoice_whatsapp
|
|
5
|
+
model: sales_invoice
|
|
6
|
+
label: {id: Pesan tagihan WA, en: WhatsApp reminder}
|
|
7
|
+
paper: A5
|
|
8
|
+
template: sales_invoice_whatsapp.html
|
|
9
|
+
# "Cara bayar" copied when the invoice was submitted (payment_instruction); empty for an older invoice or one
|
|
10
|
+
# submitted without a default account, which then shows the letterhead's bank accounts.
|
|
11
|
+
related:
|
|
12
|
+
cara_bayar:
|
|
13
|
+
model: payment_instruction
|
|
14
|
+
match: {sales_invoice: name}
|
|
15
|
+
limit: 1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# Runs inside a receipt's payment (pos_sale submitted), as the cashier: one ticket per active station of the outlet
|
|
3
|
+
# with the receipt's lines whose item category is routed to that station (kitchen_route). An outlet without stations
|
|
4
|
+
# (a shop) and a receipt without kitchen lines make nothing. A receipt paid again after a void (amend) sends its lines
|
|
5
|
+
# again as a revision. A failure here rolls the payment back, so a paid receipt never misses its tickets.
|
|
6
|
+
name: kitchen_ticket_on_sale
|
|
7
|
+
label: {id: 'Struk dibayar: kirim tiket ke stasiun dapur'}
|
|
8
|
+
on: pos_sale.submitted
|
|
9
|
+
steps:
|
|
10
|
+
- {find_all: kitchen_station, where: outlet == event.outlet && active, as: stations}
|
|
11
|
+
- if: stations.size() > 0
|
|
12
|
+
then:
|
|
13
|
+
- {find_all: kitchen_route, where: outlet == event.outlet, as: routes}
|
|
14
|
+
- find_all: item
|
|
15
|
+
where: name in event.items.map(l, l.item)
|
|
16
|
+
as: menu
|
|
17
|
+
- for_each: stations
|
|
18
|
+
as: st
|
|
19
|
+
do:
|
|
20
|
+
- if: "event.items.filter(l, menu.filter(m, m.name == l.item && routes.filter(r, r.station == st.name && r.category == m.category).size() > 0).size() > 0).size() > 0"
|
|
21
|
+
create: kitchen_ticket
|
|
22
|
+
set:
|
|
23
|
+
sale: event.name
|
|
24
|
+
outlet: event.outlet
|
|
25
|
+
station: st.name
|
|
26
|
+
date: event.date
|
|
27
|
+
buyer: event.buyer
|
|
28
|
+
revision_of: event.amended_from
|
|
29
|
+
items: "event.items.filter(l, menu.filter(m, m.name == l.item && routes.filter(r, r.station == st.name && r.category == m.category).size() > 0).size() > 0).map(l, {'item': l.item, 'description': l.description, 'qty': l.qty, 'uom': l.uom, 'note': l.note})"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# A ticket's status moves one step at a time, forward or back (Baru -> Dimasak -> Siap -> Diambil; back is the work
|
|
3
|
+
# screen's "Urungkan"), and each step is stamped with its time; a step back clears the stamp of the step undone. Batal
|
|
4
|
+
# is set only by flow kitchen_ticket_on_void (writes by flows start no flow), so a person cannot void a ticket, and a
|
|
5
|
+
# void ticket does not come back. Runs inside the write, as the writer; kitchen_guard refuses the write.
|
|
6
|
+
name: kitchen_ticket_on_update
|
|
7
|
+
label: {id: 'Tiket dapur diubah: satu langkah, catat waktunya'}
|
|
8
|
+
on: kitchen_ticket.updated
|
|
9
|
+
if: event.before != null && event.before.status != event.status
|
|
10
|
+
steps:
|
|
11
|
+
- if: event.before.status == 'void'
|
|
12
|
+
create: kitchen_guard
|
|
13
|
+
set: {reason: "'ticket_void'", document: event.name}
|
|
14
|
+
- if: event.status == 'void'
|
|
15
|
+
create: kitchen_guard
|
|
16
|
+
set: {reason: "'void_by_receipt'", document: event.name}
|
|
17
|
+
# positions 0..3; a jump of more than one step is refused
|
|
18
|
+
- if: "event.status != 'void' && event.before.status != 'void' && ({'new': 0, 'cooking': 1, 'ready': 2, 'picked_up': 3}[event.status] - {'new': 0, 'cooking': 1, 'ready': 2, 'picked_up': 3}[event.before.status]) * ({'new': 0, 'cooking': 1, 'ready': 2, 'picked_up': 3}[event.status] - {'new': 0, 'cooking': 1, 'ready': 2, 'picked_up': 3}[event.before.status]) > 1"
|
|
19
|
+
create: kitchen_guard
|
|
20
|
+
set: {reason: "'one_step'", document: event.name}
|
|
21
|
+
- {find: kitchen_ticket, where: name == event.name, as: t}
|
|
22
|
+
- update: t
|
|
23
|
+
set:
|
|
24
|
+
cooking_at: "event.status == 'new' ? null : (event.status == 'cooking' && event.before.status == 'new' ? now() : t.cooking_at)"
|
|
25
|
+
ready_at: "event.status == 'new' || event.status == 'cooking' ? null : (event.status == 'ready' && event.before.status == 'cooking' ? now() : t.ready_at)"
|
|
26
|
+
picked_up_at: "event.status == 'picked_up' ? now() : null"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/flow.json
|
|
2
|
+
# A voided receipt (pos_sale cancelled, same day, open shift) voids its tickets that are not picked up yet, as the
|
|
3
|
+
# cashier who voided it; the kitchen screen drops them. A ticket already picked up stays as it was (the food went out).
|
|
4
|
+
name: kitchen_ticket_on_void
|
|
5
|
+
label: {id: 'Struk dibatalkan: tiket dapurnya batal'}
|
|
6
|
+
on: pos_sale.cancelled
|
|
7
|
+
steps:
|
|
8
|
+
- {find_all: kitchen_ticket, where: "sale == event.name && status != 'void' && status != 'picked_up'", as: tickets}
|
|
9
|
+
- for_each: tickets
|
|
10
|
+
as: t
|
|
11
|
+
do:
|
|
12
|
+
- update: t
|
|
13
|
+
set:
|
|
14
|
+
status: "'void'"
|
|
15
|
+
void_at: now()
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Never stored: flow kitchen_ticket_on_update creates one when a ticket's status change must be refused (the pattern of
|
|
3
|
+
# pos_guard); the matching rule fails with the reason's message and rolls the write back.
|
|
4
|
+
name: kitchen_guard
|
|
5
|
+
label: {id: Penjaga tiket dapur, en: Kitchen ticket guard}
|
|
6
|
+
icon: check
|
|
7
|
+
naming: KGD-{######}
|
|
8
|
+
title_field: reason
|
|
9
|
+
permissions:
|
|
10
|
+
- {role: head_office, create: true}
|
|
11
|
+
- {role: cashier, create: true}
|
|
12
|
+
- {role: kitchen, create: true}
|
|
13
|
+
fields:
|
|
14
|
+
- name: reason
|
|
15
|
+
type: select
|
|
16
|
+
label: {id: Alasan}
|
|
17
|
+
required: true
|
|
18
|
+
options:
|
|
19
|
+
- {value: ticket_void, label: {id: Tiket sudah batal}}
|
|
20
|
+
- {value: void_by_receipt, label: {id: Batal hanya dari struk}}
|
|
21
|
+
- {value: one_step, label: {id: Satu langkah}}
|
|
22
|
+
- {name: document, type: data, label: {id: Dokumen}}
|
|
23
|
+
rules:
|
|
24
|
+
- name: ticket_void
|
|
25
|
+
on: save
|
|
26
|
+
check: reason != 'ticket_void'
|
|
27
|
+
message: {id: 'Tiket ini sudah batal karena struknya dibatalkan; tidak bisa dilanjutkan'}
|
|
28
|
+
- name: void_by_receipt
|
|
29
|
+
on: save
|
|
30
|
+
check: reason != 'void_by_receipt'
|
|
31
|
+
message: {id: 'Tiket dapur batal hanya kalau struknya dibatalkan kasir'}
|
|
32
|
+
- name: one_step
|
|
33
|
+
on: save
|
|
34
|
+
check: reason != 'one_step'
|
|
35
|
+
message: {id: 'Status tiket maju atau mundur satu langkah saja (Baru, Dimasak, Siap, Diambil)'}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Which item category a station cooks: Kopi -> Bar, Makanan -> Dapur panas. A category can go to one station per
|
|
3
|
+
# outlet; a category with no route at an outlet makes no ticket there (bottled drinks the cashier hands over).
|
|
4
|
+
# A separate model rather than a table of the station: a flow reads records without their table rows.
|
|
5
|
+
name: kitchen_route
|
|
6
|
+
label: {id: Kategori ke stasiun, en: Category to station}
|
|
7
|
+
icon: stock
|
|
8
|
+
naming: RTD-{####}
|
|
9
|
+
title_field: category
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, print: true}
|
|
12
|
+
- {role: cashier, read: true}
|
|
13
|
+
- {role: kitchen, read: true}
|
|
14
|
+
- {role: outlet_staff, read: true}
|
|
15
|
+
fields:
|
|
16
|
+
- {name: station, type: link, to: kitchen_station, label: {id: Stasiun}, required: true, in_list: true, peek: [outlet]}
|
|
17
|
+
- {name: category, type: link, to: item_category, label: {id: Kategori barang}, required: true, in_list: true}
|
|
18
|
+
# the station's outlet, so the row scope of contract 0010 (field outlet) applies to routes too
|
|
19
|
+
- {name: outlet, type: link, to: outlet, label: {id: Outlet}, compute: station.outlet, in_list: true}
|
|
20
|
+
# one station per category and outlet
|
|
21
|
+
- {name: route_key, type: data, label: {id: Kunci rute}, hidden: true, unique: true, compute: "outlet + '/' + category"}
|
|
22
|
+
views:
|
|
23
|
+
list:
|
|
24
|
+
columns: [category, station, outlet]
|
|
25
|
+
filters: [outlet, station, category]
|
|
26
|
+
sort: category
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# A place in an outlet's kitchen that gets its own tickets: Bar (drinks), Dapur panas (hot food), Pastry. Which items
|
|
3
|
+
# go there is set by kitchen_route (item category -> station). An outlet with no active station makes no ticket.
|
|
4
|
+
name: kitchen_station
|
|
5
|
+
label: {id: Stasiun dapur, en: Kitchen station}
|
|
6
|
+
icon: stock
|
|
7
|
+
naming: STD-{###}
|
|
8
|
+
title_field: station_name
|
|
9
|
+
permissions:
|
|
10
|
+
- {role: head_office, read: true, create: true, write: true, delete: true, print: true}
|
|
11
|
+
# flow kitchen_ticket_on_sale reads the stations of the outlet as the cashier who took the payment
|
|
12
|
+
- {role: cashier, read: true}
|
|
13
|
+
- {role: kitchen, read: true}
|
|
14
|
+
- {role: outlet_staff, read: true}
|
|
15
|
+
fields:
|
|
16
|
+
- name: station_name
|
|
17
|
+
type: data
|
|
18
|
+
label: {id: Nama stasiun}
|
|
19
|
+
help: {id: 'Misalnya Bar, Dapur panas, Pastry'}
|
|
20
|
+
required: true
|
|
21
|
+
in_list: true
|
|
22
|
+
- name: outlet
|
|
23
|
+
type: link
|
|
24
|
+
to: outlet
|
|
25
|
+
label: {id: Outlet}
|
|
26
|
+
required: true
|
|
27
|
+
in_list: true
|
|
28
|
+
- name: active
|
|
29
|
+
type: check
|
|
30
|
+
label: {id: Aktif}
|
|
31
|
+
default: 'true'
|
|
32
|
+
in_list: true
|
|
33
|
+
- {name: notes, type: text, label: {id: Catatan}}
|
|
34
|
+
# one station of a name per outlet
|
|
35
|
+
- {name: station_key, type: data, label: {id: Kunci stasiun}, hidden: true, unique: true, compute: "outlet + '/' + station_name"}
|
|
36
|
+
views:
|
|
37
|
+
list:
|
|
38
|
+
columns: [station_name, outlet, active]
|
|
39
|
+
filters: [outlet, active]
|
|
40
|
+
sort: station_name
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# Tiket dapur: the lines of one paid receipt that one station cooks. Made only by flow kitchen_ticket_on_sale when the
|
|
3
|
+
# receipt is paid, so its receipt, outlet, station and lines are read-only; staff change only the status. The status
|
|
4
|
+
# runs Baru -> Dimasak -> Siap -> Diambil, one step at a time or one step back (the work screen's "Urungkan"); each
|
|
5
|
+
# step is stamped by flow kitchen_ticket_on_update. Batal comes only from the receipt being voided. Not submittable:
|
|
6
|
+
# a ticket is a work card, nothing is booked from it (no stock, no money; the receipt did that).
|
|
7
|
+
# Fields follow the queue slot of kernel contract 0030 §2: source (status, date, sent_at), card (heading, station,
|
|
8
|
+
# lines items with description, qty, note), steps (set status), columns by status.
|
|
9
|
+
name: kitchen_ticket
|
|
10
|
+
label: {id: Tiket dapur, en: Kitchen ticket}
|
|
11
|
+
icon: list
|
|
12
|
+
naming: TKD-{outlet.code}-{YY}{MM}-{#####}
|
|
13
|
+
title_field: heading
|
|
14
|
+
permissions:
|
|
15
|
+
# the flow makes the tickets as whoever took the payment (cashier, or head office on any outlet), and voids them as
|
|
16
|
+
# whoever voids the receipt; a ticket typed by hand has no lines (read-only) and is refused (min_rows);
|
|
17
|
+
# the cashier (or the waiter on the cashier's login) marks a ready ticket picked up
|
|
18
|
+
- {role: head_office, read: true, create: true, write: true, export: true, print: true}
|
|
19
|
+
- {role: cashier, read: true, create: true, write: true, print: true}
|
|
20
|
+
- {role: kitchen, read: true, write: true, print: true}
|
|
21
|
+
- {role: outlet_staff, read: true}
|
|
22
|
+
fields:
|
|
23
|
+
- {name: sale, type: link, to: pos_sale, label: {id: Struk}, read_only: true, in_list: true}
|
|
24
|
+
- {name: outlet, type: link, to: outlet, label: {id: Outlet}, read_only: true, in_list: true}
|
|
25
|
+
- {name: station, type: link, to: kitchen_station, label: {id: Stasiun}, read_only: true, in_list: true}
|
|
26
|
+
- {name: date, type: date, label: {id: Tanggal}, read_only: true, default: today(), in_list: true}
|
|
27
|
+
- {name: buyer, type: data, label: {id: Pembeli atau meja}, read_only: true}
|
|
28
|
+
# a corrected receipt (void, then amend) sends its lines again: the kitchen sees it is a revision of the earlier one
|
|
29
|
+
- {name: revision_of, type: link, to: pos_sale, label: {id: Revisi dari struk}, read_only: true}
|
|
30
|
+
# the card's title: the table or buyer when the cashier typed one, else the receipt number; REVISI first for a
|
|
31
|
+
# corrected receipt
|
|
32
|
+
- name: heading
|
|
33
|
+
type: data
|
|
34
|
+
label: {id: Pesanan}
|
|
35
|
+
compute: "(revision_of != '' ? 'REVISI ' : '') + (buyer != '' ? buyer : sale)"
|
|
36
|
+
in_list: true
|
|
37
|
+
- {name: items, type: table, of: kitchen_ticket_item, label: {id: Menu}, read_only: true, min_rows: 1}
|
|
38
|
+
- {name: item_count, type: float, label: {id: Jumlah porsi}, compute: "items.map(l, l.qty).sum()"}
|
|
39
|
+
- name: status
|
|
40
|
+
type: select
|
|
41
|
+
label: {id: Status}
|
|
42
|
+
required: true
|
|
43
|
+
default: "'new'"
|
|
44
|
+
in_list: true
|
|
45
|
+
chip: true
|
|
46
|
+
options:
|
|
47
|
+
- {value: new, label: {id: Baru}}
|
|
48
|
+
- {value: cooking, label: {id: Dimasak}}
|
|
49
|
+
- {value: ready, label: {id: Siap}}
|
|
50
|
+
- {value: picked_up, label: {id: Diambil}}
|
|
51
|
+
- {value: void, label: {id: Batal}}
|
|
52
|
+
# when each step happened (flow kitchen_ticket_on_update); sent_at is the moment the receipt was paid
|
|
53
|
+
- {name: sent_at, type: datetime, label: {id: Masuk dapur}, read_only: true, default: now()}
|
|
54
|
+
- {name: cooking_at, type: datetime, label: {id: Mulai dimasak}, read_only: true}
|
|
55
|
+
- {name: ready_at, type: datetime, label: {id: Siap}, read_only: true}
|
|
56
|
+
- {name: picked_up_at, type: datetime, label: {id: Diambil}, read_only: true}
|
|
57
|
+
- {name: void_at, type: datetime, label: {id: Dibatalkan}, read_only: true}
|
|
58
|
+
views:
|
|
59
|
+
list:
|
|
60
|
+
columns: [name, heading, station, status, sent_at, item_count, outlet]
|
|
61
|
+
filters: [outlet, station, status, date]
|
|
62
|
+
sort: -sent_at
|
|
63
|
+
kanban:
|
|
64
|
+
group_by: status
|
|
65
|
+
title: heading
|
|
66
|
+
card: [station, item_count, sent_at]
|
|
67
|
+
form:
|
|
68
|
+
layout:
|
|
69
|
+
- section: {id: Tiket}
|
|
70
|
+
columns:
|
|
71
|
+
- [heading, station, status]
|
|
72
|
+
- [sale, outlet, date, buyer, revision_of]
|
|
73
|
+
- section: {id: Menu}
|
|
74
|
+
fields: [items]
|
|
75
|
+
- section: {id: Waktu}
|
|
76
|
+
columns:
|
|
77
|
+
- [sent_at, cooking_at, ready_at]
|
|
78
|
+
- [picked_up_at, void_at]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
# A line of a kitchen ticket: copied from the receipt line (no price).
|
|
3
|
+
name: kitchen_ticket_item
|
|
4
|
+
is_child: true
|
|
5
|
+
fields:
|
|
6
|
+
- {name: item, type: link, to: item, label: {id: Menu}, required: true}
|
|
7
|
+
- {name: description, type: data, label: {id: Uraian}}
|
|
8
|
+
- {name: qty, type: float, label: {id: Qty}, required: true}
|
|
9
|
+
- {name: uom, type: link, to: uom, label: {id: Satuan}}
|
|
10
|
+
- {name: note, type: data, label: {id: Catatan}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
|
+
name: kitchen
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
title: {id: Tiket dapur, en: Kitchen tickets}
|
|
5
|
+
summary:
|
|
6
|
+
id: Pesanan kasir jadi tiket per stasiun dapur, dengan status dimasak, siap dan diambil.
|
|
7
|
+
en: Paid receipts become tickets per kitchen station, marked cooking, ready and picked up.
|
|
8
|
+
category: sales
|
|
9
|
+
icon: restaurant-line
|
|
10
|
+
# Kitchen tickets of an F&B outlet that sells through the cashier (module pos). The owner names the stations of each
|
|
11
|
+
# outlet (Bar, Dapur panas) and sends each item category to a station; an outlet without stations makes no ticket, so a
|
|
12
|
+
# shop on the same cashier is untouched. When a receipt is paid (pos_sale submitted) flow kitchen_ticket_on_sale makes
|
|
13
|
+
# one ticket per station with the lines whose item category goes there; items of an unrouted category (bottled water)
|
|
14
|
+
# make no ticket. Kitchen staff move a ticket new -> cooking -> ready, the waiter, cashier or kitchen marks it picked up; each
|
|
15
|
+
# step is stamped with its time by flow kitchen_ticket_on_update (one step back, the work screen's "Urungkan", clears
|
|
16
|
+
# the stamp). A voided receipt voids its tickets; a corrected receipt (amend) makes new tickets marked as a revision.
|
|
17
|
+
# The kitchen screen (screens/dapur.rk) is a queue screen of kernel contract 0030 over these tickets.
|
|
18
|
+
requires: {rangka: '>=0.5', users: ^1.2, catalogue: ^1.3, outlets: ^1.2, pos: ^1.0}
|