Create Purchase Invoice
create_purchase_invoiceCreate a draft purchase invoice with exact VAT and gross amounts, supplier details, line items, and currency or exchange rate data for accurate payment matching.
Instructions
Create a draft purchase invoice. Direct-call contract: pass exact invoice vat_price/gross_price; non-EUR requires cl_currencies_id + currency_rate (foreign units per 1 EUR, e.g. USD 1.08); base_* may lock actual EUR settlement.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"clients_id": "<clients_id>",
"client_name": "<client_name>",
"number": "<number>",
"create_date": "<create_date>",
"journal_date": "<journal_date>",
"term_days": "<term_days>",
"vat_price": "<vat_price>",
"gross_price": "<gross_price>",
"items": "<items>"
},
"name": "create_purchase_invoice"
}
}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. Non-VAT EUR invoices may post VAT to the same cost account/dimension with article 11 and one document rate. | |
| 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 foreign currency units per 1 EUR (ECB convention, e.g. USD 1.08; EUR = amount / rate). 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) |