# Sales order and invoice workflow foundation

Applied 2026-10-23.

- Draft orders contain company-scoped customer, salesperson and product snapshots.
- Server calculates subtotal, discount, taxable amount, VAT and grand total with four-decimal arithmetic.
- State path is draft -> submitted -> approved -> invoiced.
- Draft orders cannot skip approval.
- Invoice conversion consumes the configured salesperson invoice sequence and links the central document-number registry.
- Conversion is idempotent.
- No inventory movement, stock reservation, receivable, journal entry or payment is posted yet.
- All transitions are audited.
- No business orders were created during implementation.


## Blade workflow UI — 2026-10-23

- Added permission-scoped order list, status filters, search and scoped statistics at `/sales/orders`.
- Added responsive draft creation with customer/salesperson controls, repeatable product lines, SKU/barcode/name search, configured price choices, manager-only manual pricing and a client-side estimate.
- Configured VAT-inclusive prices are normalized to their pre-VAT value before the workflow calculation; submitted browser totals and configured-price amounts are never trusted.
- Added order detail, status timeline, conditional submit/approve/invoice actions and the linked invoice number.
- HTTP coverage proves company and Own-scope isolation, company-wide approval requirements, server-side price/tax calculation, cross-company product rejection, invoice idempotency and no inventory changes.
- Full isolated suite: 109 tests / 671 assertions PASS.
- Live desktop/mobile browser inspection remains pending an authenticated browser session; route rendering and responsive markup are covered by HTTP/Blade compilation checks.
