D76 · Overdue thresholds per charge type, service type and transmission, set by the Business Team
Proposed · 2026-11-02 · zuki answered the three points on #264 and #158; it binds when this page's pull request is merged · Partly supersedes D46 (its total-balance limit) · Partly superseded by D103 (its three service types)
Decision:
- service_type is the ride-hailing tier a driver drives:
regular,comfortorpremium. It belongs to the driver's platform account (driver_platform_accounts, one per platform, R-DRV-12) and may be empty. - Where it is empty, it is estimated from the car's model: vehicle_models gains a default service type. The limit reads the driver's account on his live rental's platform, else the model of his live rental's car.
- transmission (
manual,automatic) goes on vehicle_models, as master data with master_data:write. - Thresholds (option a): a table of overdue thresholds, one row per charge type × service type × transmission. Rent has a threshold in rupiah, in days, or both; every other type in rupiah only. Either one crossed makes the driver overdue on that type.
- Fallback: a combination with no row uses the charge type's own threshold. Rent's own is D46's: three days of the daily rate of his live rental, and overdue_limit_days (R-MON-08). Other types have none until the Business Team sets one.
- Per type, not summed, and no total cap: a driver is overdue when any one type crosses its threshold. D46's total-balance limit does not stay beside them. Overdue sends the driver to Collection's return-or-repo question (COL-11, COL-12) and fails the gate's debt aspect (R-GATE-06), as D46 says.
- The Business Team is the holders of
payment:approve(finance, admin, super_admin), who set the thresholds through a database function, like a charge type's default due days (R-MD-16). - Invoices are not part of this decision. For now a driver's open charges for a billing cycle are a view only, with no number and no due date of their own; a numbered invoice (D40's format) is its own decision if it is wanted before cutover.
Why:
- zuki, 2026-10-22, on #264:
service_typeis regular, comfort or premium; v1 does not hold it; it depends on the driver's platform account, estimated from the car model; option (a); v1 hastransmission. - zuki, 2026-11-02, on #264: the Business Team is
payment:approve; limits apply "per type"; invoices stay out, "for now, just a view". - Syamsul, 2026-10-19, on #158: a threshold per charge type, rent in rupiah or days, other types in rupiah.
- Per type because a pile of small ETLE fines must not trigger Collection under a rent rule.
Consequences:
- Partly supersedes D46: its amount limit becomes rent's fallback; its "all charges included" total is replaced by per-type thresholds.
- Rules (DOC): service_type and transmission, the threshold table, the lookup and fallback, who sets them, and R-GATE-06 and R-MON-08 rewritten against it.
- Schema (BE), M6's pack: the threshold table, the two columns and the enum, since nothing reads them before M5's gate. The vehicles step maps v1's
vehicle_master.transmisionto each model's transmission; a model whose cars disagree is an unmapped value (R-MIG-02), never guessed. - service_type in the data phase: v1 does not hold it. The master data step loads each model's default service type from a value list zuki fills in, reviewed in a pull request and replayed every night. Drivers' accounts start empty and fall back to the model.
- Timeline: no data-phase row moves; M6's DOC pack and M5's gate read it.