Statuses
The status of each kind of record, what moves it on, and what refuses the move.
On this page
A record has one status and a revision. A change that its status does not allow is refused with wrong_status and changes nothing. A refusal never half-applies: the record stays as it was.
Sales orders
| Status | Meaning |
|---|---|
draft | Entered. confirmSalesOrder moves it on. |
confirmed | reserveSalesOrder sets stock aside. The order stays confirmed while any line is short. |
reserved | createDelivery moves it on. |
delivered | createInvoice moves it on. |
invoiced | recordInvoicePayment moves it to paid when the balance reaches zero; a part keeps it invoiced. |
paid | Final. Nothing changes on it. |
Moves are refused for these reasons: credit_limit_exceeded on confirming, when the unpaid invoices of the customer plus the order are over the limit; nothing_to_reserve on reserving, when no unit that a line still wants is free; amount_exceeds_balance on paying more than the balance.
Supplier bills
| Status | Meaning |
|---|---|
draft | Recorded, or sent back with a reason. Its lines can be corrected. submitSupplierBill sends it for approval. |
awaiting_approval | approveSupplierBill takes the next step; after the last one the bill is approved. It can be held, released and rejected here. |
approved | scheduleSupplierBill sets the day it is paid. |
scheduled | recordSupplierBillPayment closes it on or after the scheduled day. |
paid | Final. |
The approval chain has 3 steps, taken in this order: requester, lead, finance. nextStep on the bill names the step that approves next; any other step is refused with wrong_approval_step. A bill on hold is refused with bill_held until it is released.
Match of a supplier bill
The match is not a status you set. It is worked out from the bill, its purchase order and the receipts of that order every time you read the bill, so a receipt that arrives later changes it.
| Status | Meaning |
|---|---|
matched | Every line bills the quantity received at the price ordered. |
quantity_differs | A line bills a quantity other than the one received. |
price_differs | Quantities agree, but a line bills a price other than the one ordered. |
receipt_missing | None of the billed items has been received on the order. |
Results are matched, quantity_differs, price_differs, receipt_missing. A bill with receipt_missing cannot be submitted; a bill whose match differs can be submitted but not approved.
Work orders
| Status | Meaning |
|---|---|
not_started | Planned. startWorkOrder moves it on. |
in_progress | finishWorkOrder consumes the components and adds the made items. |
done | Final. produced holds the quantity made. |
Invoices and purchase orders
| Record | Status | Meaning |
|---|---|---|
| Invoice | issued | Nothing paid yet. |
| Invoice | partly_paid | Part of the total is paid; balance is what remains. |
| Invoice | paid | The payments cover the total. |
| Purchase order | open | At least one unit is still to arrive. |
| Purchase order | received | Everything arrived. |