← All tests

NIX-OS-71 — Cash In / Cash Out (prod)

2026-04-23 on prod. Mid-shift cash drawer adjustments. Completes the cash ledger story started in R1.3 (beginning cash) + R1.6 (closing cash count): every dollar that enters or leaves the drawer outside of sales now has a row in cafe.cash_movements — tips out, supplies, petty cash, owner draw, float top-ups, bank-run change, all attributed to the cashier or manager who recorded them. CHECK constraints enforce direction IN ('in','out') and amount > 0; FK cascade on session_id wipes movements when the session is deleted.

12/12 NIX-OS-71 prod click-through passed. Full flow: login → seed cashier → open shift ($100 beginning) → top-bar 💰 Cash button opens dialog → record Cash OUT $25 Supplies → record Cash IN $50 Float top-up → recent-movements list shows both with timestamps + actor name → running Expected reflects beginning + sales + in − out → close + reopen dialog, movements persist → Close Shift popup shows Cash in / Cash out rows folded into expected cash math → Daily Sale Report per-session card surfaces mid-shift rows. No 5xx on any request.
12/12 NIX-OS-71 + 65/65 prior-suite regression = 77/77 prod tests green. One new migration (cafe.cash_movements with CHECK constraints + FK cascade), one new DAO (lib/db/cash_movements.ts), one new server action (recordCashMovementAction, audit-logged), Cash button added to TopBar, new dialog component, CloseShift expected-cash math updated, Daily Report per-session rows added.