# ListSalesOrders

## Overview

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

## Business Rules

- At least company scope is required for multi-tenant safety.
- All three status-axis filters are optional.
- 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 orderStatus and customer when provided
- returns summary open-balance metrics
- throws when company scope is missing
