Did you tried setting the locale?
# advancedpdf
a
Did you tried setting the locale?
e
yes.
a
Sorry for asking, maybe is the same locale in Canada but I guess we have a different locale for a different language in Canada?
Ah ok, then it's not handled correctly
NS side
e
Yeah, for locale there is "en_CA" and "fr_CA", so it does recognize that there are two different locales, but Canadian Dollar seems to be hard coded to one currency format and I need two.
a
As an input, I think you should follow more the billing country locale than the language. If you customer language is Norwegian but you are invoicing in Germany, is the Germany countr -> currency that determines how numbers and dates should be printed more than his language
e
But the billing country locale has two formats for the same currency... that's my issue.
a
Yeah, got it. Was just a comment about the language. But you can also force a specific format
Copy code
<#assign dateformat = 'yyyy-MM-dd'>
<#assign numbersFormat = '#,##0.00'>
<#assign numbersFormatDecimals = '#,##0.000000'>
<#setting locale="en_CA">
(sort of, just as an input)
I found multiple cases where setting the locale is wrong in NS, but for small countries. I always assumed Canada was handled correctly
Copy code
${itemUnitPrices[itemid]?string[numbersFormat]}
e
Oh god no Netsuite is HORRIBLE for handling canadian things.
a
Ah, good to know. Anyhow, then you can test the currency AND / OR the customer language and add your formatting
custom, as in the sample above
e
I've tried something along those lines but it always seems to get confused about what to use for the decimal separator vs grouping separator. This number should be formatted like $20,74 but it prints $20 74