Skip to main content
All CollectionsTemplatesTips & tricks
How to correctly show the total / vat of your invoice
How to correctly show the total / vat of your invoice

Coding for saving the amounts from your invoice

Geertje avatar
Written by Geertje
Updated over 2 months ago

When creating invoices with templates, the system can automatically calculate amounts including VAT, excluding VAT, and the VAT amount itself. This feature makes it easier to filter and sort your invoices accurately.

If your template does not include the necessary code, these fields may display "0.00." Follow the steps below to ensure your templates are set up correctly.


Table of Contents

  1. Accessing Your Invoice Template Code

  2. Understanding and Updating the VAT Code

    • Total Excluding VAT

    • VAT Amount

    • Total Including VAT

  3. Reapplying Templates to Existing Invoices


1. Accessing Your Invoice Template Code

  1. Navigate to Templates via Office for Agency and Settings for Artist PRO and open the invoice template(s) you wish to update.

  2. Locate the section in the code where the VAT details (ex. VAT, VAT, inc. VAT) are shown. Code segments are always enclosed between {{ and }}.

  3. Refer to the example below for coding structure and replace the relevant parts with the new code snippets provided.

2. Understanding and Updating the VAT Code

Here’s an explanation of each coding element to ensure VAT values are calculated correctly:

Example of the Code:

{{ totalEx | format_money }}
  • totalEx: The amount shown before the |, representing the total excluding VAT.

  • format_money: Formats the amount with a decimal point and two decimal places.

Total Excluding VAT - save_ex_vat

To save the total excluding VAT, replace format_money with save_ex_vat:

{{ totalEx | save_ex_vat }}

This will save the total ex. VAT without changing its display format.

VAT Amount - save_vat

To display and save the VAT amount, replace format_money with save_vat:

{{ vat | save_vat }}

Total Including VAT - save_total

For the total including VAT, replace format_money with save_total:

{{ totalEx | plus: vat | save_total }}

These updates ensure that all new invoices generated will use these saved amounts correctly.

3. Reapplying Templates to Existing Invoices

For invoices created before these template updates, the amounts may still show as "0.00." To refresh and recalculate:

  1. Switch to another template and then back to the original to trigger a recalculation.

  2. Be cautious if the template name begins with "[custom]". If so, it may contain custom changes that could be lost in the process.

Note: If you need assistance with coding, please reach out through Support Chat for help.

Did this answer your question?