# ListSalesOrders

## Overview

ListSalesOrders lists sales orders for operational monitoring and work queues. It supports filtering by company, customer, status, channel, and date ranges while returning summary progress fields.

## Business Rules

- At least company scope is required for multi-tenant safety.
- Status filters are optional; omitted status filter returns all statuses.
- Returned rows include summary open-balance metrics for fulfillment and billing work.

## Process Flow

```mermaid
flowchart TD
    A[Receive filter criteria] --> B[Validate company scope]
    B --> C[Query matching SalesOrders]
    C --> D[Compute summary progress fields]
    D --> E[Return matching orders]
```

## External Dependencies

- None

## Error Scenarios

- **COMPANY_SCOPE_REQUIRED**: Company scope is required.

## Test Cases

- lists sales orders by company scope
- filters sales orders by status and customer when provided
- returns summary open-balance metrics
- throws when company scope is missing
