# POS Module

Implemented at `/pos`.

## Current Scope

- Touch-friendly Livewire POS terminal with barcode, SKU, or item-code scan lookup.
- Multiple held sales using `held` POS documents.
- Held sales can be resumed, edited, re-held, posted, or cancelled.
- Posted POS sales are immutable and linked to a posted sales invoice.
- Split tender supports cash, bank, card, wallet, and customer credit.
- Cash, bank, card, and wallet tender lines create a POS payment settlement journal.
- Customer credit remains open on the customer receivable account.

## Posting Rules

- `PosSaleService` is the transaction boundary for hold, update-held, post, and cancel-held actions.
- Holding a sale validates company, branch, fiscal period, customer, warehouse assignment, and item eligibility but does not post stock or accounting.
- Posting a POS sale creates a linked sales invoice through `SalesInvoiceService`.
- The linked invoice posts stock issue, COGS, inventory relief, sales revenue, tax, and customer receivable.
- Non-credit POS tenders create a second balanced journal entry: debit tender accounts and credit customer receivable.
- Payment total must exactly equal POS grand total.
- POS sale numbers use branch, company, and fiscal-year scoped `POS-000001` sequences.
- Posted POS sales and posted linked invoices are immutable.

## Accounts

Tender accounts are seeded as Level 4 asset/debit accounts:

- Cash in Hand: `10-01-0001-00000001`
- Bank Account: `10-01-0001-00000002`
- Card Clearing: `10-01-0001-00000003`
- Wallet Clearing: `10-01-0001-00000004`

## Deferred Work

- Browser-local offline queue and sync conflict handling.
- Dedicated thermal receipt and A4 invoice print templates.
- Cash drawer sessions, shift closing, and till reconciliation.
- Exchanges, receipt reversals, customer refunds, and customer statements.
