Skip to main content

Status flow

Transitions are enforced server-side by the STATUS_TRANSITIONS map in orders.service.ts. Terminal states (REJECTED, DELIVERED, CANCELLED) never appear as a source.

Status definitions

Allowed transitions

Notes on the flow:
  • Status can only move forward. There is no transition back to an earlier stage.
  • MANUFACTURING can skip EMBROIDERY (and quality check) for items that need no branding.
  • Each transition writes an OrderStatusHistory record with timestamp, actor, and optional note.

Order numbering

Both prefixes are configurable via the ORDER_NUMBER_PREFIX and STORE_ORDER_NUMBER_PREFIX system settings. Numbers come from the persistent NumberSequence counter, which is concurrency-safe and never reuses a number after a row is deleted:

Store order batches

Orders placed in the same submission are grouped under a StoreOrder batch, identified by its SO- number; every order in it links via Order.storeOrderId. Batch numbers are global and sequential. A batch’s displayed status uses a worst-first rule: the member order with the earliest lifecycle stage determines the batch status. If a batch holds one order at PACKED, one at MANUFACTURING, and one at APPROVED, the batch shows MANUFACTURING. Admins can advance a single order or the whole batch; the batch advance applies to every eligible member order and derives each member’s next stage individually.

Production stages

After approval, orders move through PROCESSING → MANUFACTURING → (EMBROIDERY) → QUALITY_CHECK → PACKED → DISPATCHED → DELIVERED. Production status updates require the orders.status-update permission, held by Muze Admin and Super Admin only. Every transition creates an OrderStatusHistory record:
This gives a complete audit trail of who changed what, when, and why.

Limitations

  • No external production system integration; status updates are manual.
  • No estimated delivery dates and no shipment tracking.
  • No automated stage advancement.
The production pipeline feeds the Production Requirements report (see Reporting).