home

Browse documentation

ezyVet Knowledge Center

Get access to documentation, training, and other high-quality resources.

Twig template variables: Statements

The statement variables show data of a statement (for example, the balances and the statement lines). Most variables start with statement or debtorcontact.

The debtorcontact variable is the client that the statement is for. All contact variables also work with the debtorcontact variable. These variables do not use a prefix:
  • isDetailed
  • showDiscount
  • byAnimal
  • showAnimalSubtotal
  • showSalesPerson
  • taxName

The line variables work on each statement line in {% for line in statement.lines %}.

Note: These variables are case-sensitive:
  • The statement variables
  • The variables that do not use a prefix
  • line.balanceAt, line.transType and line.taxTotal
  • line.animalHeader and line.animalDetails
  • The names after line.animalHeader and line.animalDetails (for example, line.animalHeader.animalName)

Enter these variables as shown. For example, enter statement.startDate, not statement.StartDate. The part after a record is not case-sensitive (for example, Name in statement.business.Name).

Variables that check a condition

Some of these variables show if a condition is true. For example, debtorcontact.HasOverdueBalance is true if the client has an overdue balance.

To use a variable of this type:

  • Put the variable in a Twig if statement.
  • Between the if tag and the else tag, put the text to show when the condition is true.
  • Between the else tag and the endif tag, put the text to show when the condition is not true.
Note: When you use the variable without an if statement, the variable shows 1 when the condition is true. When the condition is not true, the variable shows no value.

Example:

{% if debtorcontact.HasOverdueBalance %}
Your account is overdue. Please pay the overdue balance.
{% else %}
Thank you for your payment.
{% endif %}

In this example:

  • debtorcontact.HasOverdueBalance is true if the client has an overdue balance.
  • When the condition is true, the statement tells the client to pay the overdue balance.
  • When the condition is not true, the statement thanks the client.
RecordThe document shows
A statement for Mr Riker, Will (200019), with an overdue balance. The condition is true.Your account is overdue. Please pay the overdue balance.
A statement for Miss Kochanski, Kristine (200021), with no overdue balance. The condition is not true.Thank you for your payment.

Variables that show a list

Some of these variables show a list. For example, statement.lines shows a list of the statement lines.

To use a variable of this type:

  • Put the variable in a Twig for loop.
  • Between the for tag and the endfor tag, put the text to show for each item.
  • After for, enter a name for each item in the list.
Note: Use the same name in the variables in the loop.

Example:

{% for line in statement.lines %}
{{ line.OwnerRecordType }} {{ line.OwnerNumber }}: {{ line.Amount }}
{% endfor %}

In this example:

  • statement.lines is the list of the statement lines.
  • line is the name for each item in the list.
  • line.OwnerRecordType, line.OwnerNumber and line.Amount show the record type, the number and the amount of each statement line.
  • The document shows the text between the tags one time for each item in the list.

Variables that show a date

Some of these variables show a date. To show the date in a format that is easy to read, use the dateformat Twig filter. The Function column of each variable of this type has a note about the dateformat filter.

After the variable name, enter a vertical bar and dateformat.

Example:

{{ statement.dueDate|dateformat }}

In this example:

  • statement.dueDate shows the due date of the last invoice of the client.
  • The dateformat filter shows the date in a format that is easy to read.

Variables

