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.
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.
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.