# ListInventoryAdjustments

## Overview

ListInventoryAdjustments lists inventory adjustments filtered by status, storage location, item, or date range. It returns summary-level records ordered by creation date descending.

## Business Rules

- Accepts optional filters:
  - `adjustmentType` — filter by type (CORRECTION or SCRAP)
  - `status` — filter by adjustment status (e.g., Draft, PendingApproval, Approved, Rejected, Confirmed)
  - `storageLocationId` — filter by storage location
  - `itemId` — filter by item
  - `dateFrom` — filter adjustments created on or after this date
  - `dateTo` — filter adjustments created on or before this date
- Results are ordered by `createdAt` descending (most recent first)
- Returns an empty list if no matching records exist

## Process Flow

```mermaid
flowchart TD
    A[Receive optional filters] --> B[Build query from provided filters]
    B --> C[Apply status, storageLocationId, itemId, date range filters as provided]
    C --> D[Order by createdAt descending]
    D --> E{Records found?}
    E -->|Yes| F[Return list of InventoryAdjustment records]
    E -->|No| G[Return empty list]
```

## External Dependencies

- None

## Error Scenarios

- Returns empty list if no matching records exist

## Test Cases

- lists adjustments by adjustmentType
- lists adjustments by status
- lists adjustments by storage location
- lists adjustments by item
- lists adjustments by date range
- returns empty list when no matches
- orders by creation date descending