NameClassic template system equivalent?Function
{{ statement.business.Name }}NoShows the signed-in department, business unit, or database.
{{ debtorcontact.FinalBalance }}{FinalBalance}Shows the client balance at the end of the statement period.
{{ settings.BankAccountNumber }}{BusinessBankAccount}Shows the bank account number of the business unit.
Note: This variable shows the value of the Bank Account Number box of ezyVet's system settings.
{{ debtorcontact.StartDate }}NoShows the start date of the statement period.
Note: The date obeys your date format configuration.
{{ debtorcontact.EndDate }}NoShows the end date of the statement period.
Note: The date obeys your date format configuration.
{{ debtorcontact.ThisMonthName }}NoShows the name of this month, for the aging columns of the statement.
{{ debtorcontact.Minus1MonthName }}NoShows the name of the month one month before this month, for the aging columns of the statement.
{{ debtorcontact.Minus2MonthName }}NoShows the name of the month two months before this month, for the aging columns of the statement.
{{ debtorcontact.Minus3MonthName }}NoShows the name of the month three months before this month, for the aging columns of the statement.
{{ debtorcontact.Minus4MonthName }}NoShows the name of the month four months before this month, for the aging columns of the statement.
{{ debtorcontact.Minus3PlusMonthName }}NoShows the name of the month three months before this month, followed by +, for an aging column of three or more months.
{{ debtorcontact.ThisMonthBalance }}NoShows the balance of the client for this month.
{{ debtorcontact.Minus1MonthBalance }}NoShows the balance of the client for the month one month before this month.
{{ debtorcontact.Minus2MonthBalance }}NoShows the balance of the client for the month two months before this month.
{{ debtorcontact.Minus3MonthBalance }}NoShows the balance of the client for the month three months before this month.
{{ debtorcontact.Minus4MonthBalance }}NoShows the balance of the client for the month four months before this month.
{{ debtorcontact.Minus3PlusMonthBalance }}NoShows the balance of the client for three or more months before this month.
{{ debtorcontact.Minus1MonthDiscountAmount }}NoShows the discount quantity that the client got in the month one month before this month.
{{ debtorcontact.Minus2MonthDiscountAmount }}NoShows the discount quantity that the client got in the month two months before this month.
{{ debtorcontact.Minus3MonthDiscountAmount }}NoShows the discount quantity that the client got in the month three months before this month.
{{ debtorcontact.Minus4MonthDiscountAmount }}NoShows the discount quantity that the client got in the month four months before this month.
{{ debtorcontact.OverdueBalance }}NoShows the overdue balance of the client.
{{ debtorcontact.HasOverdueBalance }}NoTrue if the client has an overdue balance.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ debtorcontact.HasRemotePaymentMethod }}NoShows if your ezyVet site has a payment method that can supply online payment links. The possible values are:
  • YES (your ezyVet site has a payment method that can supply online payment links)
  • No value (your ezyVet site does not have a payment method of this type)
{{ debtorcontact.RemotePaymentLink }}NoShows the online payment link for the balance of the client.
{{ debtorcontact.ResidenceStatementLines }}NoShows a list of the statement lines for each patient that resides with the client.
Note: Use this variable in a Twig for loop. Refer to Variables that show a list.
{{ statement.startDate }}NoShows the start date of the statement period.
Note: The date obeys your date format configuration.
{{ statement.endDate }}NoShows the end date of the statement period.
Note: The date obeys your date format configuration.
{{ statement.initialBalance }}NoShows the balance of the client at the start of the statement period.
{{ statement.finalBalance }}NoShows the balance of the client at the end of the statement period.
{{ statement.currentBalance }}NoShows the balance of the client today.
{{ statement.totalBalanceExcTax }}NoShows the balance of the client at the end of the statement period, without tax.
{{ statement.totalBalanceIncTax }}NoShows the balance of the client at the end of the statement period, with tax.
{{ statement.totalTax }}NoShows the tax part of the balance of the client at the end of the statement period.
{{ statement.dueDate }}NoShows the due date of the last invoice of the client.
Note: Use this variable with the dateformat Twig filter. Refer to Variables that show a date.
{{ statement.interestRate }}NoShows the interest rate of the statement.
{{ statement.toMonth }}NoShows the month that the statement goes to.
{{ statement.lines }}NoShows the list of the statement lines.
Note: Use this variable in a Twig for loop. For example:
{% for line in statement.lines %}
  {{ line.Amount }}
{% endfor %}
In the loop, you can use the line variables. For more information, refer to Variables that show a list.
{{ line.OwnerRecordType }}NoShows the type of the statement line. The possible values are:
  • Invoice
  • Payment
{{ line.OwnerNumber }}NoShows the number of the invoice or the payment of the statement line.
{{ line.Amount }}NoShows the quantity of the invoice or the payment of the statement line.
{{ line.AllocatedAmount }}NoShows the allocated quantity of the invoice or the payment of the statement line.
{{ line.balanceAt }}NoShows the balance of the client after the statement line.
{{ line.transType }}NoShows the type of the statement line.
Note: For a payment, this variable also shows the payment method (for example, Payment: Cash).
{{ line.taxTotal }}NoShows the outstanding tax of the invoices, from the start of the statement to the statement line.
{{ line.animalHeader }}NoShows the patient information for the first statement line of each patient.
Note: This variable shows a value only when byAnimal is true.
Tip: To show one part of the patient information, add a name after this variable, for example {{ line.animalHeader.animalName }}. The possible names are animalName, animalLocation, animalSyndicateMsg, animalBalance and animalBalanceGst.
{{ line.animalDetails }}NoShows the patient information and the balance of the patient for the last statement line of each patient.
Note: This variable shows a value only when byAnimal is true.
Tip: To show one part of the patient information, add a name after this variable, for example {{ line.animalDetails.animalBalance }}. The possible names are animalName, animalLocation, animalSyndicateMsg, animalBalance and animalBalanceGst.
{{ line.ClientContact }}NoShows the contact record of the client of the statement line.
Tip: To show more information about the record, add one more variable after this variable, for example {{ line.ClientContact.Name }}.
{{ line.Invoice }}NoShows the invoice record of the statement line.
Note: If the statement line is a payment, this variable shows no value.
Tip: To show more information about the record, add one more variable after this variable, for example {{ line.Invoice.Number }}.
{{ line.Payment }}NoShows the payment record of the statement line.
Note: If the statement line is an invoice, this variable shows no value.
Tip: To show more information about the record, add one more variable after this variable, for example {{ line.Payment.Number }}.
{{ line.IsInvoice }}NoTrue if the statement line is an invoice.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ line.IsPayment }}NoTrue if the statement line is a payment.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{statement.remotePaymentLink}}NoShows the online payment link for the balance of the client.
{{ statement.hasRemotePaymentMethod }}NoTrue if your ezyVet site has a payment method that can supply online payment links.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ isDetailed }}NoTrue if your ezyVet site is configured to show detailed statements.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ showDiscount }}NoTrue if your ezyVet site is configured to show discounts on statements.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ byAnimal }}NoTrue if your ezyVet site is configured to group statements by patient.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ showAnimalSubtotal }}NoTrue if your ezyVet site is configured to show a subtotal for each patient on statements.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ showSalesPerson }}NoTrue if your ezyVet site is configured to show the sales person on statements.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ taxName }}NoShows the name of the sales tax of your ezyVet site, for example GST or VAT.
Note: This variable does not use a prefix.