# ListBillOfMaterialsByItem

## Overview

ListBillOfMaterialsByItem lists BOM versions for one manufactured parent item and scope so planners can compare draft, active, and inactive recipe revisions.

## Business Rules

- Company scope and parent item reference are required.
- Optional filters may restrict by site, status, effectivity date, or `bomType`.
- Results include all statuses by default.
- Results are ordered by effectivity start date and version identifier.

## Process Flow

```mermaid
flowchart TD
    A[Receive company, item, and filters] --> B[Query BOM versions for item and scope]
    B --> C[Apply optional status or date filters]
    C --> D[Order versions]
    D --> E[Return BOM list]
```

## External Dependencies

- None

## Error Scenarios

- **COMPANY_SCOPE_REQUIRED**: Company scope was not provided
- **PARENT_ITEM_REQUIRED**: Parent item reference was not provided.

## Test Cases

- lists BOM versions for a manufactured item
- filters BOM versions by site when provided
- filters BOM versions by status when provided
- filters BOM versions by bomType when provided
- returns all statuses by default
- returns an empty list when no BOM versions exist
- returns error when the parent item reference is missing
- returns error when company scope is missing
