ZuloOne
English
Sign in
Menu

🧾 Sales order

Updated

A sales order is the customer's commitment. It checks the contract and stock, then creates a sales realization (SalesRealization) in Reserved; it does not recognise debt, revenue, tax, or cost by itself.

← Business process wiki

User path: create and approve a sales order. Process overview: sales and purchasing.

How the process works#

A lead can create a quotation, and a quotation can create a draft SalesOrder. A user can also create the order directly from Sales → Documents → Sales orders.

The state is changed by commands, not by editing the state field on the card:

State Command Result
Draft Submit order Draft becomes Submitted, unless auto-confirm is on. No stock is reserved yet.
Submitted Approve order The order becomes Approved and creates one SalesRealization in Reserved.
Draft Submit order with auto-confirm on The command uses the same approval path and creates the reserved realization immediately.
Submitted Reject order The order returns to Draft when Reject reason is filled.
Submitted or Approved Cancel order The order becomes Cancelled. A linked, not-yet-issued realization is cancelled too.
Approved invoice command later When the realization reaches Released, the order becomes Delivered.

The reservation belongs to the realization, not to the order. SalesOrderReserveTx is deliberately empty; SalesInvoiceReserveTx writes ReservedStock for Reserved, Picking, Packing, and Shipped realizations. On Released the reservation is not re-posted: stock, revenue, receivable, loyalty, and country VAT replace it.

Filling the card: customer, outlet, contract#

The card fills the party fields as soon as one of them is picked, before the order is saved:

You pick The card fills
Customer the customer's Payment term and Agent (the customer's sales person); the primary contact if Contact is empty; the outlet when the customer has exactly one live outlet — and then everything the outlet fills
Outlet its Customer (and what the customer fills), its contact, the customer's contract in force on the delivery date that covers this outlet, when it is the only one (with two or more such contracts Contract stays empty and you pick it), the Route the outlet is a stop of
Contract its Payment term and Delivery term; the customer and outlet if they are empty

Contract terms win over the customer's: a contract with "Net 14" replaces the customer's "Net 30". Changing the customer clears an outlet, contract, contact and route that belong to another customer, so the order never reaches save with "The outlet belongs to another customer".

The pickers follow the same pairing. Outlet offers only the chosen customer's outlets, Contract only contracts of that customer (and outlet), Contact only that customer's contacts. With no customer picked, they offer everything. The same filling and filtering work on the quotation and the sales invoice; the filtering also on leads, notes, returns and visits.

Example. Customer "Buyer A" has terms Net 30 and agent Ivan, one outlet "Shop A", and that outlet has a contract with Net 14 and DAP and is the first stop of route R1. Picking "Buyer A" fills: outlet Shop A, the contract, payment terms Net 14, delivery terms DAP, agent Ivan, route R1. Switching to "Buyer B" replaces Shop A with B's outlet and clears the contract and route of Shop A.

Settings#

Confirm order on submit#

Where: Sales → Settings → Sales settings, field Confirm order on submit (SalesSettings.ConfirmOrderOnSubmit).

Value Default Behaviour
Empty / off Yes Submit order moves Draft → Submitted. A manager must press Approve order before the realization is created.
On No Submit order runs the same approval service as Approve order. Draft goes straight to Approved, and the reserved realization is created in the same user action.

This setting changes the workflow timing only. The numbers are the same: reservation is still written by the realization, and debt and tax still wait until the realization is Released.

Allow backorder#

Where: Sales → Settings → Sales settings, field Allow backorder (SalesSettings.AllowBackorder).

Value Default Behaviour
Empty / off Yes Approval checks available-to-promise: free stock plus placed purchase orders expected on or before the delivery date. If the quantity is short, the order is not approved and no realization is created.
On No Approval skips the available-to-promise shortage check. The realization is created in Reserved even if there is not enough stock today. The later Release realization still checks free stock before stock is written off.

The check uses the order's Ship-from location. With store discipline on, the service looks across the store behind the picking cell; without discipline it reads that cell directly.

Example with numbers#

Step What is entered Register effect
Draft order 10 pieces at 100, 10% discount none
Submit order with auto-confirm off — none; state is Submitted
Approve order stock is available linked realization in Reserved writes ReservedStock +10
Release realization later same 10 pieces ReservedStock is removed, Stock -10, Revenue +900, Receivable +900 plus tax if configured

If the sales tax rate is 15%, the realization debt becomes 1035, not 900. That happens on Released, not on the order.

Boundaries and edge cases#

  • A contract is mandatory. It must belong to the selected customer and outlet and be active on the delivery date.
  • Contract settlement is checked on approval. Credit uses the contract or customer credit limit; Prepaid requires an advance on the same Receivable slice; CashOnDelivery does not block approval.
  • A second approval does not create a second realization because the realization is found by Source order.
  • A cancelled order removes draft pick tasks and cancels the linked realization only while that realization is not Released.
  • Customer, CustomerOutlet, and the item dictionaries are in Inventory, not in Sales.

What is posted#

SalesOrder itself posts no business numbers. The only subtype transaction script attached to Approved is SalesOrderReserveTx, and it is a compatibility no-op.

The first number in the contour is posted by the linked SalesRealization:

  • Reserved, Picking, Packing, Shipped: ReservedStock + quantity not already held by picking.
  • Released: Stock -, Revenue +, Receivable +, cost of sales in GL if cost layers exist, output VAT if tax is configured.

What's not there yet#

  • E-invoice is not triggered from the sales order; it follows the issued sales realization in country packages (e-invoice envelope).
  • There is no invoice ageing report. Open receivable is Receivable by customer and contract.
  • Open orders are the sales-order list. There is no order backlog report.
  • PickTask and the realization's Picking / Packing states are two related but separate mechanisms.

Same topic for other readers: User

Where next#

Was this page helpful?