Removing the Currency Symbol Printed Using Advanced PDF HTML Templates

If There is a requirement to remove the Currency Symbol printed using Advanced PDF/HTML Templates for Currency type fields without converting to 2 decimal places, add the following code to the value you need to remove the symbol.

?string?replace(‘[^\.,0-9]’,”,’r’)

Example: ${item.rate?string?replace(‘[^\.,0-9]’,”,’r’)}

Note: The additional code removes all non-numeric characters except ‘.’ and ‘,’. Add characters  within the square brackets ([]) for exemption.

Leave a comment

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