How to print invoice-amount without taxes in twig-templates?

@Schmitti so this is certainly possible, using twigs format_currency() filter

ie.

{{ '1000000'|format_currency('EUR', locale='de') }}
{{ '1000000'|format_currency('EUR', locale='at') }}

Just to note, this will require php-intl extension to be installed. It also requires an update to the template variables so that we expose the locale, in this example the code would look like this:

{{ invoice.amount|format_currency(invoice.client.currency, locale=invoice.client.locale) }}

the locale variable will be available in 5.9.3

2 Likes