# ListItemValuations

## Overview

ListItemValuations lists valuation policy assignments for items. It supports filters on specific items or valuation policies. Inventory value itself is carried by the general ledger and the methods' own cost state, not stored here.

## Business Rules

- Optionally accepts `itemIds` — an array of item UUIDs to filter by
- Optionally accepts `companyId` — filter by a specific company
- Optionally accepts `valuationPolicyId` — filter by a specific valuation policy
- Returns a list of ItemValuation association records
- Supports pagination via `limit` and `offset` parameters; returns `hasNextPage` to indicate more results
- Returns an empty list if no matching records exist

## Process Flow

```mermaid
flowchart TD
    A[Receive optional filters] --> B{itemIds provided?}
    B -->|Yes| C[SELECT from ItemValuation where itemId in itemIds]
    B -->|No| D{valuationPolicyId provided?}
    C --> D
    D -->|Yes| E[Filter by valuationPolicyId]
    D -->|No| F[No additional filter]
    E --> G{Records found?}
    F --> G
    G -->|Yes| H[Return list of ItemValuation records]
    G -->|No| I[Return empty list]
```

## External Dependencies

- None

## Error Scenarios

- Returns empty list if no matching records exist

## Test Cases

- lists all item valuations
- filters by item IDs
- filters by company
- filters by valuation policy
- returns empty list when no matches
