← All tests

R1.6 — Close register popup (prod)

2026-04-22 on prod. Sixth cycle of R1 (NIX-OS-67 Phase 3 POS): replaces the bare confirm() on the Close Shift button with a proper cash-count dialog per spec §8.4. Cashier enters counted cash (optionally bank), dialog auto-computes the difference against expected (beginning cash + sales). If non-zero, surfaces a payment difference reason dropdown fed from a new admin CRUD at /cafe/settings/payment-diff-reasons. All closure fields land on cafe.sessionsending_cash, ending_bank, diff_amount, diff_reason_id, closed_at, closed_by_*.

11/11 R1.6 prod click-through passed. Full flow: add a diff reason via Settings → seed a cashier → manager-unlock a register with $100 beginning cash → ring one order → click Close shift → dialog shows Expected cash = $100 + Sales this shift. Enter $105 cash count → amber diff banner + reason dropdown appear. Pick the seeded reason + $0 bank count → Confirm close. Terminal returns to the Lock screen. DB assertion: cafe.sessions row is state='closed' with ending_cash=105, diff_amount non-zero, diff_reason_id matches the picked reason, closed_at stamped. Zero 5xx. Full cleanup on exit (closes any stray session, deactivates test cashier, deletes test reason, restores owner's POS PIN).
33/33 regression green alongside this push — phase1 (11) + M1 (10) + phase2-sso-outdoor (6) + phase2-cafe-multishop (6). No regressions from R1.6 or its companion follow-ups.