Convert Numerical Sum From Integer to Currency in Advanced PDF/HTML Template

Advanced PDF/HTML templates allows simple computations through the use of the Freemarker language. For instances where values needs to be compared or displayed on a certain format, the Freemarker language has a built in function that converts the type casting of variables.

Solution
  1. Navigate to Customization > Forms Advanced PDF/HTML Templates
  2. Preferred Advanced PDF/HTML Template: Click Edit
  3. Create a variable to store the sum of the fields by using the below code:<#assign totalSum = var1 + var2>Copy
  4. Convert the variable to currency by using the below code:${‌totalSum?string.currency}Copy
  5. Click Save

Leave a comment

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