create_taxtable
Create a sales-tax table with multiple tax entries (percentage or flat value) linked to asset or liability accounts, supporting composite rates such as GST+PST.
Instructions
Create a new sales-tax table.
A taxtable holds one or more entries. Each entry contributes either a percentage rate or a flat-value surcharge routed to a specific GL account (ASSET for input-tax credit, LIABILITY for output sales tax payable). Multi-entry composites (e.g., GST 5% + PST 7%) produce multiple tax splits per line at posting time.
Args:
name: Taxtable name, unique within the book
(e.g., "CA Sales 7.25%", "BC GST+PST").
entries: List of {type, amount, account} dicts.
type: "value" or "percentage".
amount: positive decimal as string. Percentages
are the rate ("5.00" = 5%, not "0.05").
account: account path, %short-guid, or full GUID.
Must be ASSET or LIABILITY type. All entries on a
single taxtable must reference accounts in the same
commodity.
Example: create_taxtable( name="BC GST+PST", entries=[ {"type": "percentage", "amount": "5.00", "account": "Liabilities:GST Payable"}, {"type": "percentage", "amount": "7.00", "account": "Liabilities:PST Payable"}, ], )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| entries | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |