ive got a pdf where ?string.currency doesn't outpu...
# advancedpdf
c
ive got a pdf where ?string.currency doesn't output the currency symbol. I've also tried setting the #setting to local="en_US" and seeing if string.currency will work but it doesn't as well. Is there a trick to get the symbol to show up besides hard coding it?
n
Not really sure if something like this is what you need. But I copied it over from one of the SuiteSolutions Bundle.
Copy code
<#assign cs = "{currencySymbol}">

<#function toCurrency value showSymbol=false>
	<#local retval = 0>
	<#local tmpcs = cs>
	<#if showSymbol == false>
		<#local tmpcs = "">
	</#if>
	<#if value &lt; 0 >
		<#local retval = value?string["#,##0.00"]>
		<#local retval = "(" + tmpcs + retval?replace("-","") + ")">
	<#else>
		<#local retval = tmpcs + value?string["#,##0.00"]>
	</#if>
	<#return retval>
</#function>
See if you can use this to your advantage.