# stock-adjustment-create-form

## Overview

Creates a stock adjustment in DRAFT status. The header selects the `adjustmentType`, a free-text reason code, and an adjustment date; a Lines editor captures one or more adjustment lines. The line inputs adapt to the header type: CORRECTION shows a Direction select per line and SCRAP shows a From Category select per line. Line quantities are always positive; the header type and per-line direction/category determine the effect. Submitting invokes the [createStockAdjustment](../resolver/createStockAdjustment.md) resolver.

## Screen Type

Form

### Form Details

#### Input Fields

**Header:**

| Field Name | Field Type | Required (Yes/No) | Options / Lookup |
| --- | --- | --- | --- |
| Adjustment Type | Select | Yes | Correction / Scrap / Block / Unblock |
| Reason Code | text | Yes | — |
| Adjustment Date | date | Yes | — (defaults to today) |

**Lines editor (add/remove rows via "Add Line" / trash icon):**

| Field Name | Field Type | Required (Yes/No) | Options / Lookup | Description |
| --- | --- | --- | --- | --- |
| Item | Combobox (searchable) | Yes | Item lookup | Item reference for the line |
| Storage Location | Combobox (searchable) | Yes | StorageLocation lookup | Storage location the adjustment applies to |
| Quantity | number (positive) | Yes | — | Always positive; the type/direction determines the effect |
| Direction | Select | Conditional | Increase / Decrease | Shown only when Adjustment Type is Correction; applied to AVAILABLE stock |
| From Category | Select | Conditional | Available / Blocked | Shown only when Adjustment Type is Scrap; selects the stock to write off (Available default) |

The Direction and From Category columns are mutually exclusive and driven by the header type: CORRECTION shows Direction, SCRAP shows From Category, and BLOCK / UNBLOCK show neither (the movement is fixed by the type).

**Add Line button:** Appends a blank line row to the table.

**Actions:**

- Create — submits the form (disabled while submitting or when no lines exist)
- Cancel — discards and returns to previous screen

## Access Control

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