Some merge field and options only have meaning in an accounting context and this section describes some of the special features of these merge fields.
Sale/Purchase Merge Fields
When you create document templates for quotes, orders, and invoices you will use merge fields that relate to header and line item details.
Info |
---|
Note: Some merge fields get their values from the accounting configuration, for example SP_SalePurchaseTypeTitle and system_GSTAlias. If you are getting unexpected text on your generated documents make sure you check your accounting settings. |
Header and Line Item Merge Fields
Header merge fields begin with SP_
Line-item merge fields begin with SPI_
Useful Merge Fields
You can see the full list of accounting merge fields by going to Admin > Document Templates > List of Merge Fields.
Tip |
---|
Filter the merge field list by "Data Source" to see just the sections you need |
Field Name | Example | Source |
---|---|---|
SP_SalePurchaseTypeTitle | Tax Invoice | Document type (quote, order , invoice) Admin > Billing > Sales/Purchase Types |
SP_Title | H.B. Jones, Final Bill | The title of the specific invoice |
system_GSTAlias | FEIN | Sales Tax Alias under Admin > Accounting > Accounting Preferences |
Action_SalesInvoicesTotalIncl | 115.00 | Total (including tax) of all invoices for the current action |
Action_SalesInvoicesTotalExcl | 100.00 | Total (excluding tax) of all invoices for the current action |
TRUST_MultiUnpaidSalesInvoices | 2,309.77 | Total amount owing on all invoices for ALL matters for this client (or client combination if more than one client linked to the matter). |
| ||
TRUST_UnpaidSalesInvoices | 1,200.00 | Total amount owing on all invoices for THIS matters for this client (or client combination if more than one client linked to the matter) |
Summing Quantities
In some cases you may want to sum quantities from the line items and headings. For example to show a total of all billable hours. To do this you can use the following merge fields:
SPI_SumOfQuantity | Total quantity for an items in a heading (multiplied by any heading quantities) |
SP_SumOfQuantity | Total quantity for ALL line items in the invoice |
Options
uom=A,B,C | If you have mixed units of measure (UOMs) you may only want to sum some of them e.g. only "Hours". You can limit this with a comma-separated list of UOMs using this option. |
dp | Since this is a decimal merge field you can use this option to specify the number of decimal places. |
Example:
Code Block |
---|
Total Header Hours = [[SPI_SumOfQuantity|uom=Hour,Hours|dp=2|rn=*]] Total Quantity = [[SP_SumOfQuantity|dp=0]] |
Australian BPAY numbers
Code Block |
---|
[[SP_OurReferenceBpay]] |
This takes "our reference" and converts it into a BPAY reference (twelve digit number including a check-digit).
Example
Here is an example of how merge field might be used to create a typical invoice. Note these fields would be distributed to the relevant parts of the doc template.
Code Block | ||
---|---|---|
| ||
[[DivisionLogo|pt=Div__Action|height=100]] [[CompanyName|pt=Div__Action]] [[MailingAddressLine|pt=Div__Action]] |
...