# RejectInventoryAdjustment

## Permission Scope

inventoryControl

## Overview

rejectInventoryAdjustment rejects a pending inventory adjustment, transitioning it from PENDING_APPROVAL to REJECTED status. A rejected adjustment does not affect stock levels and cannot be confirmed.

## Business Rules

- Adjustment must exist
- Adjustment must be in PENDING_APPROVAL status

## Process Flow

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

## External Dependencies

- None

## Error Scenarios

- **ADJUSTMENT_NOT_FOUND**: Referenced adjustment does not exist
- **ADJUSTMENT_NOT_PENDING_APPROVAL**: Adjustment is not in PENDING_APPROVAL status

## Test Cases

- returns error when not found
- returns error when not pending
- rejects adjustment
- rejected adjustment does not affect stock
