> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alforse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sales orders

> A confirmed commitment to deliver to a customer: how a sales order is built, confirmed, shipped, invoiced, and turned into jobs, tracked line by line through its statuses.

A **sales order** is your confirmed commitment to deliver items to a customer. Sales staff create one directly or from an accepted quote; from then on, shipments, invoices, and make-to-order jobs all point back at its lines.

## How an order tracks fulfillment

An order is fulfilled line by line, not all at once. Each line keeps three quantities apart: how many were ordered, how many have shipped, and how many have been invoiced. That lets you ship part of an order, bill part of it, and see exactly what is still owed on each line.

An order stays open until every line is both shipped and invoiced. Shipping and invoicing are independent, so either can run ahead of the other.

## Line fields

A line's **type** sets what it sells: *Part*, *Service*, *Material*, *Tool*, or *Consumable* for the five item kinds, plus *Fixed Asset*, and *Comment* for a note line that carries no charge.

FieldType

<details>
  <summary>**Item**`reference`</summary>

  The item being sold.
</details>

<details>
  <summary>**Sale quantity**`number`</summary>

  The quantity the customer ordered.
</details>

<details>
  <summary>**Quantity sent**`number`</summary>

  The quantity shipped so far. `quantity to send` is what is left to ship.
</details>

<details>
  <summary>**Quantity invoiced**`number`</summary>

  The quantity billed so far. `quantity to invoice` is what is left to bill.
</details>

<details>
  <summary>**Unit price**`number`</summary>

  The price per unit, after discounts.
</details>

<details>
  <summary>**Method**`enum`</summary>

  How the line is fulfilled: *Make to Order*, *Pull from Inventory*, or *Purchase to Order*. See [method type](https://docs.alforse.com/docs/reference/methods.md#method-type).
</details>

## Working an order

### Build the order

Create the order and select **Add Line Item** for each item. While the order is **Draft** you can change anything on it.

### Confirm it

Select **Confirm**. The button works only on a **Draft** or **Needs Approval** order that has at least one line. Confirming commits the order: its quantities now count as on order when Alforse calculates supply and demand. If email is available, **Send Via** lets you email the confirmation to the customer.

### Create jobs for made lines

From the order's menu, select **Convert Lines to Jobs**. Only lines whose method is *Make to Order* produce jobs. The action is available while the order is **To Ship and Invoice** or **To Ship**, and it needs permission to create in production.

### Ship and invoice

Select **Ship** to create a shipment and **Invoice** to create an invoice. **Ship** is available while the order still owes a shipment (**To Ship and Invoice** or **To Ship**); **Invoice** while it still owes an invoice (**To Ship and Invoice** or **To Invoice**).

To change a confirmed order, select **Reopen** in the order's menu, which returns it to **Draft**. To stop an order, select **Cancel**.

## Status

The stored status tells you what the order still owes. Alforse updates it as shipments and invoices post.

<details>
  <summary>**Draft**</summary>

  Being built and not yet committed. The only status in which the order can be edited freely.
</details>

<details>
  <summary>**Needs Approval**</summary>

  Held for sign-off, gated by the order amount.
</details>

<details open>
  <summary>**To Ship and Invoice**</summary>

  Confirmed. Nothing has shipped or been billed yet.
</details>

<details>
  <summary>**To Ship**</summary>

  Fully invoiced, but still owes a shipment.
</details>

<details>
  <summary>**To Invoice**</summary>

  Fully shipped, but still owes an invoice.
</details>

<details>
  <summary>**Completed**</summary>

  Every line has shipped and been invoiced.
</details>

<details>
  <summary>**Closed**</summary>

  Ended before it was complete.
</details>

<details>
  <summary>**Cancelled**</summary>

  Abandoned.
</details>

NOTE

**Why the list can say In Progress**

The order list shows a computed **display status** on top of the stored one. It can read **In Progress** while the stored status is still *To Ship and Invoice*: that means a make-to-order line has jobs that are not finished. The stored status is what drives the flow.

### When an order is locked

From confirmation onward the order is locked: at **To Ship and Invoice**, **To Ship**, **To Invoice**, **Completed**, **Cancelled**, and **Closed** you cannot edit the header or add or delete lines. Reopening to **Draft** lifts it, and any shipping or invoicing that already happened stays on the books.

## Troubleshooting

### "Cannot modify a confirmed sales order." / "Cannot modify a locked sales order. Reopen it first."

**Cause:** the order has been confirmed, so it is locked. **Fix:** select **Reopen** to return it to **Draft**, make the change, and confirm it again.

### "Cannot add lines to a locked sales order. Reopen it first." / "Cannot delete lines on a locked sales order. Reopen it first."

**Cause:** the same lock, reached from the line editor. **Fix:** reopen the order to **Draft** before adding or removing lines.

### "No jobs were created"

**Cause:** **Convert Lines to Jobs** found no eligible lines, because none of the selected lines is made. *Pull from Inventory* and *Purchase to Order* lines never produce jobs. **Fix:** check each line's method.

### "Failed to insert job"

**Cause:** creating a job from the line was rejected. **Fix:** check that the line's item has an active make method and that the order has a location, then retry.

## Related

**Quotes**

How a quote becomes a sales order.

[Open](https://docs.alforse.com/docs/reference/quotes.md)

**Jobs**

A make-to-order line becomes a job that builds the item.

[Open](https://docs.alforse.com/docs/reference/jobs.md)

**Shipments**

How goods leave against the order's lines.

[Open](https://docs.alforse.com/docs/reference/shipments.md)

**Invoices**

How the order is billed.

[Open](https://docs.alforse.com/docs/reference/invoices.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.