Skip to content

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

ChainLink
RoadmapPhase 2 - By Month
EpicBANA-1326 - Selling experience · BANA-1325 - Kitchen & self-order · BANA-1321 - Shifts
URDURD - new increment: PCK · SLF · SHF
PRDPRD-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 logTraceability matrix

1. Identity

PropertyValue
Module IDCORE-07
TierCore
StatusIn-progress
PhaseP1 (basic orders) · P2 (kitchen, sessions, reservations, splitting)
PriorityHIGH
Primary usersCashier · Kitchen staff · Host · Manager · Owner

2. Purpose & Scope

IncludedExcluded
Sale order lifecycle (DRAFT → PROCESSING → PARTIAL → COMPLETED / CANCELLED)Stock mutation (owned by Inventory)
Order items - product (incl. combo fan-out) and custom linesPayment provider integration (owned by Payment)
Checkout, revert, cancel, order merge / splitTax 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 reportsLoyalty rewards engine (only point earning lives here)
Table reservationsReceipt printing (frontend concern)
Loyalty point earning on completed orders
Real-time updates to kitchen & dashboards

3. Capabilities

CapabilityWhat the user can do
Draft orders (cart)Create an order, add / update / remove items - editable only in DRAFT
Combo itemsAdd a combo product; it fans out into priced child lines automatically
CheckoutLock prices and move DRAFT → PROCESSING ready for payment
Revert to cartUndo a checkout: PROCESSING → DRAFT
Cancel orderCancel from DRAFT, PROCESSING, or PARTIAL
Partial & full paymentPARTIAL while underpaid, COMPLETED when fully paid
Order split / mergeSplit one draft into many, or merge several drafts (DRAFT only)
Customer linkingAttach a customer to the order
Multi-currencySet currency + exchange rate per order (default VND)
Check splittingDivide a bill into independently-payable checks
Kitchen ticketsSend items to the kitchen; track ticket & item status; live KDS updates
Kitchen stationsRoute categories to named stations with printer config
POS sessionsOpen / close a shift per device with cash reconciliation and X/Z reports
ReservationsBook a table for a future time; check in to spawn an order
Loyalty pointsEarn points on completed orders
Refund flowStructured refund with stock return

4. Module Dependencies

Depends onWhy
ProductOrder items reference product variants; combos expand via product bundles
InventoryStock is reserved on cart-add and consumed on payment / serve
PaymentPayment 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.

PackageRoleDeveloper docs
@nx/saleOwns the cart-and-order lifecycle, checkout, checks, kitchen, sessions, reservations, pointssale

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.

FeatureDev packageStatus
ORD Sale Order@nx/saleBuilt
ENT Entitlements@nx/saleBuilt
CHK Check Splitting@nx/saleBuilt
KIT Kitchen Tickets@nx/saleBuilt
STA Kitchen Stations@nx/saleBuilt
POS POS Sessions@nx/saleBuilt
RSV Reservations@nx/saleBuilt
PNT Loyalty Points@nx/saleBuilt
PCK Product Picker@nx/sale · @nx/commercePlanned
SLF QR Self-order@nx/sale · @nx/commercePlanned
SHF Multi-employee shifts@nx/saleIn-progress

6. Key User Flows

Order lifecycle

Checkout

Kitchen ticket

POS session

7. Roles & Permissions

RoleCanCannot
CashierCreate / edit drafts, checkout, take payment, send to kitchen, open / close own sessionApprove refunds (Planned)
Kitchen staffView ticket queue, progress items cooking → ready → served, voidTake payment, edit prices
HostCreate and manage reservations, check in guestsTake payment
Manager / OwnerAll cashier actions plus view X/Z reports and reconcile shifts-

8. Status & Roadmap

PhaseCapabilities
P1Draft orders, item management, checkout / revert, cancel, partial & full payment
P2Combo fan-out, order split / merge, check splitting, kitchen tickets & stations, POS sessions, reservations, loyalty point earning, real-time updates
P3Refund / return flow, dedicated KDS app, table-layout management, delivery tracking, order templates

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.