Narong (2026-06-22, get-coffee’s Loyverse-replacement launch morning): the POS ticket numbers weren’t going in sequence — completed sales showed gaps.
b713c87, no migration.
Root cause: a ticket number was reserved when a draft/tab was first saved, so every
discarded or abandoned ticket (e.g. trial orders during launch) burned a sequence number,
leaving gaps in the completed-sale numbering. Fix: the number is now allocated at
payment, not at park (matching Loyverse) — the pay route already minted one on
completion, so this just stops the park-time reservation. Drafts now carry a null number until paid
(the tab keeps its local “Order N” label).
Gaps = numbers burned by discarded tabs.
Only completed sales consume a number.
Gate 2 evidence (lumiere, DB-probed):
Note: today’s already-printed get-coffee tickets keep their existing numbers (we don’t renumber receipts customers already hold) — the fix is forward-looking: sequential from the next sale, and a clean 0001, 0002, 0003… at tomorrow’s daily reset.