# GetValuationPolicy

## Overview

GetValuationPolicy retrieves a single valuation policy by its id. It returns the full policy record including the costing method (FIFO, AVCO, or STANDARD_COST) and the standard cost rate when applicable. This query supports policy lookup for item valuation configuration and auditing.

## Business Rules

- Requires `id` as input
- Returns the full ValuationPolicy record including:
  - `name` — policy name
  - `costingMethod` — one of FIFO, AVCO, STANDARD_COST
  - `standardCostRate` — present only when costingMethod is STANDARD_COST
- Returns null if no valuation policy exists for the given id

## Process Flow

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

## External Dependencies

- None

## Error Scenarios

- **VALUATION_POLICY_NOT_FOUND**: Referenced valuation policy does not exist

## Test Cases

- returns valuation policy when found by id
- returns null when not found
- includes costing method and standard cost rate
