+2
Round numbers - open PDF templates
Ineke0333 1 year ago
in Home Portal / Smart Projects with CAT integration
•
updated by Thomas Mosley 1 year ago •
5
Anyone has any idea to round numbers in the open PDF templates in XTRF?
Our quotes include totals with 3 decimals -> €120,025
Thanks for sharing your thoughts
Customer support service by UserEcho
Hey, is this only a problem in open PDF templates?
You could try and check General configuration - Settings - Number and Date formatting - quantity and currency format
Thank you, this is not an option I'm afraid since we use 3 decimals for pricing matters on other levels. So ideally I want to manage this only within the open PDF templates in the document templates. Any suggestions?
Hi,
As I remember there was an issue with the default way they were handling this when they first launched the new templates. They were going to fix it at some point but I am not sure if that has happened.
Our workaround is:
$utils.getXtrfDecimalFormattingUtils().formatCurrency(YOUR_VARIABLE_HERE)
Provided you have set up your currency format to only be 2 digits, this will show only 2 digits. If you also want to show the currency symbol, you need to add that before, i.e.:
${quote.currency.symbol} $utils.getXtrfDecimalFormattingUtils().formatCurrency($totalAgreed)
This is the code we are using for our quote templates that include half cent pricing....
This is the answer I got a few months ago from the Helpdesk, similar to MikevG's when I needed to display 4 digits after the decimal:
You can define custom number formats by using: