Currency Decimal Places Standards
We have a requirement in which we need to be able to display quantities in any existing currency. We need to display according to "ISO 4217", which states the currency code, as well as the number of decimal places. Whenever I create a currency control, I can choose on Decimal Places the option "Use currency standard". What happens when I select this option? Is there somewhere in the code where I can assign the standard to each currency?
While testing, I found out that, when I change into Japanese Yen currency, the control automatically displays cero decimal places (even if the control says 2). It changes back to 2 if I change back to Euros/Dollars... Diving into the code, I found a function "pxFormatNumber", with code that explains this behavior. It has been set (BUG-510098 SE-56448), if the currency code is JPY, HUF or TWD, then the control will display as "0 decimal places". This is also a problem, because according to the ISO 4217, both HUF (Hungary currency) and TWD (Taiwan currency) should display 2 decimal places, not 0. This rule is Final (also referring ones), therefore I can not make any modifications. It would be ideal if Pega can update the control, to comply with the standard ISO 4217.
We have a requirement in which we need to be able to display quantities in any existing currency. We need to display according to "ISO 4217", which states the currency code, as well as the number of decimal places. Whenever I create a currency control, I can choose on Decimal Places the option "Use currency standard". What happens when I select this option? Is there somewhere in the code where I can assign the standard to each currency?
While testing, I found out that, when I change into Japanese Yen currency, the control automatically displays cero decimal places (even if the control says 2). It changes back to 2 if I change back to Euros/Dollars... Diving into the code, I found a function "pxFormatNumber", with code that explains this behavior. It has been set (BUG-510098 SE-56448), if the currency code is JPY, HUF or TWD, then the control will display as "0 decimal places". This is also a problem, because according to the ISO 4217, both HUF (Hungary currency) and TWD (Taiwan currency) should display 2 decimal places, not 0. This rule is Final (also referring ones), therefore I can not make any modifications. It would be ideal if Pega can update the control, to comply with the standard ISO 4217.
Would there be any other solution? The only one I can think of, would be to have 4x times fields, one for 0 decimal places, one for 2 decimal places, 3 and 4 (as those are the ISO different values), and display one or the other depending on the currency. Still, this solution is overkill, and it implies quadruplicating the number of fields in our Sections, which is far from ideal.
Thank you in advance.
See ISO 4217 for reference: https://es.wikipedia.org/wiki/ISO_4217