How can I, on advanced PDF, handle multiple curren...
# advancedpdf
s
How can I, on advanced PDF, handle multiple currency symbols? string.currency format is always giving me a USA dollar symbol
d
Currency fields should come out with their symbol by default (for example
${record.total}
,
${record.item.rate}
,
${record.item.amount}
, etc) If you want the currency's 3digit ISO code, use
${record.currencysymbol}
s
It isn't it doesn't seem. it's just coming with values. Is there a way to set the locale for specific invoice forms?
Or the customer that the invoice is attached to?
s
Use the
nsformat_currency(amount)
function
🤔 1
That will format the number as if it were a Currency field defined on the transaction record, so you get the correct symbol for the transactional currency (and the correct thousands separators, etc.)
d
That should do the trick. If not, my only other thought would be to make sure the currencies haven't got their default format overridden. (Lists > Accounting > Currencies)
s
Just so you know, ?string.currency always uses the locale set by the Java environment, not the transaction currency, which is why you always get the US dollar symbol. The
nsformat_currency
function was designed to overcome that exact limitation.
mindblown 1
360 Views