@rangka-os/create 0.5.0-alpha.2 → 0.5.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +42 -6
- package/package.json +1 -1
- package/template/base/apps/crm/app.rk +2 -0
- package/template/base/apps/crm/processes/lead_to_cash.rk +8 -0
- package/template/base/apps/dapur/app.rk +35 -0
- package/template/base/apps/dapur/dashboards/dapur_hari_ini.rk +26 -0
- package/template/base/apps/faktur_piutang/app.rk +31 -0
- package/template/base/apps/faktur_piutang/dashboards/piutang_ringkas.rk +88 -0
- package/template/base/apps/fnb_cabang/app.rk +11 -6
- package/template/base/apps/fnb_cabang/dashboards/fnb_overview.rk +38 -14
- package/template/base/apps/fnb_cabang/dashboards/outlet_harian.rk +36 -0
- package/template/base/apps/fnb_cabang/dashboards/stock_recap.rk +19 -16
- package/template/base/apps/grosir_distribusi/app.rk +57 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_ar.rk +66 -0
- package/template/base/apps/grosir_distribusi/dashboards/grosir_overview.rk +91 -0
- package/template/base/apps/grosir_distribusi/dashboards/gudang_harian.rk +33 -0
- package/template/base/apps/grosir_distribusi/dashboards/salesman_harian.rk +51 -0
- package/template/base/apps/jasa_proyek/app.rk +24 -5
- package/template/base/apps/jasa_proyek/dashboards/absen_saya.rk +15 -0
- package/template/base/apps/jasa_proyek/dashboards/jasa_overview.rk +65 -38
- package/template/base/apps/jasa_proyek/dashboards/project_margin.rk +94 -0
- package/template/base/apps/jasa_proyek/dashboards/rekap_absen.rk +18 -0
- package/template/base/apps/jasa_proyek/processes/quote_to_cash.rk +10 -0
- package/template/base/apps/kasir/app.rk +38 -0
- package/template/base/apps/kasir/dashboards/kasir_ringkas.rk +20 -0
- package/template/base/apps/kasir/skills/rangka-app-kasir/SKILL.md +80 -0
- package/template/base/apps/kelas_kursus/app.rk +32 -0
- package/template/base/apps/kelas_kursus/dashboards/kelas_saya.rk +41 -0
- package/template/base/apps/kelas_kursus/dashboards/kursus_ringkas.rk +67 -0
- package/template/base/apps/langganan_jasa/app.rk +39 -0
- package/template/base/apps/langganan_jasa/dashboards/langganan_ringkas.rk +167 -0
- package/template/base/apps/langganan_jasa/dashboards/penagihan_saya.rk +54 -0
- package/template/base/apps/mutasi_bank/app.rk +22 -0
- package/template/base/apps/pajak/app.rk +25 -0
- package/template/base/apps/pembelian_pemasok/app.rk +23 -0
- package/template/base/apps/pembukuan/app.rk +19 -0
- package/template/base/apps/penjualan_harian/app.rk +34 -0
- package/template/base/apps/penjualan_harian/dashboards/penjualan_ringkas.rk +87 -0
- package/template/base/apps/produksi_pabrik/app.rk +54 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_overview.rk +101 -0
- package/template/base/apps/produksi_pabrik/dashboards/produksi_upah.rk +39 -0
- package/template/base/apps/ritel_cabang/app.rk +61 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_overview.rk +137 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_stock.rk +147 -0
- package/template/base/apps/ritel_cabang/dashboards/ritel_tax.rk +76 -0
- package/template/base/apps/sewa_alat/app.rk +36 -0
- package/template/base/apps/sewa_alat/dashboards/alat_hari_ini.rk +90 -0
- package/template/base/apps/sewa_alat/dashboards/sewa_ringkas.rk +86 -0
- package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/SKILL.md +24 -0
- package/template/base/apps/sewa_alat/skills/rangka-app-sewa-alat/first-day.json +162 -0
- package/template/base/apps/stok_outlet/app.rk +34 -0
- package/template/base/apps/stok_outlet/dashboards/outlet_hari_ini.rk +33 -0
- package/template/base/apps/stok_outlet/dashboards/stok_ringkas.rk +50 -0
- package/template/base/connectors/biteship/connector.rk +246 -0
- package/template/base/connectors/biteship/fixtures/cancel_order.json +1 -0
- package/template/base/connectors/biteship/fixtures/create_order.json +8 -0
- package/template/base/connectors/biteship/fixtures/expect.json +9 -0
- package/template/base/connectors/biteship/fixtures/get_order.json +2 -0
- package/template/base/connectors/biteship/fixtures/get_rates.json +7 -0
- package/template/base/connectors/biteship/fixtures/get_tracking.json +7 -0
- package/template/base/connectors/biteship/fixtures/order_price.json +11 -0
- package/template/base/connectors/biteship/fixtures/order_status.json +15 -0
- package/template/base/connectors/biteship/fixtures/order_status_cancelled.json +15 -0
- package/template/base/connectors/biteship/fixtures/order_waybill.json +7 -0
- package/template/base/connectors/biteship/fixtures/search_areas.json +1 -0
- package/template/base/connectors/doku/connector.rk +128 -0
- package/template/base/connectors/doku/fixtures/create_checkout.json +6 -0
- package/template/base/connectors/doku/fixtures/expect.json +38 -0
- package/template/base/connectors/doku/fixtures/payment_notified.json +5 -0
- package/template/base/connectors/doku/fixtures/payment_notified_failed.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_no_type.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_null_type.json +3 -0
- package/template/base/connectors/doku/fixtures/payment_notified_refund.json +3 -0
- package/template/base/connectors/doku/mock/doku_mock.py +217 -0
- package/template/base/connectors/loyverse/connector.rk +98 -0
- package/template/base/connectors/moka/connector.rk +121 -0
- package/template/base/connectors/moka/fixtures/expect.json +44 -0
- package/template/base/connectors/moka/fixtures/latest_transactions.json +79 -0
- package/template/base/connectors/moka/fixtures/list_items.json +4 -0
- package/template/base/connectors/moka/fixtures/list_outlets.json +4 -0
- package/template/base/connectors/moka/fixtures/transaction_created.json +44 -0
- package/template/base/connectors/moka/fixtures/transaction_created_refund.json +39 -0
- package/template/base/connectors/moka/fixtures/transaction_created_refund_later.json +51 -0
- package/template/base/connectors/moka/mock/moka_mock.py +210 -0
- package/template/base/connectors/whatsapp_business/connector.rk +22 -1
- package/template/base/connectors/whatsapp_business/templates.md +32 -0
- package/template/base/connectors/xendit/connector.rk +184 -0
- package/template/base/connectors/xendit/mock/xendit_mock.py +231 -0
- package/template/base/modules/accounting/flows/financial_report_compute.rk +47 -0
- package/template/base/modules/accounting/flows/financial_report_recompute.rk +47 -0
- package/template/base/modules/accounting/flows/gl_cash_advance_post.rk +33 -0
- package/template/base/modules/accounting/flows/gl_cash_advance_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_delivery_note_post.rk +37 -0
- package/template/base/modules/accounting/flows/gl_delivery_note_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_goods_receipt_post.rk +41 -0
- package/template/base/modules/accounting/flows/gl_goods_receipt_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_opening_balance_post.rk +132 -0
- package/template/base/modules/accounting/flows/gl_opening_balance_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_return_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_outlet_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_sales_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_outlet_sales_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_outlet_takings_post.rk +71 -0
- package/template/base/modules/accounting/flows/gl_outlet_takings_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_payment_post.rk +63 -0
- package/template/base/modules/accounting/flows/gl_payment_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_payroll_close_post.rk +89 -0
- package/template/base/modules/accounting/flows/gl_payroll_close_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_pos_sale_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_pos_sale_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_pos_shift_close_post.rk +59 -0
- package/template/base/modules/accounting/flows/gl_pos_shift_close_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_production_batch_post.rk +62 -0
- package/template/base/modules/accounting/flows/gl_production_batch_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_project_expense_post.rk +64 -0
- package/template/base/modules/accounting/flows/gl_project_expense_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_rental_booking_post.rk +35 -0
- package/template/base/modules/accounting/flows/gl_rental_booking_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_rental_return_post.rk +47 -0
- package/template/base/modules/accounting/flows/gl_rental_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_sales_invoice_post.rk +95 -0
- package/template/base/modules/accounting/flows/gl_sales_invoice_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_sales_return_post.rk +40 -0
- package/template/base/modules/accounting/flows/gl_sales_return_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_adjustment_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_adjustment_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_count_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_count_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_post.rk +38 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_receipt_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_stock_transfer_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_timesheet_post.rk +35 -0
- package/template/base/modules/accounting/flows/gl_timesheet_reverse.rk +194 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_post.rk +63 -0
- package/template/base/modules/accounting/flows/gl_vendor_bill_reverse.rk +194 -0
- package/template/base/modules/accounting/imports/opening_balance_sheet.rk +22 -0
- package/template/base/modules/accounting/models/financial_report.rk +85 -0
- package/template/base/modules/accounting/models/gl_entry.rk +164 -0
- package/template/base/modules/accounting/models/opening_balance.rk +48 -0
- package/template/base/modules/accounting/models/period_close.rk +33 -0
- package/template/base/modules/accounting/module.rk +16 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked.rk +12 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_booked_released.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_claim.rk +29 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_confirm.rk +61 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_link_locked.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_matched.rk +13 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_release.rk +11 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_suggest.rk +73 -0
- package/template/base/modules/bank_statement/flows/bank_transaction_unmatched.rk +11 -0
- package/template/base/modules/bank_statement/imports/bank_statement_csv.rk +25 -0
- package/template/base/modules/bank_statement/models/bank_transaction.rk +147 -0
- package/template/base/modules/bank_statement/models/bank_transaction_claim.rk +49 -0
- package/template/base/modules/bank_statement/module.rk +12 -0
- package/template/base/modules/catalogue/imports/item_list.rk +20 -0
- package/template/base/modules/catalogue/imports/item_master.rk +25 -0
- package/template/base/modules/catalogue/models/item.rk +81 -1
- package/template/base/modules/catalogue/models/item_category.rk +29 -0
- package/template/base/modules/catalogue/models/uom.rk +14 -0
- package/template/base/modules/catalogue/models/uom_conversion.rk +8 -0
- package/template/base/modules/catalogue/module.rk +8 -2
- package/template/base/modules/consignment/flows/consignment_bill.rk +39 -0
- package/template/base/modules/consignment/flows/consignment_bill_cancelled.rk +14 -0
- package/template/base/modules/consignment/models/consignment_settlement.rk +111 -0
- package/template/base/modules/consignment/models/consignment_settlement_item.rk +37 -0
- package/template/base/modules/consignment/module.rk +15 -0
- package/template/base/modules/contacts/imports/customer_list.rk +17 -0
- package/template/base/modules/contacts/imports/vendor_list.rk +16 -0
- package/template/base/modules/contacts/models/credit_guard.rk +40 -0
- package/template/base/modules/contacts/models/customer.rk +144 -2
- package/template/base/modules/contacts/models/vendor.rk +51 -2
- package/template/base/modules/contacts/module.rk +6 -1
- package/template/base/modules/coretax/models/tax_period.rk +89 -0
- package/template/base/modules/coretax/module.rk +13 -0
- package/template/base/modules/coretax/print/coretax_bupot.rk +31 -0
- package/template/base/modules/coretax/print/coretax_bupot.xml +28 -0
- package/template/base/modules/coretax/print/coretax_faktur.rk +44 -0
- package/template/base/modules/coretax/print/coretax_faktur.xml +74 -0
- package/template/base/modules/courses/flows/charge_cancel_guard.rk +23 -0
- package/template/base/modules/courses/flows/charge_invoice_on_submit.rk +58 -0
- package/template/base/modules/courses/flows/enrollment_seats_on_create.rk +15 -0
- package/template/base/modules/courses/flows/enrollment_seats_on_update.rk +35 -0
- package/template/base/modules/courses/flows/invoice_course_once.rk +22 -0
- package/template/base/modules/courses/flows/invoice_course_tag_lock.rk +16 -0
- package/template/base/modules/courses/flows/session_attendance_checked.rk +14 -0
- package/template/base/modules/courses/flows/session_fill_attendance.rk +16 -0
- package/template/base/modules/courses/flows/session_of_the_day.rk +34 -0
- package/template/base/modules/courses/flows/student_billing_on_create.rk +25 -0
- package/template/base/modules/courses/models/course_attendance.rk +24 -0
- package/template/base/modules/courses/models/course_batch.rk +119 -0
- package/template/base/modules/courses/models/course_batch_slot.rk +18 -0
- package/template/base/modules/courses/models/course_charge.rk +125 -0
- package/template/base/modules/courses/models/course_guard.rk +50 -0
- package/template/base/modules/courses/models/course_program.rk +101 -0
- package/template/base/modules/courses/models/course_session.rk +94 -0
- package/template/base/modules/courses/models/enrollment.rk +136 -0
- package/template/base/modules/courses/models/student.rk +68 -0
- package/template/base/modules/courses/module.rk +14 -0
- package/template/base/modules/courses/roles/instructor.rk +7 -0
- package/template/base/modules/courses/screens/absen_kelas.rk +17 -0
- package/template/base/modules/currency/module.rk +5 -0
- package/template/base/modules/delivery/flows/delivery_cancel_guard.rk +18 -0
- package/template/base/modules/delivery/flows/fulfilment_on_delivery_cancelled.rk +21 -0
- package/template/base/modules/delivery/flows/fulfilment_on_delivery_submitted.rk +28 -0
- package/template/base/modules/delivery/flows/fulfilment_on_invoice_cancelled.rk +22 -0
- package/template/base/modules/delivery/flows/fulfilment_on_invoice_submitted.rk +22 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_created.rk +18 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_submitted.rk +16 -0
- package/template/base/modules/delivery/flows/fulfilment_on_order_updated.rk +19 -0
- package/template/base/modules/delivery/flows/fulfilment_on_return_cancelled.rk +16 -0
- package/template/base/modules/delivery/flows/fulfilment_on_return_submitted.rk +16 -0
- package/template/base/modules/delivery/flows/invoice_qty_from_deliveries.rk +20 -0
- package/template/base/modules/delivery/flows/order_cancel_guard.rk +10 -0
- package/template/base/modules/delivery/flows/return_cancel_guard.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_payment_cancelled.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_payment_submitted.rk +21 -0
- package/template/base/modules/delivery/flows/return_credit_on_return_cancelled.rk +11 -0
- package/template/base/modules/delivery/flows/return_credit_on_return_submitted.rk +10 -0
- package/template/base/modules/delivery/models/delivery_guard.rk +48 -0
- package/template/base/modules/delivery/models/delivery_note.rk +101 -0
- package/template/base/modules/delivery/models/delivery_note_item.rk +11 -0
- package/template/base/modules/delivery/models/order_fulfilment.rk +27 -0
- package/template/base/modules/delivery/models/order_fulfilment_item.rk +10 -0
- package/template/base/modules/delivery/models/return_credit.rk +23 -0
- package/template/base/modules/delivery/models/sales_return.rk +87 -0
- package/template/base/modules/delivery/models/sales_return_item.rk +16 -0
- package/template/base/modules/delivery/module.rk +16 -0
- package/template/base/modules/delivery/print/delivery_note.html +96 -0
- package/template/base/modules/delivery/print/delivery_note.rk +9 -0
- package/template/base/modules/distribution/flows/credit_on_invoice_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_invoice_submitted.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_order_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_order_submitted.rk +25 -0
- package/template/base/modules/distribution/flows/credit_on_payment_cancelled.rk +17 -0
- package/template/base/modules/distribution/flows/credit_on_payment_submitted.rk +17 -0
- package/template/base/modules/distribution/flows/giro_bounced.rk +20 -0
- package/template/base/modules/distribution/flows/giro_from_payment.rk +21 -0
- package/template/base/modules/distribution/flows/order_tier_pricing_created.rk +17 -0
- package/template/base/modules/distribution/flows/order_tier_pricing_updated.rk +17 -0
- package/template/base/modules/distribution/models/giro.rk +79 -0
- package/template/base/modules/distribution/module.rk +14 -0
- package/template/base/modules/invoicing/flows/invoice_due_digest.rk +12 -0
- package/template/base/modules/invoicing/flows/milestone_invoiced.rk +23 -0
- package/template/base/modules/invoicing/flows/milestone_reopened.rk +19 -0
- package/template/base/modules/invoicing/flows/payment_instruction_on_submit.rk +25 -0
- package/template/base/modules/invoicing/flows/project_billed_on_cancel.rk +16 -0
- package/template/base/modules/invoicing/flows/project_billed_on_submit.rk +16 -0
- package/template/base/modules/invoicing/flows/project_revenue_on_cancel.rk +22 -0
- package/template/base/modules/invoicing/flows/project_revenue_on_submit.rk +17 -0
- package/template/base/modules/invoicing/flows/sales_invoice_credit_recheck.rk +18 -0
- package/template/base/modules/invoicing/models/bank_account.rk +134 -0
- package/template/base/modules/invoicing/models/invoice_reminder.rk +83 -0
- package/template/base/modules/invoicing/models/payment_instruction.rk +72 -0
- package/template/base/modules/invoicing/models/sales_invoice.rk +324 -13
- package/template/base/modules/invoicing/models/sales_invoice_item.rk +23 -0
- package/template/base/modules/invoicing/module.rk +7 -2
- package/template/base/modules/invoicing/print/sales_invoice.html +145 -32
- package/template/base/modules/invoicing/print/sales_invoice.rk +7 -0
- package/template/base/modules/invoicing/print/sales_invoice_nota.html +71 -0
- package/template/base/modules/invoicing/print/sales_invoice_nota.rk +13 -0
- package/template/base/modules/invoicing/print/sales_invoice_whatsapp.html +45 -0
- package/template/base/modules/invoicing/print/sales_invoice_whatsapp.rk +15 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_sale.rk +47 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_update.rk +30 -0
- package/template/base/modules/kitchen/flows/kitchen_ticket_on_void.rk +23 -0
- package/template/base/modules/kitchen/models/kitchen_guard.rk +40 -0
- package/template/base/modules/kitchen/models/kitchen_route.rk +26 -0
- package/template/base/modules/kitchen/models/kitchen_station.rk +40 -0
- package/template/base/modules/kitchen/models/kitchen_ticket.rk +83 -0
- package/template/base/modules/kitchen/models/kitchen_ticket_item.rk +10 -0
- package/template/base/modules/kitchen/module.rk +18 -0
- package/template/base/modules/kitchen/print/kitchen_ticket.html +29 -0
- package/template/base/modules/kitchen/print/kitchen_ticket.rk +9 -0
- package/template/base/modules/kitchen/roles/kitchen.rk +6 -0
- package/template/base/modules/kitchen/screens/dapur.rk +22 -0
- package/template/base/modules/orders/models/customer_order.rk +98 -2
- package/template/base/modules/orders/models/customer_order_item.rk +29 -0
- package/template/base/modules/orders/module.rk +7 -2
- package/template/base/modules/outlet_sales/flows/moka_api_opened.rk +30 -0
- package/template/base/modules/outlet_sales/flows/moka_daily_sales.rk +78 -0
- package/template/base/modules/outlet_sales/flows/moka_held_release.rk +35 -0
- package/template/base/modules/outlet_sales/flows/moka_legacy_key_overlap.rk +22 -0
- package/template/base/modules/outlet_sales/flows/moka_line_mapped.rk +38 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_refused.rk +15 -0
- package/template/base/modules/outlet_sales/flows/moka_transaction_staged.rk +171 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_backfill_harian.rk +71 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_free_sales.rk +19 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_free_takings.rk +19 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_on_sales.rk +19 -0
- package/template/base/modules/outlet_sales/flows/outlet_day_on_takings.rk +19 -0
- package/template/base/modules/outlet_sales/flows/refund_on_return_cancelled.rk +15 -0
- package/template/base/modules/outlet_sales/flows/refund_on_return_submitted.rk +26 -0
- package/template/base/modules/outlet_sales/flows/refund_on_sales_submitted.rk +14 -0
- package/template/base/modules/outlet_sales/flows/sales_cancel_guard.rk +18 -0
- package/template/base/modules/outlet_sales/imports/daily_form.rk +3 -1
- package/template/base/modules/outlet_sales/imports/loyverse_receipts.rk +28 -0
- package/template/base/modules/outlet_sales/imports/moka_item_details.rk +14 -4
- package/template/base/modules/outlet_sales/imports/pos_sales_file.rk +28 -0
- package/template/base/modules/outlet_sales/imports/takings_file.rk +23 -0
- package/template/base/modules/outlet_sales/models/moka_sale_line.rk +66 -0
- package/template/base/modules/outlet_sales/models/moka_transaction.rk +26 -0
- package/template/base/modules/outlet_sales/models/outlet_return.rk +66 -0
- package/template/base/modules/outlet_sales/models/outlet_return_item.rk +7 -0
- package/template/base/modules/outlet_sales/models/outlet_sales.rk +79 -7
- package/template/base/modules/outlet_sales/models/outlet_sales_guard.rk +40 -0
- package/template/base/modules/outlet_sales/models/outlet_sales_line.rk +2 -0
- package/template/base/modules/outlet_sales/models/outlet_takings.rk +85 -0
- package/template/base/modules/outlet_sales/models/outlet_takings_line.rk +37 -0
- package/template/base/modules/outlet_sales/models/pos_refund.rk +36 -0
- package/template/base/modules/outlet_sales/models/pos_refund_item.rk +9 -0
- package/template/base/modules/outlet_sales/module.rk +7 -2
- package/template/base/modules/outlets/models/outlet.rk +57 -0
- package/template/base/modules/outlets/models/outlet_day.rk +30 -0
- package/template/base/modules/outlets/models/outlet_day_backfill.rk +25 -0
- package/template/base/modules/outlets/module.rk +7 -2
- package/template/base/modules/payments/flows/payment_from_doku.rk +73 -0
- package/template/base/modules/payments/flows/payment_from_xendit_invoice.rk +59 -0
- package/template/base/modules/payments/flows/payment_from_xendit_qr.rk +59 -0
- package/template/base/modules/payments/flows/payment_from_xendit_va.rk +59 -0
- package/template/base/modules/payments/flows/payment_gateway_claim_created.rk +19 -0
- package/template/base/modules/payments/flows/payment_gateway_claim_submitted.rk +19 -0
- package/template/base/modules/payments/flows/payment_gateway_release.rk +12 -0
- package/template/base/modules/payments/flows/payment_refund_from_doku.rk +14 -0
- package/template/base/modules/payments/models/gateway_ref_claim.rk +42 -0
- package/template/base/modules/payments/models/payment.rk +62 -1
- package/template/base/modules/payments/models/withholding.rk +16 -2
- package/template/base/modules/payments/module.rk +7 -2
- package/template/base/modules/payments/print/statement.html +1 -1
- package/template/base/modules/payroll/flows/cash_advance_cancel_guard.rk +15 -0
- package/template/base/modules/payroll/flows/invoice_payroll_once.rk +20 -0
- package/template/base/modules/payroll/flows/invoice_payroll_tag_lock.rk +13 -0
- package/template/base/modules/payroll/flows/payroll_close_on_cancel.rk +35 -0
- package/template/base/modules/payroll/flows/payroll_close_on_submit.rk +66 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_created.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_run_overlap_guard_updated.rk +14 -0
- package/template/base/modules/payroll/flows/payroll_totals_on_payslip_cancel.rk +29 -0
- package/template/base/modules/payroll/flows/payroll_totals_on_payslip_submit.rk +29 -0
- package/template/base/modules/payroll/flows/payslip_advance_guard.rk +23 -0
- package/template/base/modules/payroll/flows/payslip_cancel_guard.rk +14 -0
- package/template/base/modules/payroll/flows/payslip_casual_guard.rk +19 -0
- package/template/base/modules/payroll/flows/payslip_from_recap.rk +76 -0
- package/template/base/modules/payroll/flows/payslip_month_guard_created.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_month_guard_submitted.rk +16 -0
- package/template/base/modules/payroll/flows/payslip_order_guard_cancelled.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_order_guard_submitted.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_pay_overlap_guard.rk +15 -0
- package/template/base/modules/payroll/flows/payslip_ytd_guard.rk +35 -0
- package/template/base/modules/payroll/flows/payslip_ytd_on_create.rk +49 -0
- package/template/base/modules/payroll/flows/recap_cancel_guard.rk +15 -0
- package/template/base/modules/payroll/models/cash_advance.rk +53 -0
- package/template/base/modules/payroll/models/payroll_close.rk +80 -0
- package/template/base/modules/payroll/models/payroll_guard.rk +89 -0
- package/template/base/modules/payroll/models/payroll_profile.rk +146 -0
- package/template/base/modules/payroll/models/payroll_run.rk +220 -0
- package/template/base/modules/payroll/models/payslip.rk +370 -0
- package/template/base/modules/payroll/module.rk +13 -0
- package/template/base/modules/payroll/print/payslip.html +54 -0
- package/template/base/modules/payroll/print/payslip.rk +7 -0
- package/template/base/modules/pipeline/module.rk +5 -0
- package/template/base/modules/pos/flows/outlet_day_backfill_kasir.rk +61 -0
- package/template/base/modules/pos/flows/pos_daily_form_guard.rk +18 -0
- package/template/base/modules/pos/flows/pos_sale_on_cancel.rk +42 -0
- package/template/base/modules/pos/flows/pos_sale_on_submit.rk +60 -0
- package/template/base/modules/pos/flows/pos_shift_close_on_cancel.rk +26 -0
- package/template/base/modules/pos/flows/pos_shift_close_on_submit.rk +23 -0
- package/template/base/modules/pos/flows/pos_shift_on_create.rk +21 -0
- package/template/base/modules/pos/flows/pos_shift_on_update.rk +10 -0
- package/template/base/modules/pos/flows/pos_takings_guard.rk +28 -0
- package/template/base/modules/pos/models/pos_guard.rk +76 -0
- package/template/base/modules/pos/models/pos_payment.rk +17 -0
- package/template/base/modules/pos/models/pos_sale.rk +226 -0
- package/template/base/modules/pos/models/pos_sale_item.rk +46 -0
- package/template/base/modules/pos/models/pos_shift.rk +92 -0
- package/template/base/modules/pos/models/pos_shift_close.rk +77 -0
- package/template/base/modules/pos/module.rk +22 -0
- package/template/base/modules/pos/print/pos_receipt.html +50 -0
- package/template/base/modules/pos/print/pos_receipt.rk +9 -0
- package/template/base/modules/pos/screens/kasir.rk +41 -0
- package/template/base/modules/procurement/flows/project_vendor_cost_on_cancel.rk +22 -0
- package/template/base/modules/procurement/flows/project_vendor_cost_on_submit.rk +17 -0
- package/template/base/modules/procurement/imports/opening_stock.rk +25 -0
- package/template/base/modules/procurement/models/goods_receipt.rk +3 -1
- package/template/base/modules/procurement/models/purchase_order.rk +22 -8
- package/template/base/modules/procurement/models/purchase_request.rk +12 -1
- package/template/base/modules/procurement/models/purchase_request_item.rk +2 -0
- package/template/base/modules/procurement/models/vendor_bill.rk +117 -4
- package/template/base/modules/procurement/module.rk +7 -2
- package/template/base/modules/production/flows/batch_cancel_guard.rk +12 -0
- package/template/base/modules/production/flows/batch_from_bom.rk +19 -0
- package/template/base/modules/production/flows/wage_sheet_on_batch_cancelled.rk +14 -0
- package/template/base/modules/production/flows/wage_sheet_on_batch_submitted.rk +12 -0
- package/template/base/modules/production/flows/work_order_materials_created.rk +20 -0
- package/template/base/modules/production/flows/work_order_materials_updated.rk +20 -0
- package/template/base/modules/production/models/bom.rk +68 -0
- package/template/base/modules/production/models/bom_byproduct.rk +7 -0
- package/template/base/modules/production/models/bom_line.rk +11 -0
- package/template/base/modules/production/models/production_batch.rk +153 -0
- package/template/base/modules/production/models/production_guard.rk +23 -0
- package/template/base/modules/production/models/production_labour.rk +10 -0
- package/template/base/modules/production/models/production_material.rk +8 -0
- package/template/base/modules/production/models/production_output.rk +8 -0
- package/template/base/modules/production/models/production_stage.rk +19 -0
- package/template/base/modules/production/models/wage_line.rk +15 -0
- package/template/base/modules/production/models/wage_sheet.rk +28 -0
- package/template/base/modules/production/models/work_order.rk +63 -0
- package/template/base/modules/production/models/work_order_material.rk +8 -0
- package/template/base/modules/production/module.rk +17 -0
- package/template/base/modules/production/print/wage_sheet.html +75 -0
- package/template/base/modules/production/print/wage_sheet.rk +9 -0
- package/template/base/modules/projects/flows/attendance_close_cancel_guard.rk +15 -0
- package/template/base/modules/projects/flows/attendance_close_on_submit.rk +68 -0
- package/template/base/modules/projects/flows/attendance_log_cancel_guard.rk +14 -0
- package/template/base/modules/projects/flows/attendance_log_guard_created.rk +17 -0
- package/template/base/modules/projects/flows/attendance_log_guard_submitted.rk +38 -0
- package/template/base/modules/projects/flows/attendance_log_guard_updated.rk +15 -0
- package/template/base/modules/projects/flows/milestone_back_on_acceptance_cancel.rk +15 -0
- package/template/base/modules/projects/flows/milestone_lock_on_update.rk +16 -0
- package/template/base/modules/projects/flows/milestone_ready_on_acceptance.rk +40 -0
- package/template/base/modules/projects/flows/milestone_scheduled_on_create.rk +14 -0
- package/template/base/modules/projects/flows/milestone_scheduled_on_update.rk +27 -0
- package/template/base/modules/projects/flows/project_expense_on_cancel.rk +21 -0
- package/template/base/modules/projects/flows/project_expense_on_submit.rk +16 -0
- package/template/base/modules/projects/flows/project_labor_on_cancel.rk +22 -0
- package/template/base/modules/projects/flows/project_labor_on_submit.rk +17 -0
- package/template/base/modules/projects/flows/project_terms_lock.rk +26 -0
- package/template/base/modules/projects/flows/timesheet_assignment_on_create.rk +28 -0
- package/template/base/modules/projects/flows/timesheet_attendance_overlap_guard.rk +20 -0
- package/template/base/modules/projects/flows/vendor_bill_cancel_guard.rk +15 -0
- package/template/base/modules/projects/flows/work_site_supervisor_changed.rk +19 -0
- package/template/base/modules/projects/flows/worker_employee_changed.rk +19 -0
- package/template/base/modules/projects/imports/attendance_recap.rk +23 -0
- package/template/base/modules/projects/imports/billing_milestone.rk +20 -0
- package/template/base/modules/projects/models/assignment.rk +65 -3
- package/template/base/modules/projects/models/attendance_close.rk +67 -0
- package/template/base/modules/projects/models/attendance_guard.rk +57 -0
- package/template/base/modules/projects/models/attendance_log.rk +275 -0
- package/template/base/modules/projects/models/billing_milestone.rk +217 -0
- package/template/base/modules/projects/models/project.rk +76 -2
- package/template/base/modules/projects/models/project_expense.rk +121 -0
- package/template/base/modules/projects/models/project_guard.rk +27 -0
- package/template/base/modules/projects/models/project_ledger.rk +146 -0
- package/template/base/modules/projects/models/timesheet.rk +100 -10
- package/template/base/modules/projects/models/work_site.rk +83 -0
- package/template/base/modules/projects/module.rk +8 -3
- package/template/base/modules/projects/roles/field_worker.rk +10 -0
- package/template/base/modules/projects/roles/site_supervisor.rk +8 -0
- package/template/base/modules/projects/screens/absen.rk +23 -0
- package/template/base/modules/quotation/models/quotation.rk +20 -4
- package/template/base/modules/quotation/models/quotation_item.rk +13 -0
- package/template/base/modules/quotation/module.rk +6 -1
- package/template/base/modules/quotation/print/quotation.html +17 -3
- package/template/base/modules/rental/flows/rental_booking_on_cancel.rk +19 -0
- package/template/base/modules/rental/flows/rental_booking_on_submit.rk +45 -0
- package/template/base/modules/rental/flows/rental_checkout_on_cancel.rk +24 -0
- package/template/base/modules/rental/flows/rental_checkout_on_submit.rk +33 -0
- package/template/base/modules/rental/flows/rental_invoice_once.rk +20 -0
- package/template/base/modules/rental/flows/rental_invoice_tag_lock.rk +12 -0
- package/template/base/modules/rental/flows/rental_return_on_cancel.rk +28 -0
- package/template/base/modules/rental/flows/rental_return_on_submit.rk +45 -0
- package/template/base/modules/rental/models/rental_booking.rk +124 -0
- package/template/base/modules/rental/models/rental_checkout.rk +91 -0
- package/template/base/modules/rental/models/rental_checkout_unit.rk +22 -0
- package/template/base/modules/rental/models/rental_guard.rk +93 -0
- package/template/base/modules/rental/models/rental_item.rk +83 -0
- package/template/base/modules/rental/models/rental_return.rk +134 -0
- package/template/base/modules/rental/models/rental_return_unit.rk +29 -0
- package/template/base/modules/rental/models/rental_schedule.rk +59 -0
- package/template/base/modules/rental/models/rental_unit.rk +80 -0
- package/template/base/modules/rental/module.rk +25 -0
- package/template/base/modules/rental/print/rental_bast_in.html +107 -0
- package/template/base/modules/rental/print/rental_bast_in.rk +9 -0
- package/template/base/modules/rental/print/rental_bast_out.html +98 -0
- package/template/base/modules/rental/print/rental_bast_out.rk +11 -0
- package/template/base/modules/rental/roles/rental_staff.rk +7 -0
- package/template/base/modules/rental/screens/alat_keluar.rk +19 -0
- package/template/base/modules/rental/screens/alat_kembali.rk +19 -0
- package/template/base/modules/rental/screens/jadwal_alat.rk +21 -0
- package/template/base/modules/stock/flows/adjustment_value_backfill.rk +95 -0
- package/template/base/modules/stock/flows/adjustment_value_on_cancel.rk +19 -0
- package/template/base/modules/stock/flows/adjustment_value_on_submit.rk +17 -0
- package/template/base/modules/stock/models/recipe.rk +8 -0
- package/template/base/modules/stock/models/stock_adjustment.rk +1 -0
- package/template/base/modules/stock/models/stock_adjustment_value.rk +80 -0
- package/template/base/modules/stock/models/stock_balance.rk +6 -2
- package/template/base/modules/stock/models/stock_count.rk +2 -0
- package/template/base/modules/stock/models/stock_move.rk +17 -5
- package/template/base/modules/stock/models/stock_transfer_item.rk +1 -1
- package/template/base/modules/stock/module.rk +7 -2
- package/template/base/modules/subscriptions/flows/collector_deposit_on_submit.rk +57 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_kept.rk +17 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_not_cancelled.rk +14 -0
- package/template/base/modules/subscriptions/flows/deposit_payment_not_deleted.rk +14 -0
- package/template/base/modules/subscriptions/flows/field_collection_cap_created.rk +24 -0
- package/template/base/modules/subscriptions/flows/field_collection_cap_updated.rk +24 -0
- package/template/base/modules/subscriptions/flows/field_collection_locked.rk +12 -0
- package/template/base/modules/subscriptions/flows/field_collection_not_deleted.rk +10 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_kept.rk +19 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_once.rk +34 -0
- package/template/base/modules/subscriptions/flows/invoice_subscription_tag_lock.rk +13 -0
- package/template/base/modules/subscriptions/flows/service_area_collector.rk +14 -0
- package/template/base/modules/subscriptions/flows/subscription_billing.rk +79 -0
- package/template/base/modules/subscriptions/flows/subscription_dunning.rk +81 -0
- package/template/base/modules/subscriptions/flows/subscription_extra_locked.rk +14 -0
- package/template/base/modules/subscriptions/flows/subscription_status_on_payment.rk +48 -0
- package/template/base/modules/subscriptions/models/collection_visit.rk +47 -0
- package/template/base/modules/subscriptions/models/collector_deposit.rk +36 -0
- package/template/base/modules/subscriptions/models/field_collection.rk +42 -0
- package/template/base/modules/subscriptions/models/service_area.rk +19 -0
- package/template/base/modules/subscriptions/models/subscription.rk +235 -0
- package/template/base/modules/subscriptions/models/subscription_bill.rk +48 -0
- package/template/base/modules/subscriptions/models/subscription_extra.rk +50 -0
- package/template/base/modules/subscriptions/models/subscription_guard.rk +65 -0
- package/template/base/modules/subscriptions/models/subscription_month.rk +29 -0
- package/template/base/modules/subscriptions/models/subscription_plan.rk +75 -0
- package/template/base/modules/subscriptions/models/subscription_status_log.rk +27 -0
- package/template/base/modules/subscriptions/module.rk +18 -0
- package/template/base/modules/subscriptions/roles/collector.rk +7 -0
- package/template/base/modules/subscriptions/screens/catat_tagih.rk +18 -0
- package/template/base/modules/subscriptions/screens/rute_tagih.rk +25 -0
- package/template/base/modules/tax_id/module.rk +5 -0
- package/template/base/modules/users/models/user.rk +35 -4
- package/template/base/modules/users/models/user_outlet.rk +6 -0
- package/template/base/modules/users/module.rk +8 -2
- package/template/base/modules/users/roles/cashier.rk +8 -0
- package/template/base/modules/users/roles/course_admin.rk +4 -0
- package/template/base/modules/users/roles/field_sales.rk +7 -0
- package/template/base/modules/workforce/imports/worker_list.rk +21 -0
- package/template/base/modules/workforce/models/certification.rk +1 -2
- package/template/base/modules/workforce/models/worker.rk +54 -4
- package/template/base/modules/workforce/module.rk +6 -1
- package/template/demo/fixtures/demo.rk +2 -2
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: project_expense
|
|
3
|
+
label: {id: Biaya proyek, en: Project expense}
|
|
4
|
+
icon: invoice
|
|
5
|
+
is_submittable: true
|
|
6
|
+
naming: EXP-{YYYY}-{#####}
|
|
7
|
+
title_field: description
|
|
8
|
+
# A cost spent on a project outside a vendor bill (travel, lodging, printing, a freelancer paid in cash), and whether
|
|
9
|
+
# it is billed on to the client. A reimbursable cost needs its receipt. Margin always counts this record at its own
|
|
10
|
+
# full amount. A vendor bill may be linked only when it is submitted and carries no project (so its cost reaches the
|
|
11
|
+
# project through this record); a bill of this project is counted on its own and is never linked here. A linked bill
|
|
12
|
+
# cannot be cancelled while this record is live (flow vendor_bill_cancel_guard), so it cannot come back with the
|
|
13
|
+
# project and be counted twice. On the invoice a re-billed cost is a line marked pph23_exclude (Bukan dasar PPh 23),
|
|
14
|
+
# so PPh 23 is not withheld on it.
|
|
15
|
+
permissions:
|
|
16
|
+
- {role: project_admin, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
17
|
+
- {role: finance_manager, read: true, create: true, write: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
18
|
+
# Sales reads only the costs billed on to the client (they go on its invoice anyway); internal costs next to the
|
|
19
|
+
# revenue rows it reads in project_ledger would show it the margin (audit L1, t_23057937).
|
|
20
|
+
- {role: sales_manager, read: true, if: reimbursable}
|
|
21
|
+
# Purchasing reads only expenses that link a vendor bill: the guard flow on a bill's cancel looks for those, as them.
|
|
22
|
+
- {role: purchasing_manager, read: true, if: vendor_bill != ''}
|
|
23
|
+
fields:
|
|
24
|
+
- name: project
|
|
25
|
+
type: link
|
|
26
|
+
to: project
|
|
27
|
+
label: {id: Proyek}
|
|
28
|
+
required: true
|
|
29
|
+
in_list: true
|
|
30
|
+
- name: expense_date
|
|
31
|
+
type: date
|
|
32
|
+
label: {id: Tanggal}
|
|
33
|
+
required: true
|
|
34
|
+
default: today()
|
|
35
|
+
in_list: true
|
|
36
|
+
- name: category
|
|
37
|
+
type: select
|
|
38
|
+
label: {id: Jenis biaya}
|
|
39
|
+
default: "'other'"
|
|
40
|
+
in_list: true
|
|
41
|
+
options:
|
|
42
|
+
- {value: travel, label: {id: Perjalanan}}
|
|
43
|
+
- {value: lodging, label: {id: Penginapan}}
|
|
44
|
+
- {value: printing, label: {id: Cetak dan dokumen}}
|
|
45
|
+
- {value: subcontract, label: {id: Pihak ketiga}}
|
|
46
|
+
- {value: other, label: {id: Lainnya}}
|
|
47
|
+
- name: description
|
|
48
|
+
type: text
|
|
49
|
+
label: {id: Uraian}
|
|
50
|
+
required: true
|
|
51
|
+
- name: vendor
|
|
52
|
+
type: link
|
|
53
|
+
to: vendor
|
|
54
|
+
label: {id: Pemasok}
|
|
55
|
+
- name: vendor_bill
|
|
56
|
+
type: link
|
|
57
|
+
to: vendor_bill
|
|
58
|
+
label: {id: Tagihan pemasok}
|
|
59
|
+
help: {id: 'Tagihan pemasok tanpa proyek yang menjadi bukti biaya ini. Tagihan yang sudah berproyek tidak perlu dicatat sebagai biaya proyek'}
|
|
60
|
+
- name: amount
|
|
61
|
+
type: currency
|
|
62
|
+
label: {id: Biaya}
|
|
63
|
+
in_list: true
|
|
64
|
+
- name: reimbursable
|
|
65
|
+
type: check
|
|
66
|
+
label: {id: Ditagihkan ke klien}
|
|
67
|
+
default: 'false'
|
|
68
|
+
- name: markup_percent
|
|
69
|
+
type: percent
|
|
70
|
+
label: {id: Markup %}
|
|
71
|
+
default: '0'
|
|
72
|
+
depends_on: reimbursable
|
|
73
|
+
- name: rebill_amount
|
|
74
|
+
type: currency
|
|
75
|
+
label: {id: Ditagihkan}
|
|
76
|
+
compute: "reimbursable ? round(amount * (1 + markup_percent / 100)) : 0"
|
|
77
|
+
in_list: true
|
|
78
|
+
- name: receipt
|
|
79
|
+
type: attach
|
|
80
|
+
label: {id: 'Bukti (kuitansi, nota)'}
|
|
81
|
+
- name: rebill_invoice
|
|
82
|
+
type: link
|
|
83
|
+
to: sales_invoice
|
|
84
|
+
label: {id: Faktur penagihan}
|
|
85
|
+
depends_on: reimbursable
|
|
86
|
+
rules:
|
|
87
|
+
- name: amount_positive
|
|
88
|
+
on: save
|
|
89
|
+
check: amount > 0
|
|
90
|
+
message: {id: Biaya harus lebih dari 0}
|
|
91
|
+
- name: markup_range
|
|
92
|
+
on: save
|
|
93
|
+
check: markup_percent >= 0 && markup_percent <= 100
|
|
94
|
+
message: {id: 'Markup harus 0 sampai 100%'}
|
|
95
|
+
- name: receipt_for_rebill
|
|
96
|
+
on: save
|
|
97
|
+
check: "!reimbursable || receipt != ''"
|
|
98
|
+
message: {id: Biaya yang ditagihkan ke klien wajib punya bukti}
|
|
99
|
+
- name: rebill_same_project
|
|
100
|
+
on: save
|
|
101
|
+
check: rebill_invoice == '' || rebill_invoice.project == project
|
|
102
|
+
message: {id: Faktur penagihan harus untuk proyek yang sama}
|
|
103
|
+
- name: bill_same_project
|
|
104
|
+
on: save
|
|
105
|
+
check: vendor_bill == '' || (vendor_bill.project == '' && vendor_bill.docstatus == 1)
|
|
106
|
+
message: {id: 'Tautkan hanya tagihan pemasok yang sudah diajukan dan tanpa proyek (tagihan berproyek dihitung sendiri)'}
|
|
107
|
+
views:
|
|
108
|
+
list:
|
|
109
|
+
columns: [name, project, expense_date, category, amount, rebill_amount, status]
|
|
110
|
+
filters: [project, category, reimbursable]
|
|
111
|
+
sort: -expense_date
|
|
112
|
+
form:
|
|
113
|
+
layout:
|
|
114
|
+
- section: {id: Biaya}
|
|
115
|
+
columns:
|
|
116
|
+
- [project, expense_date, category, description]
|
|
117
|
+
- [amount, vendor, vendor_bill, receipt]
|
|
118
|
+
- section: {id: Tagih ke klien}
|
|
119
|
+
columns:
|
|
120
|
+
- [reimbursable, markup_percent]
|
|
121
|
+
- [rebill_amount, rebill_invoice]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: project_guard
|
|
3
|
+
label: {id: Penjaga proyek, en: Project guard}
|
|
4
|
+
icon: check
|
|
5
|
+
naming: GRD-{######}
|
|
6
|
+
title_field: reason
|
|
7
|
+
# Never stored: a flow that must refuse the document it runs in creates one of these with a reason, and the matching
|
|
8
|
+
# rule fails with that reason's message, which rolls the whole save back (the flow runs inside it). Create is granted
|
|
9
|
+
# to the roles whose actions run such a flow.
|
|
10
|
+
permissions:
|
|
11
|
+
- {role: purchasing_manager, create: true}
|
|
12
|
+
- {role: finance_manager, create: true}
|
|
13
|
+
fields:
|
|
14
|
+
- name: reason
|
|
15
|
+
type: select
|
|
16
|
+
label: {id: Alasan}
|
|
17
|
+
required: true
|
|
18
|
+
options:
|
|
19
|
+
- {value: bill_has_expense, label: {id: Tagihan dipakai biaya proyek}}
|
|
20
|
+
- name: document
|
|
21
|
+
type: data
|
|
22
|
+
label: {id: Dokumen}
|
|
23
|
+
rules:
|
|
24
|
+
- name: bill_has_expense
|
|
25
|
+
on: save
|
|
26
|
+
check: reason != 'bill_has_expense'
|
|
27
|
+
message: {id: 'Tagihan ini dipakai biaya proyek yang masih aktif; batalkan biaya proyek itu dulu'}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: project_ledger
|
|
3
|
+
label: {id: Buku untung proyek, en: Project ledger}
|
|
4
|
+
icon: chart
|
|
5
|
+
naming: PL-{YYYY}-{######}
|
|
6
|
+
title_field: project
|
|
7
|
+
# append_only (contract 0026): rows are created only by the flows the kernel starts on the source document's events (and
|
|
8
|
+
# the schedule); nobody, the owner included, creates, edits or deletes one through the API, an import or a flow run by
|
|
9
|
+
# hand. A correction is the reversing row written when the source document is cancelled.
|
|
10
|
+
append_only: true
|
|
11
|
+
# One signed row per submitted document that changes a project's result: revenue + (invoice dpp, retention releases
|
|
12
|
+
# excluded), costs - (timesheet cost, project expense not on a vendor bill, vendor bill dpp). Cancelling the document
|
|
13
|
+
# writes the opposite row on the document's own date, so the sum per project (and per period) is its margin. Rows are
|
|
14
|
+
# written by flows inside the document's submit or cancel. A flow runs as the person submitting, so those roles hold
|
|
15
|
+
# create, and a rule cannot tell a flow from a person; the rules therefore make every row true to its document:
|
|
16
|
+
# - a post row links its source document, on the same project, submitted, with exactly the document's amount and
|
|
17
|
+
# date; one per document (entry_key = source:post);
|
|
18
|
+
# - a reverse row links the post row it reverses (reverses, unique) for the same document, now cancelled, with the
|
|
19
|
+
# opposite amount; one per post row (entry_key = source:reverse).
|
|
20
|
+
# So each cancelled document has exactly one reversal, and only if it had a post row: a document submitted before
|
|
21
|
+
# this model existed has none, and none can be reversed by hand. The only row a person could add by hand is a true
|
|
22
|
+
# post row for such an old, still submitted document.
|
|
23
|
+
permissions:
|
|
24
|
+
- {role: project_admin, read: true, create: true, export: true}
|
|
25
|
+
- {role: finance_manager, read: true, create: true, export: true}
|
|
26
|
+
# Sales and purchasing read (and their flows write) only the rows of their own documents: labour rows carry pay and
|
|
27
|
+
# cost rows the firm's margin (audit L1). Read stays because the cancel flows find the row they reverse as the person
|
|
28
|
+
# cancelling. No export for sales.
|
|
29
|
+
- {role: sales_manager, read: true, create: true, if: kind == 'revenue'}
|
|
30
|
+
- {role: purchasing_manager, read: true, create: true, if: kind == 'vendor'}
|
|
31
|
+
fields:
|
|
32
|
+
- name: project
|
|
33
|
+
type: link
|
|
34
|
+
to: project
|
|
35
|
+
label: {id: Proyek}
|
|
36
|
+
required: true
|
|
37
|
+
in_list: true
|
|
38
|
+
- name: posting_date
|
|
39
|
+
type: date
|
|
40
|
+
label: {id: Tanggal}
|
|
41
|
+
required: true
|
|
42
|
+
in_list: true
|
|
43
|
+
- name: kind
|
|
44
|
+
type: select
|
|
45
|
+
label: {id: Jenis}
|
|
46
|
+
required: true
|
|
47
|
+
in_list: true
|
|
48
|
+
chip: true
|
|
49
|
+
options:
|
|
50
|
+
- {value: revenue, label: {id: Pendapatan}}
|
|
51
|
+
- {value: labor, label: {id: Biaya tenaga kerja}}
|
|
52
|
+
- {value: expense, label: {id: Biaya proyek}}
|
|
53
|
+
- {value: vendor, label: {id: Biaya pemasok}}
|
|
54
|
+
# Payroll (module payroll): the employer cost of a closed payroll run beyond what its recaps booked.
|
|
55
|
+
- {value: payroll, label: {id: Biaya gaji tambahan}}
|
|
56
|
+
- name: source_model
|
|
57
|
+
type: data
|
|
58
|
+
label: {id: Dokumen}
|
|
59
|
+
required: true
|
|
60
|
+
- name: source_name
|
|
61
|
+
type: data
|
|
62
|
+
label: {id: No. dokumen}
|
|
63
|
+
required: true
|
|
64
|
+
in_list: true
|
|
65
|
+
- name: sales_invoice
|
|
66
|
+
type: link
|
|
67
|
+
to: sales_invoice
|
|
68
|
+
label: {id: Faktur}
|
|
69
|
+
- name: timesheet
|
|
70
|
+
type: link
|
|
71
|
+
to: timesheet
|
|
72
|
+
label: {id: Timesheet}
|
|
73
|
+
- name: project_expense
|
|
74
|
+
type: link
|
|
75
|
+
to: project_expense
|
|
76
|
+
label: {id: Biaya proyek}
|
|
77
|
+
- name: vendor_bill
|
|
78
|
+
type: link
|
|
79
|
+
to: vendor_bill
|
|
80
|
+
label: {id: Tagihan pemasok}
|
|
81
|
+
- name: payroll_close
|
|
82
|
+
type: link
|
|
83
|
+
to: payroll_close
|
|
84
|
+
label: {id: Tutup periode gaji}
|
|
85
|
+
- name: entry
|
|
86
|
+
type: select
|
|
87
|
+
label: {id: Baris}
|
|
88
|
+
default: "'post'"
|
|
89
|
+
options:
|
|
90
|
+
- {value: post, label: {id: Diajukan}}
|
|
91
|
+
- {value: reverse, label: {id: Pembalik}}
|
|
92
|
+
- name: reverses
|
|
93
|
+
type: link
|
|
94
|
+
to: project_ledger
|
|
95
|
+
label: {id: Membalik baris}
|
|
96
|
+
unique: true
|
|
97
|
+
- name: source_status
|
|
98
|
+
type: int
|
|
99
|
+
label: {id: Status dokumen}
|
|
100
|
+
hidden: true
|
|
101
|
+
compute: "kind == 'revenue' ? sales_invoice.docstatus : (kind == 'labor' ? timesheet.docstatus : (kind == 'expense' ? project_expense.docstatus : (kind == 'payroll' ? payroll_close.docstatus : vendor_bill.docstatus)))"
|
|
102
|
+
- name: source_amount
|
|
103
|
+
type: currency
|
|
104
|
+
label: {id: Nilai dokumen}
|
|
105
|
+
hidden: true
|
|
106
|
+
compute: "kind == 'revenue' ? sales_invoice.dpp : (kind == 'labor' ? 0 - timesheet.cost_amount : (kind == 'expense' ? 0 - project_expense.amount : (kind == 'payroll' ? 0 - payroll_close.extra_cost : 0 - vendor_bill.dpp)))"
|
|
107
|
+
- name: source_date
|
|
108
|
+
type: date
|
|
109
|
+
label: {id: Tanggal dokumen}
|
|
110
|
+
hidden: true
|
|
111
|
+
compute: "kind == 'revenue' ? sales_invoice.posting_date : (kind == 'labor' ? timesheet.work_date : (kind == 'expense' ? project_expense.expense_date : (kind == 'payroll' ? payroll_close.period_to : vendor_bill.bill_date)))"
|
|
112
|
+
- name: entry_key
|
|
113
|
+
type: data
|
|
114
|
+
label: {id: Kunci baris}
|
|
115
|
+
hidden: true
|
|
116
|
+
unique: true
|
|
117
|
+
compute: "source_name + ':' + entry"
|
|
118
|
+
- name: amount
|
|
119
|
+
type: currency
|
|
120
|
+
label: {id: 'Nilai (+ pendapatan, - biaya)'}
|
|
121
|
+
in_list: true
|
|
122
|
+
rules:
|
|
123
|
+
- name: source_matches
|
|
124
|
+
on: save
|
|
125
|
+
check: >-
|
|
126
|
+
(kind == 'revenue' && sales_invoice != '' && source_name == sales_invoice && sales_invoice.project == project && sales_invoice.kind != 'retention')
|
|
127
|
+
|| (kind == 'labor' && timesheet != '' && source_name == timesheet && timesheet.project == project)
|
|
128
|
+
|| (kind == 'expense' && project_expense != '' && source_name == project_expense && project_expense.project == project)
|
|
129
|
+
|| (kind == 'vendor' && vendor_bill != '' && source_name == vendor_bill && vendor_bill.project == project)
|
|
130
|
+
|| (kind == 'payroll' && payroll_close != '' && source_name == payroll_close && payroll_close.project == project)
|
|
131
|
+
message: {id: Baris buku untung proyek harus menunjuk dokumen sumbernya di proyek yang sama}
|
|
132
|
+
- name: post_matches_document
|
|
133
|
+
on: save
|
|
134
|
+
check: entry != 'post' || (reverses == '' && source_status == 1 && amount == source_amount && posting_date == source_date)
|
|
135
|
+
message: {id: Baris diajukan hanya untuk dokumen yang diajukan dengan nilai yang sama}
|
|
136
|
+
- name: reverse_matches_post
|
|
137
|
+
on: save
|
|
138
|
+
check: >-
|
|
139
|
+
entry != 'reverse' || (reverses != '' && source_status == 2 && reverses.entry == 'post' && reverses.source_name == source_name
|
|
140
|
+
&& reverses.kind == kind && reverses.project == project && amount == 0 - reverses.amount && posting_date == reverses.posting_date)
|
|
141
|
+
message: {id: Baris pembalik hanya untuk dokumen yang dibatalkan dan harus menunjuk baris aslinya}
|
|
142
|
+
views:
|
|
143
|
+
list:
|
|
144
|
+
columns: [name, project, posting_date, kind, entry, source_name, amount]
|
|
145
|
+
filters: [project, kind]
|
|
146
|
+
sort: -posting_date
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
2
|
name: timesheet
|
|
3
|
-
label: {id: Timesheet}
|
|
3
|
+
label: {id: Absensi, en: Timesheet}
|
|
4
4
|
icon: calendar
|
|
5
5
|
is_submittable: true
|
|
6
6
|
naming: TS-{YYYY}-{#####}
|
|
7
7
|
title_field: worker
|
|
8
8
|
permissions:
|
|
9
|
-
- {role: project_admin, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, print: true}
|
|
10
|
-
|
|
9
|
+
- {role: project_admin, read: true, create: true, write: true, delete: true, submit: true, cancel: true, amend: true, export: true, import: true, print: true}
|
|
10
|
+
# No sales_manager: a timesheet carries pay and cost (audit L1).
|
|
11
11
|
- {role: finance_manager, read: true}
|
|
12
12
|
fields:
|
|
13
13
|
- name: project
|
|
@@ -31,11 +31,21 @@ fields:
|
|
|
31
31
|
label: {id: Tanggal kerja}
|
|
32
32
|
required: true
|
|
33
33
|
in_list: true
|
|
34
|
+
# A monthly recap (G7): work_date is the first day of the cut-off period and period_to its last (21 Oct to 20 Nov,
|
|
35
|
+
# or a calendar month), days the days present in it. Empty period_to = one day, as before.
|
|
36
|
+
- name: period_to
|
|
37
|
+
type: date
|
|
38
|
+
label: {id: Sampai tanggal (rekap)}
|
|
39
|
+
in_list: true
|
|
34
40
|
- name: days
|
|
35
41
|
type: float
|
|
36
42
|
label: {id: Hari kerja}
|
|
37
43
|
default: '1'
|
|
38
44
|
in_list: true
|
|
45
|
+
- name: overtime_hours
|
|
46
|
+
type: float
|
|
47
|
+
label: {id: Jam lembur}
|
|
48
|
+
default: '0'
|
|
39
49
|
- name: hours
|
|
40
50
|
type: float
|
|
41
51
|
label: {id: Jam}
|
|
@@ -43,6 +53,12 @@ fields:
|
|
|
43
53
|
type: text
|
|
44
54
|
label: {id: Uraian pekerjaan}
|
|
45
55
|
required: true
|
|
56
|
+
# Made by a field attendance close (attendance_close_on_submit) from the daily logs; empty for typed or imported recaps.
|
|
57
|
+
- name: attendance_close
|
|
58
|
+
type: link
|
|
59
|
+
to: attendance_close
|
|
60
|
+
label: {id: Rekap absen lapangan}
|
|
61
|
+
read_only: true
|
|
46
62
|
- name: evidence
|
|
47
63
|
type: attach
|
|
48
64
|
label: {id: Bukti kerja}
|
|
@@ -53,30 +69,104 @@ fields:
|
|
|
53
69
|
- name: day_rate
|
|
54
70
|
type: currency
|
|
55
71
|
label: {id: Tarif per hari}
|
|
56
|
-
default: assignment.day_rate
|
|
72
|
+
default: "assignment != '' ? assignment.day_rate : worker.day_rate"
|
|
73
|
+
# Per hour when the assignment bills per hour (consultants); per day otherwise, as before.
|
|
74
|
+
- name: rate_basis
|
|
75
|
+
type: select
|
|
76
|
+
label: {id: Satuan tarif}
|
|
77
|
+
default: "assignment != '' ? assignment.rate_basis : 'day'"
|
|
78
|
+
options:
|
|
79
|
+
- {value: day, label: {id: Per hari}}
|
|
80
|
+
- {value: hour, label: {id: Per jam}}
|
|
81
|
+
- name: hour_rate
|
|
82
|
+
type: currency
|
|
83
|
+
label: {id: Tarif per jam}
|
|
84
|
+
default: "assignment != '' ? assignment.hour_rate : worker.hour_rate"
|
|
85
|
+
# The pay copied from the worker (cost_*) keeps the worker's hidden_for (contract 0027 enforces it; a copy without
|
|
86
|
+
# hidden_for would show the pay here).
|
|
87
|
+
- name: cost_rate
|
|
88
|
+
type: currency
|
|
89
|
+
label: {id: Biaya per satuan}
|
|
90
|
+
hidden_for: [sales_manager, purchasing_manager, head_office, outlet_staff, sales_rep, field_worker, site_supervisor]
|
|
91
|
+
default: "assignment != '' ? assignment.cost_rate : (rate_basis == 'hour' ? worker.cost_hour_rate : worker.cost_day_rate)"
|
|
92
|
+
- name: overtime_rate
|
|
93
|
+
type: currency
|
|
94
|
+
label: {id: Tarif jual lembur per jam}
|
|
95
|
+
default: "assignment != '' ? assignment.overtime_rate : worker.overtime_rate"
|
|
96
|
+
- name: overtime_cost_rate
|
|
97
|
+
type: currency
|
|
98
|
+
label: {id: Upah lembur per jam}
|
|
99
|
+
hidden_for: [sales_manager, purchasing_manager, head_office, outlet_staff, sales_rep, field_worker, site_supervisor]
|
|
100
|
+
default: "assignment != '' ? assignment.overtime_cost_rate : worker.overtime_cost_rate"
|
|
57
101
|
- name: amount
|
|
58
102
|
type: currency
|
|
59
103
|
label: {id: Jumlah}
|
|
60
|
-
compute: round(days * day_rate)
|
|
104
|
+
compute: "(rate_basis == 'hour' ? round(hours * hour_rate) : round(days * day_rate)) + round(overtime_hours * overtime_rate)"
|
|
61
105
|
in_list: true
|
|
106
|
+
- name: cost_amount
|
|
107
|
+
type: currency
|
|
108
|
+
label: {id: Biaya}
|
|
109
|
+
hidden_for: [sales_manager, purchasing_manager, head_office, outlet_staff, sales_rep, field_worker, site_supervisor]
|
|
110
|
+
compute: "round((rate_basis == 'hour' ? hours : days) * cost_rate) + round(overtime_hours * overtime_cost_rate)"
|
|
111
|
+
# No pay entered for this work (G5): the cost is not 0, it is unknown. The project margin dashboard counts these so
|
|
112
|
+
# a margin without labour cost is read as incomplete; fix the pay on the worker, then cancel and amend.
|
|
113
|
+
- name: cost_missing
|
|
114
|
+
type: check
|
|
115
|
+
label: {id: Upah belum diisi}
|
|
116
|
+
compute: "cost_rate == 0 || (overtime_hours > 0 && overtime_cost_rate == 0)"
|
|
117
|
+
- name: billable_amount
|
|
118
|
+
type: currency
|
|
119
|
+
label: {id: Jumlah dapat ditagih}
|
|
120
|
+
compute: "billable ? amount : 0"
|
|
62
121
|
rules:
|
|
122
|
+
- name: rates_not_negative
|
|
123
|
+
on: save
|
|
124
|
+
check: day_rate >= 0 && hour_rate >= 0 && cost_rate >= 0 && overtime_rate >= 0 && overtime_cost_rate >= 0
|
|
125
|
+
message: {id: 'Tarif dan upah tidak boleh negatif'}
|
|
63
126
|
- name: days_range
|
|
64
127
|
on: save
|
|
65
|
-
check: days > 0 && days <= 1.5
|
|
128
|
+
check: rate_basis == 'hour' || period_to != '' || (days > 0 && days <= 1.5)
|
|
66
129
|
message: {id: 'Hari kerja harus lebih dari 0 dan paling banyak 1,5'}
|
|
130
|
+
# A recap covers at most 31 days, never runs backwards, and cannot hold more days present than days in the period.
|
|
131
|
+
# date + duration drops a fraction of a day, so days are rounded up first (round(x + 0.49): 1,5 -> 2, 1,9 -> 2).
|
|
132
|
+
- name: recap_period
|
|
133
|
+
on: save
|
|
134
|
+
check: period_to == '' || (period_to >= work_date && period_to < work_date + duration(31))
|
|
135
|
+
message: {id: 'Periode rekap: sampai tanggal tidak boleh sebelum tanggal mulai, paling lama 31 hari'}
|
|
136
|
+
- name: recap_days
|
|
137
|
+
on: save
|
|
138
|
+
check: >-
|
|
139
|
+
period_to == '' || rate_basis == 'hour'
|
|
140
|
+
|| (days >= 0 && (days > 0 || overtime_hours > 0) && work_date + duration(round(days + 0.49) - 1) <= period_to)
|
|
141
|
+
message: {id: 'Hari hadir rekap harus lebih dari 0 dan tidak melebihi jumlah hari di periodenya'}
|
|
142
|
+
- name: overtime_range
|
|
143
|
+
on: save
|
|
144
|
+
check: "overtime_hours >= 0 && (period_to == '' ? overtime_hours <= 24 : work_date + duration(round(overtime_hours / 24 + 0.49) - 1) <= period_to)"
|
|
145
|
+
message: {id: 'Jam lembur tidak boleh negatif atau melebihi jam di periodenya'}
|
|
146
|
+
- name: hour_rate_for_billable_hours
|
|
147
|
+
on: save
|
|
148
|
+
check: rate_basis != 'hour' || !billable || hour_rate > 0
|
|
149
|
+
message: {id: 'Timesheet per jam yang ditagih butuh tarif per jam (isi di tenaga kerja atau penugasan)'}
|
|
150
|
+
- name: hours_range
|
|
151
|
+
on: save
|
|
152
|
+
check: "rate_basis != 'hour' || (hours > 0 && hours <= (period_to == '' ? 24 : 744))"
|
|
153
|
+
message: {id: 'Jam kerja harus lebih dari 0 dan paling banyak 24 per hari'}
|
|
67
154
|
views:
|
|
68
155
|
list:
|
|
69
|
-
columns: [name, project, worker, work_date, days, status, amount]
|
|
156
|
+
columns: [name, project, worker, work_date, period_to, days, status, amount]
|
|
70
157
|
sort: -work_date
|
|
71
158
|
form:
|
|
72
159
|
layout:
|
|
73
160
|
- section: {id: Timesheet}
|
|
74
161
|
columns:
|
|
75
162
|
- [project, worker, assignment]
|
|
76
|
-
- [work_date, days, hours]
|
|
163
|
+
- [work_date, period_to, days, hours, overtime_hours]
|
|
77
164
|
- section: {id: Pekerjaan}
|
|
78
165
|
columns:
|
|
79
|
-
- [description, evidence]
|
|
166
|
+
- [description, evidence, attendance_close]
|
|
80
167
|
- section: {id: Tagihan}
|
|
81
168
|
columns:
|
|
82
|
-
- [billable, day_rate, amount]
|
|
169
|
+
- [billable, rate_basis, day_rate, hour_rate, overtime_rate, amount]
|
|
170
|
+
- section: {id: Upah (biaya internal)}
|
|
171
|
+
columns:
|
|
172
|
+
- [cost_rate, overtime_cost_rate, cost_amount, cost_missing]
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
|
|
2
|
+
name: work_site
|
|
3
|
+
label: {id: Lokasi kerja, en: Work site}
|
|
4
|
+
icon: map
|
|
5
|
+
naming: LOK-{###}
|
|
6
|
+
title_field: site_name
|
|
7
|
+
# Where workers clock in: a client's factory, a building a guard keeps, an office a cleaner works in (A2, plans/layar-kerja.md
|
|
8
|
+
# §4.1, the `site` slot of the clock screen in contract 0030). A clock-in further than radius_m from the point (lat, lng) is
|
|
9
|
+
# kept, not refused, and waits for the site supervisor (attendance_log). The site supervisor is the employee record named in
|
|
10
|
+
# `supervisor` (rangka-os contract 0056: a member's outlets are outlet records only, so sites are no longer kept there); their
|
|
11
|
+
# row scope is the sites, assignments and logs that name them, see roles/site_supervisor.rk.
|
|
12
|
+
permissions:
|
|
13
|
+
- {role: project_admin, read: true, create: true, write: true, delete: true, export: true, print: true}
|
|
14
|
+
- {role: finance_manager, read: true}
|
|
15
|
+
# A site supervisor reads only their own sites (row scope by name). A worker reads the point of their own site through
|
|
16
|
+
# the assignment (site_lat, site_lng, site_radius_m), not the list of the firm's client sites.
|
|
17
|
+
- {role: site_supervisor, read: true}
|
|
18
|
+
fields:
|
|
19
|
+
- name: site_name
|
|
20
|
+
type: data
|
|
21
|
+
label: {id: Nama lokasi}
|
|
22
|
+
required: true
|
|
23
|
+
in_list: true
|
|
24
|
+
- name: customer
|
|
25
|
+
type: link
|
|
26
|
+
to: customer
|
|
27
|
+
label: {id: Klien}
|
|
28
|
+
in_list: true
|
|
29
|
+
# The mandor or danru of this site (an employee in Tim with the role Pengawas lokasi): sees its logs and decides the held
|
|
30
|
+
# ones. One supervisor per site; a supervisor may keep several sites. Name them before the workers clock in: each log keeps
|
|
31
|
+
# the supervisor of its clock-in, and flow work_site_supervisor_changed hands the running assignments to a new one.
|
|
32
|
+
- name: supervisor
|
|
33
|
+
type: link
|
|
34
|
+
to: user
|
|
35
|
+
label: {id: Pengawas lokasi}
|
|
36
|
+
in_list: true
|
|
37
|
+
- name: address
|
|
38
|
+
type: text
|
|
39
|
+
label: {id: Alamat}
|
|
40
|
+
# Decimal degrees, as a phone's GPS or a map gives them (Karawang is about -6.3, 107.3).
|
|
41
|
+
- name: lat
|
|
42
|
+
type: float
|
|
43
|
+
label: {id: Lintang (lat)}
|
|
44
|
+
required: true
|
|
45
|
+
- name: lng
|
|
46
|
+
type: float
|
|
47
|
+
label: {id: Bujur (lng)}
|
|
48
|
+
required: true
|
|
49
|
+
# The point as a position (contract 0030 §4 geo) for distance_m and the clock screen's site slot.
|
|
50
|
+
- {name: point, type: geo, label: {id: Titik lokasi}, read_only: true, compute: "{'lat': lat, 'lng': lng}"}
|
|
51
|
+
- name: radius_m
|
|
52
|
+
type: int
|
|
53
|
+
label: {id: Radius absen (meter)}
|
|
54
|
+
default: '150'
|
|
55
|
+
in_list: true
|
|
56
|
+
- name: active
|
|
57
|
+
type: check
|
|
58
|
+
label: {id: Aktif}
|
|
59
|
+
default: 'true'
|
|
60
|
+
in_list: true
|
|
61
|
+
- name: notes
|
|
62
|
+
type: text
|
|
63
|
+
label: {id: Catatan}
|
|
64
|
+
rules:
|
|
65
|
+
- name: point_valid
|
|
66
|
+
on: save
|
|
67
|
+
check: lat >= -90 && lat <= 90 && lng >= -180 && lng <= 180 && (lat != 0 || lng != 0)
|
|
68
|
+
message: {id: 'Titik lokasi tidak valid: lintang -90 sampai 90, bujur -180 sampai 180'}
|
|
69
|
+
- name: radius_range
|
|
70
|
+
on: save
|
|
71
|
+
check: radius_m >= 20 && radius_m <= 5000
|
|
72
|
+
message: {id: 'Radius absen 20 sampai 5000 meter'}
|
|
73
|
+
views:
|
|
74
|
+
list:
|
|
75
|
+
columns: [name, site_name, customer, radius_m, active]
|
|
76
|
+
form:
|
|
77
|
+
layout:
|
|
78
|
+
- section: {id: Lokasi}
|
|
79
|
+
columns:
|
|
80
|
+
- [site_name, customer, active]
|
|
81
|
+
- [lat, lng, radius_m]
|
|
82
|
+
- section: {id: Alamat}
|
|
83
|
+
fields: [address, notes]
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
|
|
2
2
|
name: projects
|
|
3
|
-
version: 1.
|
|
3
|
+
version: 1.3.0
|
|
4
4
|
title: {id: Proyek, en: Projects}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
summary:
|
|
6
|
+
id: Proyek dengan penugasan, absensi, biaya, termin tagihan dan untung per proyek.
|
|
7
|
+
en: Projects with assignments, attendance, costs, milestone billing and profit per project.
|
|
8
|
+
category: operations
|
|
9
|
+
icon: briefcase-line
|
|
10
|
+
requires: {rangka: '>=0.5', contacts: ^1.0, users: ^1.0, workforce: ^1.1}
|
|
11
|
+
optional: {orders: ^1.0, invoicing: ^1.0, procurement: ^1.0, payroll: ^1.0}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/role.json
|
|
2
|
+
name: field_worker
|
|
3
|
+
label: {id: Pekerja lapangan}
|
|
4
|
+
description: {id: 'Absen masuk dan pulang di lokasi kerja, dan melihat absennya sendiri'}
|
|
5
|
+
# Works from the phone: the clock screen full screen (work shell, contract 0030 §3), no sidebar.
|
|
6
|
+
desk: false
|
|
7
|
+
# Contract 0010 §5: records whose `employee` is the member's own employee record (user.name, a users.user record since
|
|
8
|
+
# contract 0056), so a worker sees only their own logs and assignments. The worker record links to it (worker.employee);
|
|
9
|
+
# assignments and logs copy it. Pay and selling rates of an assignment are hidden (contract 0027).
|
|
10
|
+
scope: {field: employee, from: '[user.name]'}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/role.json
|
|
2
|
+
name: site_supervisor
|
|
3
|
+
label: {id: Pengawas lokasi}
|
|
4
|
+
description: {id: 'Mandor atau danru: melihat absen lokasi kerjanya dan menyetujui absen di luar radius, terlambat diisi atau lembur'}
|
|
5
|
+
# Contract 0010 §5: records whose `supervisor` is the member's own employee record (user.name, a users.user record since
|
|
6
|
+
# rangka-os contract 0056): the work sites that name them, and the assignments and logs of those sites (copied from
|
|
7
|
+
# work_site.supervisor). Contract 0056 keeps a member's outlets to outlet records, so sites are no longer listed there.
|
|
8
|
+
scope: {field: supervisor, from: '[user.name]'}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/screen.json
|
|
2
|
+
name: absen
|
|
3
|
+
type: clock
|
|
4
|
+
label: {id: Absen, en: Clock in}
|
|
5
|
+
icon: clock
|
|
6
|
+
# A worker clocks in and out at the client's site from their phone (plans/layar-kerja.md §3 #2, contract 0030 §2 clock).
|
|
7
|
+
# The site is today's assignment (the worker cannot read the firm's list of client sites, only their own assignments),
|
|
8
|
+
# its point and radius come from the work site. A clock-in outside the radius or without a position is saved with the
|
|
9
|
+
# reason and waits for the site supervisor (attendance_log approvals); the record's own computes decide, not the phone.
|
|
10
|
+
# No offline queue: every clock-in carries a photo, which needs the connection (contract 0030 §7).
|
|
11
|
+
roles: [field_worker]
|
|
12
|
+
device: phone
|
|
13
|
+
needs: [location, photo]
|
|
14
|
+
clock:
|
|
15
|
+
# The worker's own logs (row scope worker); the open one is the newest with a clock-in and no clock-out.
|
|
16
|
+
# The log names the assignment; its worker follows (attendance_log.worker default), and the row scope (employee) keeps
|
|
17
|
+
# it to the worker's own.
|
|
18
|
+
record: {model: attendance_log, filter: "docstatus == 0"}
|
|
19
|
+
in: {field: clock_in, location: in_pos, photo: in_photo}
|
|
20
|
+
out: {field: clock_out, location: out_pos, photo: out_photo}
|
|
21
|
+
site: {model: assignment, link: assignment, filter: "start_date <= today() && end_date >= today() && work_site != ''", title: site_name, location: site_point, radius_m: site_radius_m}
|
|
22
|
+
reason: reason
|
|
23
|
+
submit: true
|
|
@@ -73,10 +73,20 @@ fields:
|
|
|
73
73
|
# Not read_only: a generic amend zeroes read-only fields, and a zero dpp_den would break ppn (kernel follow-up).
|
|
74
74
|
- {name: dpp_num, type: int, label: {id: DPP nilai lain (pembilang)}, default: 'tax.dpp_num'}
|
|
75
75
|
- {name: dpp_den, type: int, label: {id: DPP nilai lain (penyebut)}, default: 'tax.dpp_den'}
|
|
76
|
+
# The PPN base as on the invoice (sales_invoice.ppn_base): the DPP, or with config tax.ppn_fee_only the share of the
|
|
77
|
+
# lines not marked ppn_exclude, so the quoted total equals the invoice's. No down payment on a quotation.
|
|
78
|
+
- name: ppn_base
|
|
79
|
+
type: currency
|
|
80
|
+
label: {id: Dasar PPN}
|
|
81
|
+
compute: >-
|
|
82
|
+
!('ppn_fee_only' in tax && tax.ppn_fee_only) ? dpp :
|
|
83
|
+
(currency != '' && currency != 'IDR'
|
|
84
|
+
? (items.map(i, i.amount_fx_idr).sum() == 0 ? 0 : round(dpp * 1.0 * items.map(i, i.ppn_exclude ? 0 : i.amount_fx_idr).sum() / items.map(i, i.amount_fx_idr).sum()))
|
|
85
|
+
: (subtotal == 0 ? 0 : round(dpp * 1.0 * items.map(i, i.ppn_exclude ? 0 : i.amount).sum() / subtotal)))
|
|
76
86
|
- name: ppn
|
|
77
87
|
type: currency
|
|
78
|
-
label: {id: PPN (
|
|
79
|
-
compute: "round(
|
|
88
|
+
label: {id: PPN (dasar PPN x rasio DPP nilai lain x tarif)}
|
|
89
|
+
compute: "round(ppn_base * dpp_num / dpp_den * tax_rate / 100)"
|
|
80
90
|
- name: grand_total
|
|
81
91
|
type: currency
|
|
82
92
|
label: {id: Total}
|
|
@@ -111,7 +121,7 @@ fields:
|
|
|
111
121
|
- {name: exchange_rate, type: float, label: {id: Kurs}, default: '1'}
|
|
112
122
|
- {name: subtotal_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Subtotal (valas)}, compute: "sum(items.map(i, i.amount_fx))"}
|
|
113
123
|
- {name: dpp_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: DPP (valas)}, compute: "subtotal_fx"}
|
|
114
|
-
- {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "round(dpp_fx * dpp_num / dpp_den * tax_rate / 100, 2)"}
|
|
124
|
+
- {name: ppn_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: PPN (valas)}, compute: "dpp == 0 ? 0 : round(dpp_fx * (ppn_base * 1.0 / dpp) * dpp_num / dpp_den * tax_rate / 100, 2)"}
|
|
115
125
|
- {name: grand_total_fx, type: money, currency_field: currency, rate_field: exchange_rate, label: {id: Total (valas)}, compute: "dpp_fx + ppn_fx"}
|
|
116
126
|
rules:
|
|
117
127
|
- name: foreign_needs_rate
|
|
@@ -122,6 +132,12 @@ rules:
|
|
|
122
132
|
on: save
|
|
123
133
|
check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
|
|
124
134
|
message: {id: Tarif PPN atau faktor DPP tidak valid}
|
|
135
|
+
# the rate is at most the company's (tax.ppn_rate): lower rates are lawful (PPN besaran tertentu, an earlier
|
|
136
|
+
# statutory 10% or 11%), a higher one only inflates the PPN, e.g. a typed 100% (audit tax-fields N2; card t_81bc5551)
|
|
137
|
+
- name: tax_rate_at_most_config
|
|
138
|
+
on: save
|
|
139
|
+
check: "tax_rate <= tax.ppn_rate"
|
|
140
|
+
message: {id: 'Tarif PPN tidak boleh melebihi tarif di pengaturan pajak usaha. Draft lama: ubah dulu tarifnya ke tarif pengaturan'}
|
|
125
141
|
- name: ppn_needs_pkp
|
|
126
142
|
on: save
|
|
127
143
|
check: tax.pkp || tax_rate == 0
|
|
@@ -186,7 +202,7 @@ views:
|
|
|
186
202
|
- section: {id: Harga}
|
|
187
203
|
columns:
|
|
188
204
|
- [subtotal, dpp]
|
|
189
|
-
- [tax_rate, dpp_num, dpp_den, ppn, grand_total]
|
|
205
|
+
- [tax_rate, dpp_num, dpp_den, ppn_base, ppn, grand_total]
|
|
190
206
|
- section: {id: Syarat}
|
|
191
207
|
columns:
|
|
192
208
|
- [payment_terms, delivery_terms]
|