All Collections
Templates
Tips & 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 a week ago

When creating an invoice with a template, the system will automatically calculate the amounts including and excluding VAT, and the VAT amount itself.

This will help you to filter your invoices, and order them.

If the coding for this setting is not in your templates, the amounts like above remain 0.00. Let's fix this!

If you are insecure about the coding - it might be a bit difficult, do find us in the Support Chat for help!

Code of the template

Navigate to your template(s) and open them.

Go the part of the code where the ex. VAT, VAT and inc. VAT are shown. Code is always shown between {{ and }}.

In the example below, you will find the bold text that indicates that the coding behind it, is the amount you need.

Explanation of the code:

{{ totalEx | format_money }}

totalEx: the code before the | is the amount that shows - in this example - your total excluding VAT.

format_money: the part after the | is a setting to show the amount in the correct format, with a . and two decimals behind the .

Total excluding VAT

To save your total ex. VAT, replace 'format_money' with 'save_ex_vat'. The format of the amount won't change, but will be saved.

{{ totalEx | save_ex_vat }}

VAT amount

For the VAT amount, replace 'format_money' with 'save_vat'.

{{ vat | save_vat }}

Total including VAT

For the total inc. amount, replace 'format_money' with 'save_total'.

{{ totalEx | plus: vat | save_total }}

All your new invoices will now use the saved amounts.

If you have multiple invoice templates, you need to do this for all the templates.

Load again

The amounts in the invoices created before this fix, won't automatically show the amounts.

Switch between your templates and the invoice will calculate again.

Do be aware that your template isn't named "[custom] Template name" - if this is the case, there might have been some changes made that will get lost.

Did this answer your question?