# DeactivateSalesPriceList

## Permission Scope

salesPricing

## Overview

DeactivateSalesPriceList removes an active SalesPriceList from future operational use while preserving historical references.

## Business Rules

- Only ACTIVE SalesPriceList records may be deactivated.
- Historical references to the SalesPriceList must remain valid after deactivation.

## Process Flow

```mermaid
flowchart TD
    A[Receive deactivate request] --> B[Load SalesPriceList]
    B --> C{Status is ACTIVE?}
    C -->|No| D[Return INVALID_SALESPRICELIST_STATUS]
    C -->|Yes| E[Set status to INACTIVE]
    E --> F[Return deactivated SalesPriceList]
```

## External Dependencies

- None

## Error Scenarios

- **SALESPRICELIST_NOT_FOUND**: Referenced SalesPriceList does not exist
- **INVALID_SALESPRICELIST_STATUS**: SalesPriceList status does not allow this operation

## Test Cases

- deactivates an active SalesPriceList
- throws when SalesPriceList is not active
