1.7 KiB
1.7 KiB
F-191 — POS terminal and daily cash close reconciliation
Design and implement terminal and daily cash close balancing: card/cash returns and pending payments.
Scope
- POS cashiers can close their session (cash close): finalize expected vs actual cash count, handle over/short.
POST /pos/sessions/:id/closeacceptsactualCashCentsand calculatesvarianceCents = actualCashCents - expectedCashCents. StoresvarianceCentsandclosedAtonpos_cash_sessions.- Closed sessions can no longer accept new sales or rest-payments.
GET /pos/sessions/:idreturns session summary including total sales, cash received, expected cash, variance.GET /pos/sessionslists all sessions (open and closed) for a terminal or store.- Admin view: list all cash sessions across terminals with variance. Filter by date range, store, terminal.
expected_cash_centsis already maintained atomically by sale/rest-payment/return operations.- Pending (PENDING state) POS orders from a closed session are still payable via rest-payment from an OPEN session (separate session, same terminal).
Out of scope
- Bank deposit slip generation.
- Multi-terminal reconciliation in a single close.
- Automatic variance alerts (out of scope, can be added later).
Acceptance
- Cashier can close an open session; session transitions to
CLOSEDandexpected_cash_centsis frozen. - Closing with exact cash (variance=0) is accepted without warning.
- Closing with over/short is accepted; variance is stored and visible in admin session list.
- No new sales can be started on a closed session.
- Pending orders from a closed session can still be completed via rest-payment from an open session.
verify.shgreen, typecheck green, all tests pass.