patch https://cardda.herokuapp.com/v1/erp/payouts/purchase_orders/
Updates an existing purchase order's description, amount, currency, or items. When the total amount changes, item amounts are automatically recalculated based on their percentages.
Important Notes
- Purchase order must not be approved or completed
- User must have admin or owner role
- Item percentages must sum to 100% after update
- When amount_cents changes, all item amounts are recalculated
- Items can be created, updated, or deleted using nested attributes
Authorization
- User must be admin or owner of the company
- Purchase order cannot be approved or completed
Nested Item Updates
You can create, update, or delete items in the same request:
- Create: Include item without
idfield - Update: Include item with existing
idfield - Delete: Include item with
idand_destroy: true
