Record a purchase invoice
record_purchase_invoiceRecords a supplier invoice (bill) against one purchase order, with its lines and charges. Returns the invoice id and sku_url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | unpaid, paid or partially_paid. | |
| dry_run | No | Validate only; saves nothing. | |
| due_date | No | ||
| currency_id | No | ||
| financial_lines | No | PO charges: [{id, quantity, amount, link_type: App\Models\PurchaseOrder}]. | |
| idempotency_key | No | A repeat with this key replays the first result. | |
| purchase_order_id | Yes | ||
| purchase_invoice_date | Yes | ISO date. | |
| purchase_invoice_lines | No | Lines: [{purchase_order_line_id, quantity_invoiced, unit_price (gross)}]. | |
| supplier_invoice_number | Yes | The supplier's invoice number exactly as printed. |