Display the Amount in fixed format, where amount contains $ symbol in advanced PDF template

In order to display the amount into a fixed digit format , where the amount value contains the $ symbol, refer the sample code below

<#if record.amount?contains("$")>
<#assign newAmountValue = record.amount?replace("$","")>
<#assign convertedAmountValue = newAmountValue?string["#,##0.00"]>
<table style="width:100%;>
<tr><td>${convertedAmountValue}</td></tr>
</table>
</#if>

Leave a comment

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