Canonical states, transitions, and money behavior for Krane's load lifecycle from BOOKED to ARCHIVED.
Ops: Intake and pre-movement staging. Load is agreed, keyed, and a plan exists.
Dev: Transitions driven by UI actions / API endpoints; do NOT mutate arbitrarily from random forms.
Ops: Freight enters your control, may be reloaded or repowered, then moves over the road to next node.
Dev: Each change should be tied to a physical event (check-in, gate move, hook/unhook, depart).
Ops: Freight arrives near consignee (yard or warehouse) and then delivers to final receiver with POD.
Dev: Delivery should be tied to POD capture; avoid 'manual delivered' without docs unless forced.
Ops: Commercial lifecycle after freight movement: invoicing, collection, and eventual archival for history.
Dev: These states should be driven by accounting flows (invoicing, bank sync, reconciliations).
Ops: Non-happy-path outcomes (kill, truck-ordered-not-used, paused). Can occur at multiple points.
Dev: Represented as explicit statuses or flags, never as free-text comments alone.
Operational state lives in load_status. Overlays like on_hold, payment_status, and tonu_amount express exceptions and money without inventing new states.
Events like booked_at, dispatched_at, picked_up_at, delivered_at, invoice_date, and paid_date are the real audit log. load_status is the current summary.
Detention, layover, lumper, and TONU roll into accessorial_total_amount and ultimately invoice_amount. Reporting should derive a single final_revenue value per load from those components.