feat(F-187): completed feature
This commit is contained in:
@@ -1,32 +1,31 @@
|
||||
# F-186 — POS configurable checkout, mixed payments and receipts
|
||||
# F-187 — Admin can deactivate and delete POS cashiers
|
||||
|
||||
Complete the TPV cashier flow for touch terminals and self-payment use cases.
|
||||
Allow administrators to safely remove cashier access without breaking historical POS attribution.
|
||||
|
||||
## Scope
|
||||
- Increase configurable quick products from 6 to 8.
|
||||
- Replace line discount text/inline interaction with a touch-sized button; allow admins to disable line discounts per terminal.
|
||||
- Let admins configure and enable payment methods (cash, card, Bizum, Stripe, Apple Pay, or another named method).
|
||||
- Payment modal must allocate either the full remaining amount or a partial amount. Keep partial allocations visible in the cashier and permit another method until the total is covered.
|
||||
- For cash, accept tendered amount above the outstanding amount and calculate change.
|
||||
- Require an explicit final confirmation after payment allocation before closing the sale.
|
||||
- Generate a receipt with company identity, date/time, configurable ticket numbering, item name, quantity, subtotal, totals, payment methods/amounts, cash change, and return policy.
|
||||
- Offer print and email delivery. Clear the cashier only after print/email action succeeds or is explicitly completed.
|
||||
- Add a free-item flow for a non-stock product/service with required name and positive price; free items must not mutate inventory.
|
||||
- Keep monetary validation and sale completion authoritative on the backend.
|
||||
- Add an explicit active/deactivated/deleted lifecycle for backoffice POS cashier accounts.
|
||||
- Show POS cashiers and their status in the TPV administration page.
|
||||
- Let admins create cashiers, deactivate/reactivate them, and delete them with explicit confirmation.
|
||||
- Treat delete as an irreversible soft deletion: preserve the backoffice user row and its ID so sessions, sales, receipts, reporting and audit history keep their cashier attribution.
|
||||
- Revoke every live backoffice session when a cashier is deactivated or deleted.
|
||||
- Reject login and existing-session authentication for inactive or deleted accounts.
|
||||
- Reject deactivation/deletion while the cashier owns an open cash session; require the cash session to be closed first.
|
||||
- Keep all lifecycle mutations admin-only and cashier-role-only.
|
||||
|
||||
## Out of scope
|
||||
- Real integrations with external payment processors.
|
||||
- Certified fiscal-printer protocols or country-specific fiscal certification.
|
||||
- Hardware-specific printer drivers; browser print is sufficient.
|
||||
- Removing or changing administrators, editors or POS managers.
|
||||
- Reassigning historical sales or cash sessions to another cashier.
|
||||
- Forcing or automating cash-session closure.
|
||||
- Bulk cashier operations.
|
||||
|
||||
## Acceptance
|
||||
1. Admin can configure up to eight quick products and POS renders all configured slots.
|
||||
2. Line discount is a touch target and is absent/blocked when the terminal disables discounts.
|
||||
3. Enabled admin payment methods appear in POS; disabled methods cannot be submitted.
|
||||
4. Cashier supports full and partial payment allocations, displays paid/remaining totals, and permits mixed methods.
|
||||
5. Cash tender above the remaining total displays and records change; non-cash overpayment is rejected.
|
||||
6. A sale can only be confirmed when allocations cover the exact total, and requires explicit confirmation.
|
||||
7. Receipt contains all requested company, numbering, line, total, payment, change, and return-policy data.
|
||||
8. Receipt supports browser print and email delivery; cashier resets only after delivery completion.
|
||||
9. A free item can be added with name and positive price and does not reserve or decrement stock.
|
||||
10. Existing POS sale/reporting contracts remain compatible and tests plus `verify.sh` are green.
|
||||
1. Admin TPV lists POS cashiers with active, inactive or deleted status.
|
||||
2. Admin can create a cashier and the account is active by default.
|
||||
3. Admin can deactivate an active cashier and reactivate an inactive non-deleted cashier.
|
||||
4. Deactivation immediately revokes existing sessions and blocks future login/authentication.
|
||||
5. Admin can delete a cashier only after explicit confirmation; deleted cashiers cannot be reactivated or authenticate.
|
||||
6. Deactivation or deletion is rejected while the cashier has an open cash session.
|
||||
7. Deletion preserves the cashier row/ID and all historical session, sale, receipt and reporting attribution.
|
||||
8. Non-admin users cannot list or mutate cashier lifecycle, and non-cashier roles cannot be targeted.
|
||||
9. Migration is reversible and existing backoffice accounts remain active.
|
||||
10. Tests, typecheck, affected builds and `verify.sh` are green.
|
||||
|
||||
Reference in New Issue
Block a user