Overview
Some merge fields and options only have meaning in an accounting context and this section describes some of the special features of these merge fields.
Note: This article applies to users on Classic Billing. All concepts and processes are not applicable to EBM users. |
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.
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 Assembly > Merge Field List.
Note: 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_SalesInvoicesTotallncl | 115.00 | Total (including tax) of all invoices for the current matter. |
Action_SalesInvoicesTotalExcl | 100.00 | Total (excluding tax) of all invoices for the current matter. |
TRUST_MultiUnpaidSalesInvoices | 2,309.77 | The total amount owing on all invoices for ALL matters for this client (or client combination if more than one client is linked to the matter). |
TRUST_UnpaidSalesInvoices | 1,200.00 | The total amount owing on all invoices for THIS matter 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 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:
Total Header Hours = [[SPI_SumOfQuantity|uom=Hour, Hours|dp=2|rn=*]] Total Quantity = [[SP_SumOfQuantity|dp=0]] |
Australian BPAY Numbers
[[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 fields might be used to create a typical invoice. Note these fields would be distributed to the relevant parts of the doc template.
Company Letterhead |
[[DivisionLogo|pt=Div_Action|height=100]] [[CompanyName|pt=Div_Action]] [[MailingAddressLine|pt=Div_Action]] |
Invoice Header |
[[SP_SalePurchaseTypeTitle]] Date: [[SP_SalePurchaseDate]] Invoice #: [[SP_OurReference]] |