Skip to content

Orders 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.

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 doStatus
Draft orders (cart)Create an order, add / update / remove items — editable only in DRAFTBuilt
Combo itemsAdd a combo product; it fans out into priced child lines automaticallyBuilt
CheckoutLock prices and move DRAFT → PROCESSING ready for paymentBuilt
Revert to cartUndo a checkout: PROCESSING → DRAFTBuilt
Cancel orderCancel from DRAFT, PROCESSING, or PARTIALBuilt
Partial & full paymentPARTIAL while underpaid, COMPLETED when fully paidBuilt
Order split / mergeSplit one draft into many, or merge several drafts (DRAFT only)Built
Customer linkingAttach a customer to the orderBuilt
Multi-currencySet currency + exchange rate per order (default VND)Built
Check splittingDivide a bill into independently-payable checksBuilt
Kitchen ticketsSend items to the kitchen; track ticket & item status; live KDS updatesBuilt
Kitchen stationsRoute categories to named stations with printer configBuilt
POS sessionsOpen / close a shift per device with cash reconciliation and X/Z reportsBuilt
ReservationsBook a table for a future time; check in to spawn an orderBuilt
Loyalty pointsEarn points on completed ordersBuilt
Refund flowStructured refund with stock returnPlanned

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

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.