# GetInventoryAdjustment

## Overview

GetInventoryAdjustment retrieves a single inventory adjustment by id. It returns the full record including current status, reason code, quantity change, and references to the associated item, storage location, and optional lot or serial number. This serves as the detail view for reviewing or approving an adjustment.

## Business Rules

- Requires `id`
- Returns the full InventoryAdjustment record including:
  - `adjustmentType` (CORRECTION or SCRAP)
  - Current status (Draft, PendingApproval, Approved, Rejected, Confirmed)
  - `itemId`, `storageLocationId`, `quantityDelta`, `reasonCode`
  - Optional `lotId`, `serialNumberId`, `inventoryCountId`
- Returns null if no matching adjustment is found

## Process Flow

```mermaid
flowchart TD
    A[Receive id] --> B[SELECT from InventoryAdjustment where id matches]
    B --> C{Adjustment found?}
    C -->|Yes| D[Return InventoryAdjustment record]
    C -->|No| E[Return null]
```

## External Dependencies

- None

## Error Scenarios

- **INVENTORY_ADJUSTMENT_NOT_FOUND**: No adjustment matches the given id — caller receives null

## Test Cases

- returns adjustment when found
- returns null when not found
- includes status and reason code
- includes optional lot and serial number references
