# approvePurchaseOrder

## Overview

Approves a SUBMITTED purchase order, transitioning status to ORDERED. Locks currency, freezes commercial snapshot, sets confirmedAt.

## Modules Commands Used

- [purchase] ApprovePurchaseOrder

## Exception Handling

| Error Code | Description |
| --- | --- |
| PURCHASE_PURCHASE_ORDER_NOT_FOUND | The specified purchase order does not exist |
| PURCHASE_PURCHASE_ORDER_NOT_SUBMITTED | The purchase order is not in SUBMITTED status and cannot be approved |
| PURCHASE_SUPPLIER_NOT_ACTIVE | The supplier is no longer in active status |
| PURCHASE_PARTNER_NOT_SUPPLIER | The specified partner is not designated as a supplier |
| PURCHASE_ITEM_NOT_ACTIVE | A referenced item is no longer in active status |
| PURCHASE_ITEM_NOT_PURCHASABLE | A referenced item has no purchasing record |
