Issue an invoice
fawtar_create_invoiceIssue a tax or ordinary invoice. This is a real financial document: it takes the next sequential number, computes VAT, generates the ZATCA QR code and posts to the general ledger. It cannot be edited afterwards — correct it with a credit note. Confirm the amounts with the user before calling.
Use taxTreatment "tax" for a VAT-registered business, "ordinary" for one that is not registered. Use type "simplified" for individuals, "standard" for businesses (which requires the buyer's VAT number).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| buyer | No | ||
| lines | Yes | ||
| notes | No | ||
| dueDate | No | YYYY-MM-DD | |
| taxTreatment | Yes | ||
| pricesIncludeVat | No |