Skip to main content

Define date and numeric formats in HTML invoice templates

Zuora

Define date and numeric formats in HTML invoice templates

The HTML Templates feature is in the Early Adopter phase for invoices. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at Zuora Global Support.

By default, dates are displayed as plaintext, without the localization based on locale. To format date fields per locale, use the Localise(locale_NAME) function. See Supported formatter functions for more information about the Localise(locale_NAME) function.

Given the account uses the communication profile with the locale English (United States).

Merge Field Display on PDF Note
{{Invoice.InvoiceDate}} 2021-02-14 Without the localization.
{{Invoice.InvoiceDate|Localise}} 02/14/2021 Localized per the default locale (English - United States) from the communication profile
{{Invoice.InvoiceDate|Localise(fr_FR)}} 14/02/2021 Localized per locale fr_FR
{{Invoice.InvoiceDate|Localise(it_IT)}} 14/02/2021 Localized per locale it_IT
{{Invoice.InvoiceDate|Localise(de_DE)}} 14.02.2021 Localized per locale de_DE

The value of a numeric field is displayed as a number without the localization, by default. To format numeric fields per locale, use the Localise(locale_NAME) function. 

Merge Field Display on PDF Note
{{Invoice.Amount}} 12430.64 Without the localization.

{{Invoice.Account.Currency|Symbol}}  {{Invoice.Amount|Localise}}  {{Invoice.Account.Currency}}

Or

 {{#Invoice}}{{Account.Currency|Symbol}}  {{Amount|Localise}}  {{Account.Currency}}{{/Invoice}}

$ 12,430.64  USD Localized per the default locale (English - United States) from the communication profile

{{Invoice.Account.Currency|Symbol}}  {{Invoice.Amount|Localise(de_DE)}}


Or

 {{#Invoice}}{{Account.Currency|Symbol}}  {{Amount|Localise(de_DE)}}{{/Invoice}}
€1.234.567,89 Localized per locale German - GERMANY. Currency is European.

{{Invoice.Amount|Localise(it_IT)}}  {{Invoice.Account.Currency}}


Or

 {{#Invoice}}{{Amount|Localise(it_IT)}}  {{Account.Currency}}{{/Invoice}}
12.430,64 EUR Localized per locale Italian - ITALY. Currency is European.

{{Invoice.Account.Currency|Symbol}}  {{Invoice.Amount|Localise(fr_FR)}}  {{Invoice.Account.Currency}}


Or

 {{#Invoice}}{{Account.Currency|Symbol}} {{Amount|Localise(fr_FR)}}  {{Account.Currency}}{{/Invoice}}

€1.234.567,89 EUR Localized per locale French - FRANCE. Currency is European.