Skip to content

Sales orders statuses

A housekeeping operation that recalculates customer order rows from the documents — how much is shipped and invoiced (the "Shpd. (unappr.)", "Shpd." and "Inv" columns) — and the header flags "fully shipped" and "fully invoiced". Shipped means the row's shipments minus approved returns from the customer. When a row's shipped quantity changes, the "Qty in orders" figure in item statuses is recalculated with it — except for closed orders, whose contribution is no longer there. The "Closed" flag and the reservation ("Reserved qty") are left untouched.

Where to find it: Modules → Database Maintenance → Maintenances → Sales orders statuses

A worked example

Recalculate order statuses

One field — "Customer Account", that is the order number. Empty means "recalculate them all"; a number means just that one. A number that does not exist is refused: "Order Number '…' is not found!".

Why it is needed

The shipped and invoiced quantities in order rows are derived values: the system computes them from shipments and invoices. "Inv" is the quantity on the row's invoices less credit notes, for services and work too; shipped quantities are kept only for goods that go into a shipment. In normal operation no recalculation is needed, but they can fall behind when documents are edited outside the usual path (imports, scripts, manual intervention). An invoice puts its quantity into the order rows its own rows point to — the same way the maintenance counts; so a credit note whose "Credited invoice" was cleared or set to another order's invoice no longer throws "Inv" off.

The symptom is always the same: an order does not show a shipment that exists — or shows as shipped although there is no shipment.

!!! warning "Mind the scale" Running it without a number walks every order in the company. If one document is the problem, name it — faster and safer.

Typical situations

Everything shipped, but the order shows as not shipped. Recalculate the status for that order.

"Closed" is set wrongly. This operation does not change the closed flag: it is set and cleared in the order itself.

The service refuses, naming a register: it is shared from another company, and only that company runs this maintenance. Sales orders or item statuses are shared into this company from another one — the service run in the main company recalculates them. The refusal comes before anything is changed.

"Qty in orders" in item statuses disagrees with the orders. Recalculating order statuses fixes it where the shipped quantity changed; item status recalculation in sales orders rebuilds the figure completely. Neither operation restores the reservation ("Reserved qty").

Where to look next