Twig template variables: Combined invoices
The combined invoice variables show the totals, the period and the invoices of a combined invoice. Use these variables in combined invoice templates. Each variable starts with superinvoice.
All invoice variables also work with the superinvoice variable.
Variables that show a list
Some of these variables show a list. For example, superinvoice.Invoices shows a list of the invoices of the combined invoice.
To use a variable of this type:
- Put the variable in a Twig
forloop. - Between the
fortag and theendfortag, put the text to show for each item. - After
for, enter a name for each item in the list.
Example:
{% for invoice in superinvoice.Invoices %}
{{ invoice.Number }}: {{ invoice.AnimalName }}
{% endfor %}In this example:
superinvoice.Invoicesis the list of the invoices of the combined invoice.invoiceis the name for each item in the list.invoice.Numbershows the number of each invoice.invoice.AnimalNameshows the name of the patient of each invoice.- The document shows the text between the tags one time for each item in the list.
Variables
| Name | Classic template system equivalent? | Function |
|---|---|---|
{{ superinvoice.CombinedInvoiceSubtotal }} | No | Shows the subtotal of the combined invoice. Note: This variable shows the value in currency format. |
{{ superinvoice.CombinedInvoiceTotal }} | No | Shows the total of the combined invoice. Note: This variable shows the value in currency format. |
{{ superinvoice.CombinedInvoiceIncTax }} | No | Shows the total of the combined invoice, with tax. Note: This variable shows the value in currency format. |
{{ superinvoice.CombinedInvoicePaid }} | No | Shows the paid quantity of the combined invoice. Note: This variable shows the value in currency format. |
{{ superinvoice.CombinedInvoiceDue }} | No | Shows the due quantity of the combined invoice. Note: This variable shows the value in currency format. |
{{ superinvoice.CombinedInvoiceFreight }} | No | Shows the freight of the combined invoice. Note: This variable shows the value in currency format. |
{{ superinvoice.CombinedInvoiceStartDate }} | No | Shows the start date of the period of the combined invoice. |
{{ superinvoice.CombinedInvoiceEndDate }} | No | Shows the end date of the period of the combined invoice. |
{{ superinvoice.Invoices }} | No | Shows a list of the invoices of the combined invoice. |
{{ superinvoice.LineItems }} | No | Shows a list of the line items of all invoices of the combined invoice. |