I am using freemarker and trying to display numbers in this format: $3,343,434.00
for example. This was easily taken care of by using ${total?string.curre
If you want to maintain the default currency formatting (in case you need to use a locale other than '$'), you can just replace the parentheses like so:
${transaction.amount?string.currency?replace("(","-")?replace(")","")}
This will work without error regardless of if a number is negative or positive.
TIP: Make sure the number is actually a number with the ?number
directive before converting to a currency format