# Orders

## Orders

An Order records the accepted commercial commitment that follows an eligible Offer and carries the
work through delivery. Use this page to find an Order, check its commercial details, and choose the
state-dependent action that matches the work still to do.

```mermaid
stateDiagram-v2
    Offer --> Order: convert eligible Offer
    Order --> Delivered: deliver all active order work
    Order --> Offer: Back to Offer
    Order --> Rejected: Reject Order Acceptance
    Order --> Cancelled: Cancelled order
```

| If you need to… | Go to |
|---|---|
| Find the Orders work list and open a record | [Find and open an order](#find-and-open-an-order) |
| Check the panel fields and item rules | [Order fields](#order-fields) |
| Send a pricing request, print, amend, or request approval | [Supporting order tools](#supporting-order-tools) |
| Confirm, activate, ship, or deliver the Order | [Confirm, activate, and progress an order](#confirm-activate-and-progress-an-order) |
| Correct, reject, cancel, or return the Order | [Amend, reject, cancel, and return an order](#amend-reject-cancel-and-return-an-order) |
| Continue with warehouse work | [Warehouse fulfillment flow](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/warehouse-fulfillment-flow) |
| Continue with terminal or archived exits | [Missed, regretted, and cancelled jobs](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/missed-regretted-and-cancelled-jobs) |
| Follow a draft invoice | Invoice lifecycle |
| Follow the Order-to-Delivered hand-off | From orders to delivered |

![Orders list with the Orders tab selected and its work-list columns](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/a7e0b2610eb91658aa53c379c198b91a.png)

Start with an existing Order. Create an Order through the Offer workflow. Continue detailed warehouse
receipt, inspection, stock, issue, and delivery-note work in [Warehouse fulfillment flow](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/warehouse-fulfillment-flow).

## Before you start

Before you use an order action, have the following ready:

| Have or check | Why it matters |
|---|---|
| A saved, editable sales job with no unsaved Order changes | Order actions are available from this saved record state. |
| **Client**, **Vendor**, and at least one item | Confirmation validates the parties and requires an item. |
| Item descriptions, quantities, prices, discounts, and tax | These values are checked before confirmation. |
| Any fields required by your configured form rules | Company configuration can add mandatory fields. |
| Membership of the job's branch | Delivery is refused when you do not belong to that branch. |
| A delivery check that permits the action | A delivery check is the rule that can stop conversion while the PM process is ongoing. |
| Approval capability, where an approval process controls confirmation | The available approval controls depend on the process and your capability. |

The Order must be editable for changes. Do not begin a confirmation or delivery action until the
values you intend to commit are saved.

## Find and open an order

The Orders work list is the sales-job list filtered to records at the Order stage; opening a row
takes you to that sales-job record.

**Prerequisites**

- You can open the Sales jobs work lists.
- You know which saved Order record to open.

**Steps**

1. Open **Sales**.
2. Open **Sales jobs**.
3. Select **Orders**.

   The list shows the Orders tab and its configured columns, such as `Job No.`, `File No.`,
   `Sales responsible`, `Vendor`, `Client`, `Job title`, `Order price (€)`,
   `Order price (incl. tax)`, **Order Backlog**, `Order backlog (€)`, `Order stage`,
   `Job status`, `Order date`, `Forecast delivery date`, and `PM status`.

4. Select the row for the Order.

   The sales-job record opens.

5. Check the stage bar for **Order** or a later stage before working with order controls.

**Result:** The Order record is open and its Order panel is available when the record is at Order or
a later stage.

An inquiry-stage record is earlier than Order and does not expose order actions. **Activate Order**
is available only from the applicable later Order state.

![Inquiry-stage record without order actions](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/331c886eb9ce1ca0969421a8277af63f.png)

## Understand the order panel

The Order panel is the part of the sales-job record that holds the accepted commercial arrangement
and its delivery and payment details. It is initially collapsed, so expand it before inspecting
fields or opening its menu.

**Prerequisites**

- You have opened an Order record.

**Steps**

1. Locate the collapsed Order panel title bar showing the client, vendor, or stage information.
2. Select the panel title bar or its expander.
3. Check **Client**, **Vendor**, **Order Date**, **Delivery Term**, and **Payment Method**.
4. Open the Order panel menu.
5. Choose an action that matches the Order state and the work you need to perform.

**Result:** The Order panel is expanded, its principal fields are visible, and its menu shows the
controls available for the current state and permissions, including **Order amendment** and
**Enable Editing** when their conditions apply.

![Expanded Order panel with fields and state-dependent actions](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/6ee5b7eaacd1f6d387beafa30393945a.png)

### Order fields

Order fields describe the parties, commercial document, delivery arrangement, payment terms, and
items that make up the accepted commitment.

| Area | Fields and rules |
|---|---|
| Parties and numbers | **Client** and **Vendor** identify the parties. **Client Order No.** and **Vendor Order No.** are required only when company rules make them mandatory. |
| Dates | **Order Date** is required in Draft and cannot be earlier than the Offer date. **Order Activation Date** is required only when configured, must be from the Order Date through today, and cannot be earlier than the Order Date. |
| Delivery | **Delivery Time** is required only when configured, has a minimum of 1, and is bounded by the configured maximum. **Shipping Address** and **Delivery Term** are required only when configured. |
| Payment | **Payment Method** and **Payment Period** are required only when configured. **Payment Period** has a minimum of 1 and a configured maximum. **L/C Number** is required only when configured. |
| External order reference | **External order no.** is required only when configured and appears when the record is not handled by the supplier. |
| Item grid | Each item needs **Item Description**. **Qty** must be greater than 0 and no more than 999,999.00. **Unit Price** and **Item Price** cannot be negative. **Discount (%)** and **Tax (%)** range from 0 through 100. |
| Item-dependent fields | **Unit** and the quantity and price controls are unavailable for package items or selected products according to the item type. **Item Price** is unavailable for unitized items. **Currency** and **Discount limit (%)** are read-only. |
| Order totals and follow-up | The panel carries item totals, payment milestones when that feature is enabled, backlog, custom fields, **Order Activation Conditions**, **Technical Notes**, and **Commercial Notes** when their saved/configured conditions apply. |

The maintained **Unit** list contains `Pieces`, `Litr`, `Meter`, `KG`, `SET`, `Number`, `LSM`, `InCH`,
`EA`, `ST`, `Ton`, and `ZZ-doc-Enter-Unit-Name`. The list is maintained in the Units configuration
area and appears in the order row when the row is not a package item and no product selection removes
the control.

When the record configuration supplies them, the opened panel includes **Forecasted Delivery Date**,
**Partial Delivery**, and `Shahawy Extra`. Required markers appear where the configured rule and
record state make a field mandatory.

When the Order has binding invoices, **Vendor** is disabled and commercial item edits are locked.
The product and item values therefore need to be correct before invoice-bound work begins.

### Supporting order tools

Supporting tools prepare, document, or govern order work; they do not by themselves represent the
normal progression from Order to Delivered.

| If the Order is… | Use | What the control supports |
|---|---|---|
| Draft, in supplier context, and saved without unsaved changes | **Request Pricing Confirmation** | Request pricing confirmation; the request can open `Request Order Prices Confirmation From`. |
| Saved with commission viewing enabled, in supplier context | **Calculation Sheet** | Review the calculation sheet when the feature conditions apply. |
| Valid or Ready For Shipment and amendment is available | **Order amendment** | Start an amendment where the Order Amendment subscription permits it. |
| Editable and not rejected or cancelled | **Enable Editing** | Re-enable editing for an editable Order state. |
| Printing is allowed | **Print** or **Order template** | Print the Order or use the configured Order template. |
| An approval process makes the Order requestable | **Request approval** | Send the Order into the approval path. |
| You can approve an approval-stage Order | **Approve** | Approve the request. |
| Rejection awaits an approval decision | **Approve Rejected** or **Disapprove Rejected** | Approve or disapprove the rejection request when advanced approval applies. |
| Cancellation awaits an approval decision | **Approve Cancelled** or **Disapprove Cancelled** | Approve or disapprove the cancellation request when advanced approval applies. |
| Mail is allowed and the Order is eligible | **Send order confirmation to client** | Prepare the client confirmation mail with the Order attachment. |
| The Order awaits activation and mail is allowed | **Re-send order confirmation to client** | Prepare the confirmation mail again. |

Treat **Send order confirmation to client** and **Re-send order confirmation to client** as client
communication actions. These controls prepare the client confirmation mail in **Mail**, using
**Send To Client** as the dialog action.

## Confirm, activate, and progress an order

When an accepted commercial commitment is ready for confirmation, review the conditions below before
selecting a control. The available route differs for an own-company order and an external-supplier
order.

| Order condition | Select |
|---|---|
| Ready to record submission to the client when mail sending is unavailable | **Consider Order As Confirmed To Client** |
| Valid and own-company supplier | **Ready for shipment** |
| Ready For Shipment and own-company supplier | **Deliver Order** |
| Valid and external supplier | **Deliver Order** |
| Awaiting Activation or the alternate awaiting-activation state | **Activate Order** |

**Prerequisites**

- The Order is saved and editable with no unsaved Order changes.
- **Client**, **Vendor**, and at least one item are present.
- The item and configured form validations pass.
- You belong to the job branch and the delivery check permits delivery.

**Steps**

1. Open the Order panel menu.
2. Select the control that matches the Order condition.

   | Order condition | Select | What happens next |
   |---|---|---|
   | Ready to record client submission when mail sending is unavailable | **Consider Order As Confirmed To Client** | The result is `Order Submitted to Client`. A zero-priced Order opens the **Order price zero** confirmation route. |
   | Awaiting Activation or the alternate awaiting-activation state | **Activate Order** | The **Confirm activation date** dialog opens. |
   | Valid and own-company supplier | **Ready for shipment** | No date dialog opens. |
   | Ready For Shipment and own-company supplier | **Deliver Order** | The delivery date dialog opens. |
   | Valid and external supplier | **Deliver Order** | The delivery date dialog opens. |

3. If **Confirm activation date** opens, enter **Order Activation Date** when required.
4. Submit the activation confirmation with a date from **Order Date** through today.
5. If the delivery date dialog opens, enter **Delivery Date**.
6. Keep **Delivery Date** on today or an earlier date.
7. Use the dialog's confirmation control.

   For external-supplier delivery, the result is `Order updated successfully. A draft invoice was
   created. Check the Invoices tab for details.`

Check the stage bar for **Delivered** after all active Order work is delivered.

> **Note:** Partial delivery leaves the job short of **Delivered** until all active Order work is
> delivered.

**Result:** The Order is confirmed, activated where required, ready for shipment, or delivered. A
partial delivery leaves the job short of Delivered; the job reaches Delivered only when delivered
orders equal the active orders.

## Amend, reject, cancel, and return an order

These controls are alternate routes for an Order that needs correction, rejection, cancellation, or
return to the Offer stage. Each appears only for the state and branch conditions listed below.

| Current situation | Control and result |
|---|---|
| Awaiting activation | **Consider Order As Not Confirmed To Client** returns the Order to the applicable approved or draft state. |
| Valid | **Not activated yet** returns the Order to the applicable approved or draft state; on-delivery invoices can block the reversal. |
| Ready For Shipment in the permitted own-company branch | **Not ready for shipment yet** returns the Order to Valid and reverses invoice creation; on-delivery invoices can block it. |
| Delivered in the permitted branch | **Not delivered yet** returns an own-company Order to Ready For Shipment or an external-supplier Order to Valid; on-delivery invoices can block it. |
| Draft, awaiting approval, or rejected approval | Select **Reject Order Acceptance**; the available rejection dialog and approval controls depend on the current approval state. |
| Rejected or awaiting a decision you cannot make | **Consider as not rejected** returns the job to Order. |
| An Order that is not already delivered, rejected, or cancelled and has no pending approval decision | **Cancelled order** starts the cancellation route. |
| Cancelled or awaiting a decision you cannot make | **Consider As Not Cancelled** is the cancellation return control. |
| Draft non-direct/non-instant job, or awaiting/rejected approval | **Back to Offer** returns the job to Offer; when every Order is Draft, the confirmation uses **Back to inquiry** and **OK**. |
| Valid or Ready For Shipment with the Order Amendment subscription | **Order amendment** starts the amendment route. |

**Prerequisites**

- The Order state matches one of the rows above.
- The required branch, approval, subscription, and invoice conditions are satisfied.
- You have checked whether active delivery or binding invoices prevent a reversal.

**Steps**

1. Open the Order panel menu.
2. Select the control that matches the current Order state.
3. If a rejection dialog opens, complete the rejection fields shown in that dialog.
4. If the return-to-Offer confirmation opens, select **Back to inquiry**.
5. If the confirmation asks for acceptance, select **OK**.
6. Check the stage bar and the Order panel menu for the resulting state.

**Result:** The permitted correction, rejection, cancellation, return, or amendment route is
completed, and the record shows the resulting state or the reason the action remains unavailable.

After selecting **Cancelled order**, use **Approve Cancelled**, **Disapprove Cancelled**, or
**Consider As Not Cancelled** when those controls appear for the current approval state.

## When an order action does not work

Use the message on screen and the current record state to locate the blocker.

| What you see | What it means | What to check |
|---|---|---|
| `Order must have at least one item` | The Order has no item. | Add at least one item before confirmation. |
| `Invalid input. The value must be greater than 0 and cannot exceed 999,999.00` | A quantity is outside its permitted range. | Check **Qty**. |
| `Invalid input. Please enter a non-negative value` | A price is negative. | Check **Unit Price** or **Item Price**. |
| `Please enter action for each milstone  ` | A payment milestone has no action. | Complete the action for every payment milestone. |
| `This field is required` | A configured required field is empty. | Complete the field marked as required. |
| `This action is only allowed if you belong to that branch.` | The job belongs to a branch you do not belong to. | Use the job's branch context or contact the branch owner. |
| `Cannot be converted to delivered because the PM process is ongoing.` | The delivery check does not permit delivery while the PM process is ongoing. | Complete or resolve the PM process before delivery. |
| `This order has binding invoices. It cannot be reverted.` | An attempted reversal is blocked by binding invoices. | Continue with the invoice-bound state rather than reverting it. |
| **Activate Order** is absent | The record is not in an activation state, or it is an earlier stage such as Inquiry. | Check the stage bar and open the Order panel on an Order-stage record. |
| **Order amendment** is absent | The Order is not Valid or Ready For Shipment, or the Order Amendment subscription is unavailable. | Check the Order state and subscription. |
| Approval controls are absent | No approval process applies, or your approval capability does not permit the action. | Check the configured approval process and your capability. |
| `An error occurred while processing your request` | Processing stopped without a more specific message. | Check the record state, permissions, branch, and required values before retrying. |

The validation also checks item descriptions, discounts, tax, **Client**, **Vendor**, and configured
form validators. Price and quantity errors can therefore appear alongside the messages above.

### Messages

Use the context column to decide whether a message belongs to Order work before acting.

| Context | Message |
|---|---|
| Order quantity validation | `Invalid input. The value must be greater than 0 and cannot exceed 999,999.00` |
| Order price validation | `Invalid input. Please enter a non-negative value` |
| Payment-milestone validation | `Please enter action for each milstone  ` |
| Order item validation | `Order must have at least one item` |
| Order delivery reversal | `Cannot be un-delivered — a due invoice already exists` |
| Shared Order action | `An error occurred while processing your request` |
| Shared confirmation | `Your request was completed successfully` |
| Shared validation | `This field is required` |
| Custom-field confirmation | `Custom fields saved successfully` |
| Sales-job confirmation | `Job updated successfully` |
| Archived-job confirmation | `Job deleted successfully` |
| Archived-job confirmation | `Job regretted successfully` |
| Archived-job confirmation | `Job cancelled successfully` |
| Archived-job confirmation | `Job missed successfully` |
| Archived-job confirmation | `Job reactivated successfully` |
| Sales-job conversion | `Converted to offer successfully` |
| Sales-job conversion | `Converted to inquiry successfully` |
| Custom-field error | `Error saving custom fields` |
| Offer reversal validation | `All offers must be in draft status to revert to inquiry` |
| Account validation | `An account with this name already exists` |
| Project validation | `A project with this name already exists` |
| Inquiry validation | `Please save opened inquiry first` |
| Inquiry reversal validation | `All inquiries must be in draft stage to revert to potential` |
| Account validation | `Error: Vendor not saved yet` |
| Account validation | `Error: Client not saved yet` |
| Account validation | `This Field Is Required` |
| Contact validation | `You already have a contact with this name` |
| Bill-of-materials validation | `Booked quantity for this job is greater than the required BOM quantity` |
| Purchasing restriction | `You cannot edit or delete the product after the purchase package is created` |
| Purchasing restriction | `Cannot be deleted. Product is in purchasing` |
| Purchase-order restriction | `You cannot edit the product after the PO is created` |
| Bill-of-materials restriction | `This product is already included in BOM` |
| Product restriction | `The first variant cannot be deleted` |
| CRM error | `An error occurred while connecting to your CRM system.` |
| Product selection validation | `Please select one product` |
| Procurement validation | `Required Receiving After` |
| Material-requisition validation | `You cannot save without adding at least one product` |
| Task restriction | `This record is related to saved data and cannot be deleted` |
| Activity restriction | `Action not allowed` |
| Purchasing validation | `Please select one or more items to create a RFQ.` |
| Procurement-inquiry validation | `Required Offer Type` |
| Procurement-inquiry validation | `Required Bid Due Date` |
| Reference validation | `Serial you have entered already exist and belong to same manufacturer` |
| Reference validation | `There is error in serial you have entered` |
| Reference validation | `Minimum: At least one serial` |
| Letter-of-guarantee validation | `Please Add Extension to activate the LG` |
| Letter-of-guarantee restriction | `LG has one or more extensions or deductions and cannot be reverted to the requested stage` |
| Letter-of-guarantee validation | `Please choose a date after the current expiry date` |
| Activity validation | `One topic and at least one note is required` |

### Out-of-scope messages

#### Contacts and account messages

When you work with contacts or account details, these messages relate to those areas rather than to
the Order panel.

| Owning context | Message |
|---|---|
| Contacts | `Forbidden characters detected. Please remove them and try again.` |
| Deliveries | `Error loading accounts` |
| Procurement order | `Required Receiving Date` |
| Accounts | `Error: Vendor not saved yet` |
| Accounts | `Error: Client not saved yet` |
| Accounts | `This Field Is Required` |
| Contacts | `You already have a contact with this name` |
| Bill of materials | `Booked quantity for this job is greater than the required BOM quantity` |
| Bill of materials | `You cannot edit or delete the product after the purchase package is created` |
| Bill of materials | `Cannot be deleted. Product is in purchasing` |
| Bill of materials | `You cannot edit the product after the PO is created` |
| Products | `This product is already included in BOM` |
| Products | `The first variant cannot be deleted` |
| Products | `An error occurred while connecting to your CRM system.` |
| Products | `Please select one product` |
| Material requisition | `You cannot save without adding at least one product` |
| Tasks | `This record is related to saved data and cannot be deleted` |
| Activities | `Action not allowed` |
| Purchasing | `Please select one or more items to create a RFQ.` |
| Procurement inquiry | `Required Offer Type` |
| Procurement inquiry | `Required Bid Due Date` |
| Procurement order | `Required Receiving After` |
| Offers | `Please save opened cost sheet first` |
| Item selection or package page | `No remaining items. All items have been selected` |
| Package page | `Package must have at least one item` |
| Inquiry page | `Inquiry must have at least one item` |
| Offer page | `Offer must have at least one item` |
| Email dialog | `Please enter at least one email` |
| Item maintenance page | `Items labeled as ‘Ready for Shipment’ or ‘Delivered’ cannot be deleted` |
| Item maintenance page | `One or more items has ZERO quantity` |
| Item maintenance page | `One or more items has no unit` |

## Continue after the order

Delivered is the normal destination after all active Order work is delivered. For an external
supplier, delivery creates a draft invoice and the message directs you to the **Invoices** tab.
Completed work is available under **Archived** > **Delivered**. Detailed delivery work after the
Order page belongs to the warehouse process.

| After this Order outcome | Continue in |
|---|---|
| All active order work is delivered | **Sales** > **Sales jobs** > **Archived** > **Delivered** |
| External-supplier delivery created a draft invoice | **Invoices** tab |
| Warehouse receipt, inspection, stock, issue, or delivery-note work remains | [Warehouse fulfillment flow](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/warehouse-fulfillment-flow) |
| A terminal or archived exception needs review | [Missed, regretted, and cancelled jobs](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/missed-regretted-and-cancelled-jobs) |
