Create Purchase Invoice
create_purchase_invoiceCreate a draft purchase invoice with exact VAT and gross amounts, supporting multiple currencies and automatic EUR conversion.
Instructions
Create a draft purchase invoice. Direct-call contract: pass exact invoice vat_price/gross_price; non-EUR requires cl_currencies_id + currency_rate (EUR per 1 foreign unit); base_* may lock actual EUR settlement.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Items [{custom_title, cl_purchase_articles_id, purchase_accounts_id, purchase_accounts_dimensions_id?, total_net_price, amount, vat_rate_dropdown?, vat_accounts_id?, vat_accounts_dimensions_id?, cl_vat_articles_id?, project_no_vat_gross_price?, cl_fringe_benefits_id?}]. purchase_accounts_dimensions_id is REQUIRED when the expense account has dimensions; same for vat_accounts_dimensions_id on dimensioned VAT accounts. | |
| notes | No | Notes | |
| number | Yes | Invoice number | |
| term_days | Yes | Payment term in days | |
| vat_price | Yes | Total VAT amount from original invoice (EXACT, for payment matching). Required — confirm_purchase_invoice fails without it. | |
| clients_id | Yes | Supplier client ID | |
| client_name | Yes | Supplier name | |
| create_date | Yes | Invoice date (YYYY-MM-DD) | |
| gross_price | Yes | Total gross amount from original invoice (EXACT, for payment matching). Required — confirm_purchase_invoice fails without it. | |
| journal_date | Yes | Turnover date (YYYY-MM-DD) | |
| currency_rate | No | Exchange rate as EUR per 1 foreign currency unit. Required when cl_currencies_id != EUR. | |
| base_net_price | No | EUR equivalent of net_price; auto-derived from currency_rate when omitted. | |
| base_vat_price | No | EUR equivalent of vat_price; auto-derived from currency_rate when omitted. | |
| bank_account_no | No | Supplier bank account | |
| bank_ref_number | No | Payment reference number | |
| base_gross_price | No | Actual settled EUR gross total; auto-derived from currency_rate when omitted. | |
| cl_currencies_id | No | Currency (default EUR) | |
| liability_accounts_id | No | Liability account (default 2310) |