Invoice variables are used for both for documents customized in application settings and for formatting reports using page templates. Using invoices variables for documents customized in application settings is documented here.
For page templates, the invoice variables are available when the following conditions are true:
Invoice ID has been selected as a primary column (it does not work if the Order ID is in a calculated column)
The Invoice ID primary column has a value in the first row following a page break that starts a new report section.
The easiest way to check that the invoice variables will be available in the page template for a report is to export the report to Excel and verify that there is a invoice id in the first row of each sheet in the output.
List of variables
invoice.invoiceId
The invoice id
invoice.invoiceDate
The invoice date
invoice.customerPo
The customer's purchase order number from the related sales order
invoice.settlementTermName
The terms selected on the related sales order
invoice.adjustmentListFormatted
Arrays of objects containing discount, taxes, and fees on the invoice. Each object has description, amount, and amountFormatted fields.