Change Currency Format of Calculated Field Displayed on Advanced PDF/HTML Template

Calculated field in Advanced PDF/HTML Template ignores the system number formatting, therefore, the field ${record.subtotal + record.discounttotal} appears on the printout with no currency symbol at the beginning, with no decimal places and with different formatting compared to other numbers. To resolve, the HTML code needs to be updated.

Solution
  1. Navigate to Customization Forms Advanced PDF/HTML Templates
  2. Preferred Advanced PDF/HTML Template: Click Edit/Customize
  3. Top right corner: Toggle Source Code
  4. Source Code: Place the following snippet in the code at the appropriate position

<#setting locale=”fr_FR”>

<td align=”right”>${(record.subtotal + record.discounttotal)?string(“#,###.00”)}</td>

Note: The expression locale=”fr_FR” maybe changed based on the desired locale.

5.Click Save

Leave a comment

Your email address will not be published. Required fields are marked *