# ListSalesInvoicesBySalesOrder

## Overview

ListSalesInvoicesBySalesOrder lists invoices issued against one sales order so billing teams can review partial or final billing history.

## Business Rules

- Sales-order identifier is required.
- Returned invoices may be draft, issued, sent, or cancelled unless a status filter narrows the result.

## Process Flow

```mermaid
flowchart TD
    A[Receive sales-order id] --> B[Query invoices by sales order]
    B --> C[Apply optional status filter]
    C --> D[Return invoice history]
```

## External Dependencies

- None

## Error Scenarios

- **SALES_ORDER_ID_REQUIRED**: Sales-order id is required.

## Test Cases

- lists invoices under a sales order
- filters invoices by status when provided
- throws when sales-order id is missing
