Skip to main content

Updating templates with calculations

Ensure all financial calculations are XML-compliant

Geertje avatar
Written by Geertje
Updated over a month ago

Calculations in templates have been redesigned to meet the strict requirements of e-invoicing. In the old setup, formulas were mainly used to control how amounts such as totals, VAT, or costs were shown in the PDF. With XML exports, all financial calculations are processed in the backend. Instead of adding manual formulas to your template, you now simply enable the relevant toggles in the template settings to decide which calculated values should appear on the invoice.

⚠️ Please note: updating calculations can sometimes feel complex or overwhelming. You can always reach out to us via the support chat — we’ll be happy to adjust the templates for you.


Table of Contents

1. Why calculations have changed
2. How the new system works
3. Update your template


1. Why calculations have changed

In PDF templates you had more flexibility in how financial details were presented in the layout. This worked visually, but for XML invoices the calculations are now handled fully in the backend. This ensures that all amounts — from totals and VAT to WHT and costs — are structured in a way that is immediately valid for XML export, without relying on manual formulas in the template.

2. How the new system works

Previously, templates relied on manual formulas such as {{ event.fee | plus: event.bookingsfee | plus: costs }}. These worked for PDFs but left room for variation in how calculations were displayed.

Now, calculations are controlled through toggle options in the template settings. Instead of writing formulas, you simply enable the options that apply to your workflow. This ensures consistency across all financial elements of your invoice.

Example:

  • Before: Calculations like {{ total_ex_vat }} + {{ vat_amount }} were manually placed in the template.

  • Now: Toggles in the template settings determine which financial components (e.g. totals, VAT, WHT, costs) are included and how they are calculated.

The PDF layout may look slightly different than before, since calculations now follow a fixed structure designed for XML compliance.

If you don’t need XML invoices, your old calculation codes will continue to work as before. Nothing changes for standard PDF-only templates.

3. Update your template

To update an existing template:

  1. Go to Office > Invoice Templates.

  2. Select the template you want to update.

  3. Review the calculation settings and enable the toggles that apply to your workflow.

  4. Click Save to confirm your changes.

  5. Test the output in a test invoice.

  6. If you are happy with the result, you can delete the old calculations coding from the template.

With the new calculation system, all financial elements of your invoices are both ready for XML export and clearly presented in PDF.


Did this answer your question?