# GetPurchasePriceList

## Overview

GetPurchasePriceList retrieves a supplier purchase price list together with all of its purchase price rules.

## Business Rules

- Lookup key is price-list id
- Returns price lists in any status so historical supplier contracts remain inspectable
- Response includes embedded purchase price rules and their current statuses
- Returns null when the price list does not exist

## Process Flow

```mermaid
flowchart TD
    A[Receive priceListId] --> B[Select PurchasePriceList and rules by id]
    B --> C{List found?}
    C -->|Yes| D[Return price list with rules]
    C -->|No| E[Return null]
```

## External Dependencies

- None

## Error Scenarios

- **PRICE_LIST_NOT_FOUND**: No purchase price list exists for the given id; caller receives null

## Test Cases

- returns purchase price list when found
- returns embedded purchase price rules with the list
- returns null when purchase price list does not exist
