# cancelSalesOrder

## Overview

Cancels a sales order (受注) in DRAFT, SUBMITTED, or CONFIRMED `orderStatus`, transitioning it to CANCELLED. Cancellation is blocked once fulfillment or billing progress exists. Thin wrapper over the native `sales` cancel command.

Input: `id`.

## Modules Commands Used

- [sales] CancelSalesOrder

## Exception Handling

| Error Code | Description |
| --- | --- |
| SALES_SALES_ORDER_NOT_FOUND | The specified sales order does not exist |
| SALES_INVALID_ORDER_STATUS | The sales order status does not allow cancellation |
| SALES_CANCELLATION_BLOCKED | The sales order cannot be cancelled (e.g., shipments exist) |
