Sales Order Review
Sales Order Review is an orientation/shortcut menu for existing orders that need payment attention. Some users may call it invoice review because the real destination is the payment step for a sales order that already has, or is about to create, an invoice.
This menu is not a separate order-creation flow and it should not own a separate payment model. It reuses the same payment and invoice creation sections documented in Sales Order.
Open the Sales Order payment flowOpen the invoice creation flow
Where It Fits
App Entry Points
| App | Entry point | Real destination |
|---|---|---|
| Mobile | OrderList mode shipping-review | OrderPayment route |
| POS Terminal | salesOrderReview | payment section in the sales order detail panel |
Main Behavior
| Topic | Behavior |
|---|---|
| List filter | Loads sales orders with orderStatus = WAITING_PAYMENT. |
| Creation | Does not create a customer-to-order draft. Selects existing orders only. |
| Invoice dependency | If an invoice exists, open payment; if not, follow the sales-order invoice creation path first. |
| Payment model | Cash, transfer, split amount, QR, shipping fee, discounts, credit note, and totals use the same Sales Order payment logic. |
| QR | QR assets are generated by the same qr.ts payment utilities. |
| After payment | Continue into shipment/picking or closeout based on the underlying order/invoice status. |
Permissions And Guards
| Topic | Behavior |
|---|---|
| Terminal menu key | salesOrderReview |
| deptCode menu set | -2, 1, 2, 3, 4, 7, 29, 21, 8, 9, 13, 16, 20, 22, 23, 27 |
| Branch rule | No requiresMainBranch flag in Terminal menu config. |
| Owner filter | Review mode intentionally uses review-list filtering and can differ from owner-only draft order lists. |
| Status guard | Orders outside payment-review status should not appear in this menu. |
Related Services / APIs
| Area | Mobile | POS Terminal |
|---|---|---|
| Review list | getOrders({ mode/orderStatus: WAITING_PAYMENT }) through order list screen | splitMenuData.ts case salesOrderReview |
| Order detail | orders.ts detail helpers | OrderDetailForm.tsx detail load |
| Invoice | invoices.ts#createInvoice, invoice detail/retry helpers | same invoice service layer |
| Payment | payOrder(payload) / order payment utilities | payment handlers inside OrderDetailForm.tsx |
| QR | services/qr.ts | services/qr.ts |
Mobile vs POS Terminal
| Topic | Mobile | POS Terminal |
|---|---|---|
| List | OrderList in review mode | split list under salesOrderReview |
| Payment UI | OrderPaymentScreen | payment section inside OrderDetailForm |
| Navigation | navigation.navigate('OrderPayment', { orderId, orderNo }) | switch detail panel section/state |
| Payload | utils/orderPayment.ts builds form/summary/payload | terminal payment handlers build equivalent payload |
Developer Checklist
- Do not duplicate payment state or payload shape for this menu.
- Start payment changes in Sales Order: Payment Flow.
- Start invoice-before-payment changes in Creating Invoice And Opening Payment.
- Keep list filtering focused on
WAITING_PAYMENT. - Test both cases: order already has invoice and order must create invoice before payment.
- Re-test QR amount and credit-note discount when payment totals change.