add_invoice_entry
Add a line item for goods or services to an existing customer invoice in GnuCash, with quantity, unit price, and tax options.
Instructions
Add a line item to a customer invoice.
The invoice must not be posted yet. Entries represent individual goods or services being billed.
Args:
invoice_id: Invoice ID (e.g., "000001").
account: Income account path (e.g., "Income:Sales").
description: Line item description.
quantity: Quantity as decimal string (e.g., "1", "2.5").
price: Unit price as decimal string (e.g., "100.00").
taxtable: Optional taxtable name. When given, the line
contributes tax components per the taxtable's entries
at posting time. Multi-entry taxtables (e.g., GST+PST)
produce one tax split per entry.
tax_included: If true, price is the gross (tax-included)
value; pretax extracted at posting. If false (default),
price is pre-tax and tax adds on top.
notes: Optional per-line notes (max 4096 bytes) — detail
that doesn't belong on the printed description line.
action: Optional line-type label (GnuCash convention:
"Hours", "Material", "Project").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| price | Yes | ||
| action | No | ||
| account | Yes | ||
| quantity | Yes | ||
| taxtable | No | ||
| invoice_id | Yes | ||
| description | Yes | ||
| tax_included | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |