Sale Phase A In-progress
Orders is the transactional heart of the POS: a single order plays both the cart and the committed order role, moving from draft through checkout to payment. For F&B merchants it adds kitchen tickets, table reservations, bill splitting, and cashier shift sessions.
Status: Built (P1) · In-progress (P2 Picker · Self-order · Kitchen) · Owner: Hải Cao · Phase: 1-2 · Last reviewed: 2026-06-11
Chain Link Roadmap Phase 2 - By Month Epic BANA-1326 - Selling experience · BANA-1325 - Kitchen & self-order · BANA-1321 - Shifts URD URD - new increment: PCK·SLF·SHFPRD PRD-PCK-001 Product picker · PRD-SLF-001 QR self-order · PRD-SHF-001 Shifts · PRD-ENT-001 Entitlements · PRD-ORD-002 Split / merge / rollback (catalogue) Dev docs @nx/sale Delivery log Traceability matrix
1. Identity
| Property | Value |
|---|---|
| Module ID | CORE-07 |
| Tier | Core |
| Status | In-progress |
| Phase | P1 (basic orders) · P2 (kitchen, sessions, reservations, splitting) |
| Priority | HIGH |
| Primary users | Cashier · Kitchen staff · Host · Manager · Owner |
2. Purpose & Scope
| Included | Excluded |
|---|---|
| Sale order lifecycle (DRAFT → PROCESSING → PARTIAL → COMPLETED / CANCELLED) | Stock mutation (owned by Inventory) |
| Order items - product (incl. combo fan-out) and custom lines | Payment provider integration (owned by Payment) |
| Checkout, revert, cancel, order merge / split | Tax calculation engine & e-invoice issuance (Tax & Invoice) |
| Bill splitting (sale checks) | Refund / return flow (Planned) |
| Kitchen tickets & stations (F&B, KDS) | Customer-facing menus |
| POS sessions / shifts with X/Z reports | Loyalty rewards engine (only point earning lives here) |
| Table reservations | Receipt printing (frontend concern) |
| Loyalty point earning on completed orders | |
| Real-time updates to kitchen & dashboards |
3. Capabilities
| Capability | What the user can do |
|---|---|
| Draft orders (cart) | Create an order, add / update / remove items - editable only in DRAFT |
| Combo items | Add a combo product; it fans out into priced child lines automatically |
| Checkout | Lock prices and move DRAFT → PROCESSING ready for payment |
| Revert to cart | Undo a checkout: PROCESSING → DRAFT |
| Cancel order | Cancel from DRAFT, PROCESSING, or PARTIAL |
| Partial & full payment | PARTIAL while underpaid, COMPLETED when fully paid |
| Order split / merge | Split one draft into many, or merge several drafts (DRAFT only) |
| Customer linking | Attach a customer to the order |
| Multi-currency | Set currency + exchange rate per order (default VND) |
| Check splitting | Divide a bill into independently-payable checks |
| Kitchen tickets | Send items to the kitchen; track ticket & item status; live KDS updates |
| Kitchen stations | Route categories to named stations with printer config |
| POS sessions | Open / close a shift per device with cash reconciliation and X/Z reports |
| Reservations | Book a table for a future time; check in to spawn an order |
| Loyalty points | Earn points on completed orders |
| Refund flow | Structured refund with stock return |
4. Module Dependencies
| Depends on | Why |
|---|---|
| Product | Order items reference product variants; combos expand via product bundles |
| Inventory | Stock is reserved on cart-add and consumed on payment / serve |
| Payment | Payment events drive PARTIAL / COMPLETED / CANCELLED transitions |
5. Backend Packages
Implementation detail lives in the developer docs - this section only maps the module to the services that power it.
| Package | Role | Developer docs |
|---|---|---|
@nx/sale | Owns the cart-and-order lifecycle, checkout, checks, kitchen, sessions, reservations, points | sale |
Engineering Mapping (Feature ⇄ Package)
The horizontal axis of the Feature Spine - each business feature (
<AREA>in the URD) maps to its engineering home. Reciprocal: the package docs link back here.
| Feature | Dev package | Status |
|---|---|---|
ORD Sale Order | @nx/sale | Built |
ENT Entitlements | @nx/sale | Built |
CHK Check Splitting | @nx/sale | Built |
KIT Kitchen Tickets | @nx/sale | Built |
STA Kitchen Stations | @nx/sale | Built |
POS POS Sessions | @nx/sale | Built |
RSV Reservations | @nx/sale | Built |
PNT Loyalty Points | @nx/sale | Built |
PCK Product Picker | @nx/sale · @nx/commerce | Planned |
SLF QR Self-order | @nx/sale · @nx/commerce | Planned |
SHF Multi-employee shifts | @nx/sale | In-progress |
6. Key User Flows
Order lifecycle
Checkout
Kitchen ticket
POS session
7. Roles & Permissions
| Role | Can | Cannot |
|---|---|---|
| Cashier | Create / edit drafts, checkout, take payment, send to kitchen, open / close own session | Approve refunds (Planned) |
| Kitchen staff | View ticket queue, progress items cooking → ready → served, void | Take payment, edit prices |
| Host | Create and manage reservations, check in guests | Take payment |
| Manager / Owner | All cashier actions plus view X/Z reports and reconcile shifts | - |
8. Status & Roadmap
| Phase | Capabilities |
|---|---|
| P1 | Draft orders, item management, checkout / revert, cancel, partial & full payment |
| P2 | Combo fan-out, order split / merge, check splitting, kitchen tickets & stations, POS sessions, reservations, loyalty point earning, real-time updates |
| P3 | Refund / return flow, dedicated KDS app, table-layout management, delivery tracking, order templates |