# stock-adjustment-detail

## Overview

Displays full details of a single stock adjustment including header information and its lines. Available actions vary by status: a DRAFT adjustment can be submitted or cancelled; a SUBMITTED adjustment can be confirmed or rejected.

## Screen Type

DetailView

### DetailView Details

#### Displayed Fields

- **Header**
  - Type (`adjustmentType`) — CORRECTION / SCRAP / BLOCK / UNBLOCK
  - Status (`status`) — Badge: DRAFT (neutral), SUBMITTED (info), REJECTED (error), CONFIRMED (success), CANCELLED (neutral)
  - Reason Code (`reasonCode`)
  - Adjustment Date (`adjustmentDate`)
  - Rejection Reason (`rejectionReason`) — shown only when present
- **Lines** (table, via the `stockAdjustmentLines` connection)
  - Item (`itemId`)
  - Storage Location (`storageLocationId`)
  - Effect — the line's `adjustmentDirection` for CORRECTION; otherwise the header type. For SCRAP the source category (`fromStockCategory`) is shown.
  - Quantity (`quantity`)

#### Available Actions

| Action | Condition | Requires Input | Confirmation | Resolver |
| --- | --- | --- | --- | --- |
| Submit | status = DRAFT | No | Yes | submitStockAdjustment |
| Cancel | status = DRAFT | No | Yes | cancelStockAdjustment |
| Confirm | status = SUBMITTED | No | Yes | confirmStockAdjustment — applies the stock movement (ledger entries + StockLevel updates) |
| Reject | status = SUBMITTED | Yes (optional rejection reason) | Yes | rejectStockAdjustment |
| Back to Stock Adjustments | always | No | No | _navigate to stock-adjustment-list_ |

## Access Control

- [inventory-manager](../actor/inventory-manager.md)
- [approver](../actor/approver.md)
