Domain-specific workflows for the SUDA Shop Lease Manager. Covers financial calculations (penalties, dues, DCB), GST reconciliation, invoice generation, shop ledger, lease lifecycle management, notice generation, and waiver processing. Use when working on any ShopLease feature or business logic task.
Specialized business logic for the SUDA Shop Lease Manager. Read the reference files listed below as needed — do not load all of them at once.
js/core/Business workflows are documented in directives/:
| Directive | When to Read |
|---|---|
directives/penalty_calculation.md | Penalty policy, modes (MONTHLY/DAILY), historical rates |
directives/rent_collection.md | Recording rent payments, receipt generation |
directives/dcb_report.md | DCB report generation and columns |
directives/waiver_processing.md | Granting and applying penalty waivers |
directives/notice_generation.md | Defaulter identification and notice escalation |
directives/gst_reconciliation.md | GST collected vs remitted reconciliation |
directives/shop_ledger.md | Real-time shop balance statement |
directives/lease_management.md | Renewal, termination, new applicant onboarding |
directives/invoice_generation.md | Monthly invoice snapshot generation |
js/core/ first — PenaltiesCore, GSTCore, PaymentsCore, ReportsCore cover all financial calculations. Do not reimplement.Store or RPCs — Use Store.get*() (sync, cached) and Store.save*() for UI state. For heavy data aggregation (like ledgers or archiving), use Supabase RPCs (e.g., get_shop_ledger_summary).String(shopNo).padStart(2, '0').window.PenaltiesCore functions to handle the rate that applied at the time, not today's rate.references/business_rules.md.