# submitSalesOrder

## Overview

Submits a DRAFT sales order (受注) for approval, transitioning status to SUBMITTED. A shipping address is required on the order before it can be submitted when a line needs physical fulfilment (the default). Thin wrapper over the native `sales` submit command.

Input: `id`.

## Modules Commands Used

- [sales] SubmitSalesOrder

## Exception Handling

| Error Code | Description |
| --- | --- |
| SALES_SALES_ORDER_NOT_FOUND | The specified sales order does not exist |
| SALES_INVALID_ORDER_STATUS | The sales order is not in DRAFT status and cannot be submitted |
| SALES_EMPTY_ORDER_NOT_ALLOWED | The sales order has no line items |
| SALES_SHIPPING_ADDRESS_REQUIRED | A shipping address is required before submission when a line needs physical fulfilment |
