feat(terminal): quick sale at the counter: cash/card/split, change, cash drawer, fiscal (platform-v2 3.3b)
- POST /api/pos/sales: all checks first (shift, lines, payment split, cash given, discount → ordering.prices.modify or manager approval, fiscal VAT groups), then the existing open_order / add_items / pay_items functions, so tickets, KDS, price events, shift totals and the fiscal receipt work as for any order. - Cash drawer: printer_service.open_cash_drawer (ESC @ + ESC p 0 25 250) to the screen's receipt printer on cash, logged and audited (DRAWER_OPENED / DRAWER_FAILED). - orders._can_access_order: the people assigned to an order may act on it (a cashier's own takeaway order); pos_cart prices a batch with the lines before it, as add_items does. - Terminal: Charge → payment dialog (exact cash pre-selected, quick amounts, change, card, split by line), per-line discounts, sale summary and "Same again". - Tests: backend +6 (socket printer receives the drawer kick, fiscal file in the bridge folder), terminal unit +1, terminal.mjs +9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,9 @@ CODES: dict[str, tuple[int, str]] = {
|
||||
"auth.support_not_configured": (503, "Support access isn't set up on this site."),
|
||||
"auth.support_code_invalid": (401, "That support code is wrong or has expired. Ask for a new challenge."),
|
||||
"auth.support_rate_limited": (429, "Too many support challenges. Wait a few minutes and try again."),
|
||||
"pos.shift_required": (409, "Start your shift before selling."),
|
||||
"pos.payment_invalid": (422, "This payment doesn't add up ({reason})."),
|
||||
"pos.fiscal_vat_missing": (422, "Fiscal receipts are on, but these products have no VAT group: {names}."),
|
||||
"pos.line_invalid": (422, "Cart line {line} can't be sold as chosen ({reason})."),
|
||||
"kds.item_not_found": (404, "Item {item_id} not found on this order."),
|
||||
"kds.item_claimed": (409, "{name} is already on this item."),
|
||||
|
||||
Reference in New Issue
Block a user