# ReviseInventoryAdjustment

## Overview

reviseInventoryAdjustment transitions a rejected inventory adjustment back to DRAFT status, allowing the user to modify and resubmit it. This supports the workflow where a rejected adjustment is corrected (e.g., updated reason code, revised quantity) rather than abandoned.

## Business Rules

- Adjustment must exist
- Adjustment must be in REJECTED status

## Process Flow

```mermaid
flowchart TD
    A[Receive revise request] --> B{Adjustment exists?}
    B -->|No| C[Return error: ADJUSTMENT_NOT_FOUND]
    B -->|Yes| D{Status is REJECTED?}
    D -->|No| E[Return error: ADJUSTMENT_NOT_REJECTED]
    D -->|Yes| F[Update status to DRAFT]
    F --> G[Return updated adjustment]
```

## External Dependencies

- None

## Error Scenarios

- **ADJUSTMENT_NOT_FOUND**: Referenced adjustment does not exist
- **ADJUSTMENT_NOT_REJECTED**: Adjustment is not in REJECTED status

## Test Cases

- returns error when not found
- returns error when not in REJECTED status
- transitions rejected adjustment back to DRAFT
- revised adjustment can be modified and resubmitted
