← All tests

R1.5 — POSID-NNNNN daily sequence LOCAL

2026-04-22. Fifth cycle of R1 (NIX-OS-67 Phase 3 POS): order numbers now follow spec §8.8 — POS{configId}-{seq}, zero-padded, reset at midnight in the tenant's local timezone. Example: POS01-0001POS01-0002POS01-9999. The counter is atomic even with concurrent cashiers.

3/3 local Gate 1 checks passed. Format helper handles padding cases (4-digit seq, 3-digit config, overflow). DAO advances correctly, resets independently per business_date (proving daily reset), and survives a 5-way parallel advance that returns exactly {1,2,3,4,5} — the atomic INSERT … ON CONFLICT DO UPDATE … RETURNING holds the row lock so no two orders can share a number. Timezone math verified: 18:00 UTC in Asia/Phnom_Penh resolves to the next day — cashiers close shift at 22:00 local, not UTC.
Gate 2 (prod) will prove the end-to-end flow. Ring a cart, check out, inspect the receipt (should show POS{N}-0001), verify cafe.pos_sequences has a row with next_seq=2, and confirm Odoo pos.order.name carries the NIX-issued number too.

00What's new

01Format helper — padding rules✓ 5 assertions

Loading…

02DAO — advance / peek / daily reset / 5-way concurrency✓ 9 assertions

Loading…