Invoice with surcharge information template
The invoice with surcharge information template is an example document template. When your veterinary practice must show surcharge information in printed and PDF client invoices, use this template.
- Invoice number and invoice date
- Organization logo
- Client and patient information
- Invoice line items with product description, staff member, item quantity, and line total
- Subtotal, tax, and total value of the invoice
- Payment method and balance of the invoice
- For unpaid invoices, text about why your veterinary practice uses surcharges, surcharge quantity, and total with surcharge for credit card payment
- For paid invoices with surcharge, quantity paid without the surcharge, surcharge quantity paid, total quantity paid, and text about why your veterinary practice uses surcharges
Invoice output
- Unpaid invoice
- Paid invoice without a surcharge
- Paid invoice with a surcharge
- Text about why your veterinary practice uses surchargesNote: If the client pays by debit card, cash, or check, ezyVet does not add a surcharge.
- Surcharge (surcharge quantity for credit card payment)
- Outstanding Total With Surcharge (total with surcharge for credit card payment)
The template calculates the Surcharge and Outstanding Total With Surcharge quantities from the outstanding balance and the configured surcharge percentage. The quantities are estimates and are not always correct. If this information must not show on unpaid invoices, you can remove this section.
- Payment method
- Total amount paid
The surcharge information does not show.
- Payment method
- Base amount paid
- Surcharge amount paid
- Total amount paid
- Text about why your veterinary practice uses surcharges
Before you use this template
Do these tasks before you use this template:
- Contact support for your payment integration (for example, PayJunction or Windcave) so your account can use surcharges.
- Use the Twig template system. In the document template configuration, select Use New Templating Engine.
- Change
surchargePercentagein the template source code to your veterinary practice's surcharge percentage (for example, 0.05).Important: The surcharge percentage is written directly in the template source code{% set surchargePercentage = 0.03 %}. - Change the text about why your veterinary practice uses surcharges.
- Do a check of the surcharge regulations with your payment provider and legal counsel.
- Remove or keep the unpaid invoice surcharge information in the template.Note: The surcharge quantity shown on unpaid invoices is an estimate for credit card payment. ezyVet does not add a surcharge if the client pays by debit card, cash, or check.
Template variables in the source code
This table gives the applicable template variables and their function:
| Template variable | Function |
|---|---|
{{ invoice.surchargeAmount }} | Shows the surcharge quantity. |
{{ invoice.Paid }} | Shows the total dollar value paid by a client for the invoice. |
{{ invoice.Outstanding }} | Shows the total outstanding dollar quantity of the invoice. |
{{ invoice.Due }} | Shows the total value dollar that is due of the invoice. Note: Use the {{ invoice.Due }} variable. Do not use invoice.total - invoice.paid because it does not include credits. |
Invoice with surcharge information template: Source code
- Make a copy of the source code for the body content of the template
- Make a document template for the body content and put the source code copy in it
- Make one document template for the header template and one for the footer template, then enter the applicable source code in them
- Configure the document template for the body content to use the header template and footer template
- Use the procedure given in Set the document templates that ezyVet automatically uses for new invoices and select the document template for the body content in the Invoice and Invoice Summarized boxes
<style type="text/css">table#invoice_table tbody tr:nth-child(odd) {
background-color: #F5F5F5;
}
</style>
<div style="margin: 30px;">
<table id="invoice_table" style="font-size: 15px; width: 100%;">
<thead>
<tr>
<td style="color: #000000; float: left; height: 40px; text-align: left; width: 205px;"><span style="font-size: 14px;"><strong>Description</strong> </span></td>
<td style="color: #000000; float: left; text-align: left; width: 40%;"><span style="font-size: 14px;"><strong>Staff Member</strong> </span></td>
<td style="color: #000000; float: left; text-align: left; width: 20%;"><span style="font-size: 14px;"><strong>Qty</strong> </span></td>
{% if invoice.hasDiscounts %}
<td style="color: #000000; float: left; text-align: left; width: 10%;"><span style="font-size: 14px;"><strong>Price</strong> </span></td>
<td style="color: #000000; float: left; text-align: left; width: 10%;"><span style="font-size: 14px;"><strong>Discount</strong> </span></td>
<td style="color: #000000; float: left; text-align: left; width: 10%;"><span style="font-size: 14px;"><strong>Discount (%)</strong> </span></td>
{% endif %}
<td style="color: #000000; float: left; padding-right: 10px; text-align: right; width: 20%;"><span style="font-size: 14px;"><strong>Total</strong> </span></td>
</tr>
</thead>
<tbody>{% for invoiceline in invoice.lineItems %}{% if invoiceline.isHeaderLine and not invoiceline.hasHeaderLine %}
<tr>
<td>{{ invoiceline.product.name }}</td>
<td>{{ invoiceline.salesPerson.name }}</td>
<td>{{ invoiceline.quantity }}</td>
{% if invoice.hasDiscounts %}
<td>{{ invoiceline.totalBeforeDiscount(true)|moneyformat }}</td>
{% if invoiceline.totalDiscount(true) > 0 %}
<td>{{ invoiceline.totalDiscount(true)|moneyformat }}</td>
<td>{{ invoiceline.totalDiscountPercent|round(2) }}%</td>
{% else %}
<td> </td>
<td> </td>
{% endif %}{% endif %}
<td style="text-align: right;">{{ invoiceline.total(true)|moneyformat }}</td>
</tr>
{% if invoiceline.printContained %}{% for subinvoiceline in invoiceline.nestedLines %}
<tr>
<td style="color: #555555; font-style: italic;"> {{ subinvoiceline.product.name }}</td>
<td style="color: #555555; font-style: italic;">{{ subinvoiceline.salesPerson.name }}</td>
<td style="color: #555555; font-style: italic;">{{ subinvoiceline.quantity }}</td>
{% if invoiceline.printContainedPrices %}{% if invoice.hasDiscounts %}
<td style="color: #555555; font-style: italic;">{{ subinvoiceline.totalBeforeDiscount(true)|moneyformat }}</td>
{% if subinvoiceline.totalDiscount(true) > 0 %}
<td style="color: #555555; font-style: italic;">{{ subinvoiceline.totalDiscount(true)|moneyformat }}</td>
<td style="color: #555555; font-style: italic;">{{ subinvoiceline.totalDiscountPercent|round(2) }}%</td>
{% else %}
<td style="color: #555555; font-style: italic;"> </td>
<td style="color: #555555; font-style: italic;"> </td>
{% endif %}{% endif %}{% endif %}
<td style="color: #555555; font-style: italic; text-align: right;">{% if invoiceline.printContainedPrices %}{{ subinvoiceline.total(true)|moneyformat }} {% endif %}</td>
</tr>
{% if subinvoiceline.isHeaderline %}{% if subinvoiceline.printContained %}{% for subsubinvoiceline in subinvoiceline.nestedLines %}
<tr>
<td style="color: #555555; font-style: italic;"> {{ subsubinvoiceline.product.name }}</td>
<td style="color: #555555; font-style: italic;">{{ subsubinvoiceline.salesPerson.name }}</td>
<td style="color: #555555; font-style: italic;">{{ subsubinvoiceline.quantity }}</td>
{% if subinvoiceline.printContainedPrices %}{% if invoice.hasDiscounts %}
<td style="color: #555555; font-style: italic;">{{ subsubinvoiceline.totalBeforeDiscount(true)|moneyformat }}</td>
{% if subsubinvoiceline.totalDiscount(true) > 0 %}
<td style="color: #555555; font-style: italic;">{{ subsubinvoiceline.totalDiscount(true)|moneyformat }}</td>
<td style="color: #555555; font-style: italic;">{{ subsubinvoiceline.totalDiscountPercent|round(2) }}%</td>
{% else %}
<td style="color: #555555; font-style: italic;"> </td>
<td style="color: #555555; font-style: italic;"> </td>
{% endif %}{% endif %}{% endif %}
<td style="color: #555555; font-style: italic; text-align: right;">{% if subinvoiceline.printContainedPrices %}{{ subsubinvoiceline.total(true)|moneyformat }} {% endif %}</td>
</tr>
{% if subinvoiceline.isHeaderline %}{% if subsubinvoiceline.printContained %}{% for subsubsubinvoiceline in subsubinvoiceline.nestedLines %}
<tr>
<td style="color: #555555; font-style: italic;"> {{ subsubsubinvoiceline.product.name }}</td>
<td style="color: #555555; font-style: italic;">{{ subsubsubinvoiceline.salesPerson.name }}</td>
<td style="color: #555555; font-style: italic;">{{ subsubsubinvoiceline.quantity }}</td>
{% if subsubinvoiceline.printContainedPrices %}{% if invoice.hasDiscounts %}
<td style="color: #555555; font-style: italic;">{{ subsubsubinvoiceline.totalBeforeDiscount(true)|moneyformat }}</td>
{% if subsubsubinvoiceline.totalDiscount(true) > 0 %}
<td style="color: #555555; font-style: italic;">{{ subsubsubinvoiceline.totalDiscount(true)|moneyformat }}</td>
<td style="color: #555555; font-style: italic;">{{ subsubsubinvoiceline.totalDiscountPercent|round(2) }}%</td>
{% else %}
<td style="color: #555555; font-style: italic;"> </td>
<td style="color: #555555; font-style: italic;"> </td>
{% endif %}{% endif %}{% endif %}
<td style="color: #555555; font-style: italic; text-align: right;">{% if subsubinvoiceline.printContainedPrices %}{{ subsubsubinvoiceline.total(true)|moneyformat }} {% endif %}</td>
</tr>
{% endfor %}{% endif %}{% endif %}{% endfor %}{% endif %}{% endif %}{% endfor %}{% endif %}{% elseif not invoiceline.hasHeaderLine %}
<tr>
<td>{{ invoiceline.product.name }}</td>
<td>{{ invoiceline.salesPerson.name }}</td>
<td>{{ invoiceline.quantity }}</td>
{% if invoice.hasDiscounts %}
<td>{{ invoiceline.totalBeforeDiscount(true)|moneyformat }}</td>
{% if invoiceline.totalDiscount(true) > 0 %}
<td>{{ invoiceline.totalDiscount(true)|moneyformat }}</td>
<td>{{ invoiceline.totalDiscountPercent|round(2) }}%</td>
{% else %}
<td> </td>
<td> </td>
{% endif %}{% endif %}
<td style="text-align: right;">{{ invoiceline.total(true)|moneyformat }}</td>
</tr>
{% endif %}{% endfor %}</tbody>
</table>
{% if not invoice.surchargeAmount = 0 %}
<table cellpadding="5" cellspacing="5" style="margin-left: auto; width: 50%;">
<tbody>
<tr>
<td style="padding: 30px 5px 5px 15px; width: 70%;">Subtotal:</td>
<td style="padding: 30px 15px 5px 5px; text-align: right; width: 30%;"><strong>{{ invoice.subTotal|moneyformat }}</strong></td>
</tr>
{% if invoice.includesTax %}
<tr>
<td style="padding-left: 15px;">Including tax:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.total|moneyformat }}</strong></td>
</tr>
{% endif %}{% if invoice.hasDiscounts %}
<tr>
<td style="padding-left: 15px;">Discount:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.totalDiscountAmountIncTax|moneyformat }}</strong></td>
</tr>
{% endif %}
<tr>
<td style="padding-left: 15px;">Total:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.total|moneyformat }}</strong></td>
</tr>
{% if invoice.paymentMethods %}
<tr>
<td style="padding-left: 15px;">Payment method:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.paymentMethods }}</strong></td>
</tr>
{% endif %}
<tr>
<td style="padding-left: 15px;">Base amount paid:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.paid|moneyformat }}</strong></td>
</tr>
<tr>
<td style="padding-left: 15px;">Surcharge amount paid:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.surchargeAmount |moneyformat }}</strong></td>
</tr>
<tr>
<td style="padding-left: 15px;">Total amount paid:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ (invoice.paid + invoice.surchargeAmount)|moneyformat }}</strong></td>
</tr>
<tr>
<td colspan="2" style="padding-left: 15px;">A surcharge was applied to cover our costs of credit card acceptance.</td>
</tr>
{% else %}
<tr>
<td style="padding-left: 15px;">Total amount paid:</td>
<td style="padding-right: 15px; text-align: right;"><strong>{{ invoice.paid|moneyformat }}</strong></td>
</tr>
{% endif %}
<tr>{% set balance = invoice.total - invoice.paid %}
<td style="padding-bottom: 30px; padding-left: 15px;">Balance:</td>
<td style="padding-bottom: 30px; padding-right: 15px; text-align: right; width: 68px;"><strong>{{ balance|moneyformat }}</strong></td>
</tr>
</tbody>
</table>
{% set surchargePercentage = 0.03 %}{% if invoice.outstanding > 0 %}
<table border="1" style="font-size: 10px; width: 100%;">
<tbody>
<tr>
<td colspan="2">
<p>A {{(100 * surchargePercentage)}}% surcharge applies to all credit card payments. No surcharge is applied to debit card, cash, or check payments.</p>
</td>
</tr>
<tr>
<td style="width: 30%;">Surcharge</td>
<td style="width: 70%;">{{ invoice.payment.surchargeAmount | moneyformat }}</td>
</tr>
<tr>
<td style="width: 30%;">Outstanding Total With Surcharge</td>
<td style="width: 70%;">{{ (invoice.outstanding * (1 + surchargePercentage)) | moneyformat }}</td>
</tr>
</tbody>
</table>
{% endif %}</div>This is the source code for the header of the invoice with surcharge information template:
<div style="padding-bottom:50px">
<table align="left" border="0" style="width:100%">
<tbody>
<tr>
<td align="left" style="vertical-align:top">
<p style="font-size:26px"><strong>{{ invoice.InvoiceTypeName|replace({'TAX INVOICE': 'INVOICE'}) }}</strong></p>
{#}{#}<br />
{#}{#}
<p style="font-size:12px"><strong>{{ invoice.ownershipSeparation.inheritedcontact.name }}</strong></p>
<p style="font-size:12px">{% if invoice.ownershipSeparation.inheritedcontact.physicalAddress.getStreet1 %}{{ invoice.ownershipSeparation.inheritedcontact.physicalAddress.getStreet1 }}{% endif %}{% if invoice.ownershipSeparation.inheritedcontact.physicalAddress.getStreet2 %}, {{ invoice.ownershipSeparation.inheritedcontact.physicalAddress.getStreet2 }}{% endif %}{% if invoice.ownershipSeparation.inheritedcontact.physicalAddress.getSuburb %}, {{ invoice.ownershipSeparation.inheritedcontact.physicalAddress.getSuburb}}{% endif %}{% if invoice.ownershipSeparation.inheritedcontact.physicalAddress.getCity %}, {{ invoice.ownershipSeparation.inheritedcontact.physicalAddress.getCity }}{% endif %}{#{% if invoice.ownershipSeparation.inheritedcontact.physicalAddress.getRegion %}, {{ invoice.ownershipSeparation.inheritedcontact.physicalAddress.getRegion }}{% endif %}#}{% if invoice.ownershipSeparation.inheritedcontact.physicalAddress.getPostCode %}, {{ invoice.ownershipSeparation.inheritedcontact.physicalAddress.getPostCode}}{% endif %}</p>
<p style="font-size:12px"><strong>Tel:</strong> {{ invoice.ownershipSeparation.inheritedcontact.phoneNumber }}</p>
<p style="font-size:12px"><strong>Email:</strong> {{ invoice.ownershipSeparation.inheritedcontact.businessEmail }}</p>
<p style="font-size:12px"><span style="color:#ffffff"><strong>VAT Registration #:</strong> {{ invoice.ownershipSeparation.inheritedcontact.getTaxNumber }}</span></p>
{#}{#}<br />
{#}{#}{#}{#}<br />
{#}{#}</td>
<td align="right" style="vertical-align:top"><img alt="LogoWillPrintHere" src="{{ templatesettings.logoLocation }}" style="width:150px" /></td>
</tr>
</tbody>
</table>
<table style="width:100%">
<tbody>
<tr>
<td colspan="3" style="font-size:12px; height:30px; text-align:left; vertical-align:top">{{ invoice.InvoiceTypeName|title|replace({'Tax Invoice': 'Invoice'}) }} Number: {{ invoice.getNumber }}<br />
{{ invoice.InvoiceTypeName|title|replace({'Tax Invoice': 'Invoice'}) }} Date: {{ invoice.Date|dateformat }}{% if invoice.InvoiceTypeName != "CREDIT NOTE" %} <span style="color:#ffffff">| Tax Point: {{ invoice.Date|dateformat }}</span>{% endif %}</td>
<td colspan="2" style="font-size:12px; height:30px; text-align:right; vertical-align:top"><strong>Account Reference: {{ invoice.contact.getCode }}</strong>{% if invoice.Outstanding > 0 %}<br />
<strong>Payment Due By: {{ invoice.DueDate|dateformat }}{% endif %}</strong></td>
</tr>
{% if invoice.animal %}
<tr>
<td colspan="2" style="background-color:#f0f0f0; float:left; height:20px; text-align:left; width:40%"><span style="font-size:12px"><strong>Client</strong> </span></td>
<td style="float:left; height:20px; text-align:left; width:10%"></td>
<td colspan="2" style="background-color:#f0f0f0; float:left; height:20px; text-align:left; width:40%"><span style="font-size:12px"><strong>Patient</strong> </span></td>
</tr>
{% endif %}
<tr>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>Name</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{% if contact.TitleName %}{{ invoice.contact.TitleName }} {% endif %}{{ invoice.contact.NameInformal }}</span></td>
<td style="float:left; height:20px; text-align:left; width:10%"></td>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>{% if invoice.animal %}Name{% endif %}</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{{ invoice.animal.name }}</span></td>
</tr>
<tr>
<td style="float:left; height:20px; text-align:left; vertical-align:top; width:10%"><span style="font-size:12px"><strong>Address</strong></span></td>
<td style="float:left; height:20px; text-align:left; vertical-align:top; width:30%"><span style="font-size:12px">{% if invoice.contact.postalAddress.getStreet1 %}{{ invoice.contact.postalAddress.getStreet1 }}{% endif %}{% if invoice.contact.postalAddress.getStreet2 %}, {{ invoice.contact.postalAddress.getStreet2 }}{% endif %}{% if invoice.contact.postalAddress.getSuburb %}, {{ invoice.contact.postalAddress.getSuburb}}{% endif %}{% if invoice.contact.postalAddress.getCity %}, {{ invoice.contact.postalAddress.getCity }}{% endif %}{#{% if invoice.contact.postalAddress.getRegion %}, {{ invoice.contact.postalAddress.getRegion }}{% endif %}#}{% if invoice.contact.postalAddress.getPostCode %}, {{ invoice.contact.postalAddress.getPostCode}}{% endif %}</span></td>
<td style="float:left; height:20px; text-align:left; width:10%"></td>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>{% if invoice.animal.getSpecies.getName %}Species{% endif %}</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{{ invoice.animal.getSpecies.getName }}</span></td>
</tr>
<tr>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>Tel.</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{{ invoice.contact.TemplateVarGeneralLandlines }}</span></td>
<td style="float:left; height:20px; text-align:left; width:10%"></td>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>{% if invoice.animal.getBreed %}Breed{% endif %}</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{{ invoice.animal.getBreed }}</span></td>
</tr>
<tr>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>Email</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{{ invoice.contact.TemplateVarGeneralEmails }}</span></td>
<td style="float:left; height:20px; text-align:left; width:10%"></td>
<td style="float:left; height:20px; text-align:left; width:10%"><span style="font-size:12px"><strong>{% if invoice.animal.sex %}Sex{% endif %}</strong></span></td>
<td style="float:left; height:20px; text-align:left; width:30%"><span style="font-size:12px">{{ invoice.animal.sex|sexformat }}</span></td>
</tr>
</tbody>
</table>
</div>
This is the source code for the footer of the invoice with surcharge information template:
<table border="0" cellpadding="1" cellspacing="1" style="background-color:#f5f5f5; width:100%">
<tbody>
<tr>
<td colspan="2" style="text-align:center; width:100%"><span style="font-size:13px"><strong>Thank you for choosing {{ invoice.ownershipSeparation.inheritedcontact.name }}</strong></span></td>
</tr>
{% if invoice.InvoiceTypeName != "CREDIT NOTE" %}
<tr>
<td colspan="2" style="text-align:center; width:100%"><span style="font-size:11px">{{ invoice.ownershipSeparation.inheritedcontact.getBankAccountNumber }}{% if invoice.ownershipSeparation.inheritedcontact.getPaymentReference %}<br />
{{ invoice.ownershipSeparation.inheritedcontact.getPaymentReference }}{% endif %}</span></td>
</tr>
<tr>
<td colspan="2" style="text-align:center; width:100%"><span style="font-size:11px"><strong>When processing your payment please quote your Account Reference which is located at the top of this invoice.</strong></span></td>
</tr>
{% endif %}
<tr>
<td colspan="2" style="text-align:center; width:100%"><span style="font-size:11px"><em>Registered Office: {% if invoice.ownershipSeparation.inheritedcontact.postalAddress.getStreet1 %}{{ invoice.ownershipSeparation.inheritedcontact.postalAddress.getStreet1 }}{% endif %}{% if invoice.ownershipSeparation.inheritedcontact.postalAddress.getStreet2 %}, {{ invoice.ownershipSeparation.inheritedcontact.postalAddress.getStreet2 }}{% endif %}{% if invoice.ownershipSeparation.inheritedcontact.postalAddress.getSuburb %}, {{ invoice.ownershipSeparation.inheritedcontact.postalAddress.getSuburb}}{% endif %}{% if invoice.ownershipSeparation.inheritedcontact.postalAddress.getCity %}, {{ invoice.ownershipSeparation.inheritedcontact.postalAddress.getCity }}{% endif %}{#{% if invoice.ownershipSeparation.inheritedcontact.postalAddress.getRegion %}, {{ invoice.ownershipSeparation.inheritedcontact.postalAddress.getRegion }}{% endif %}#}{% if invoice.ownershipSeparation.inheritedcontact.postalAddress.getPostCode %}, {{ invoice.ownershipSeparation.inheritedcontact.postalAddress.getPostCode}}{% endif %} • {{ invoice.ownershipSeparation.inheritedcontact.phoneNumber }} • {{ invoice.ownershipSeparation.inheritedcontact.businessEmail }}</em></span></td>
</tr>
<tr>
<td style="text-align:center; width:50%"></td>
<td style="text-align:center; width:50%"></td>
</tr>
</tbody>
</table>