# UpdateSalesPriceList

## Overview

UpdateSalesPriceList revises mutable SalesPriceList fields while the record remains editable under policy.

## Business Rules

- The SalesPriceList must exist before it can be updated.
- The SalesPriceList must remain in an editable lifecycle state.
- Company must be ACTIVE or otherwise eligible for commercial configuration.

## Process Flow

```mermaid
flowchart TD
    A[Receive update request] --> B[Load SalesPriceList]
    B --> C{Record editable?}
    C -->|No| D[Return SALESPRICELIST_NOT_EDITABLE]
    C -->|Yes| E[Validate changed fields]
    E --> F[Persist updates]
    F --> G[Return updated SalesPriceList]
```

## External Dependencies

- [organization::GetCompany](../../../organization/docs/queries/GetCompany.md) - Validate company scope for the price list.

## Error Scenarios

- **SALESPRICELIST_NOT_FOUND**: Referenced SalesPriceList does not exist.
- **SALESPRICELIST_NOT_EDITABLE**: SalesPriceList is not in an editable lifecycle state.
- **COMPANY_NOT_FOUND**: Referenced company does not exist.

## Test Cases

- updates mutable SalesPriceList fields
- returns error when SalesPriceList does not exist
- returns error when SalesPriceList is not editable
- returns error when the company backing the price list does not exist
