Currency is not getting captured properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2018 04:38 AM
Hi Team,
I have added a new currency under "Currencies" in System Localization as below:
The field and choices relevant to cost on Asset is working fine. I am trying to export the data with cost value included and is working fine in Excel sheet, however under PDF export $ is getting captured instead of ₹.
Please advise on this part.
Regards,
Pravesh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2018 05:04 AM
Hi
What is the value of your locale property?
sys_properties.list and a name of glide.system.locale
Check out the currency instances table - fx_currency_instance to make sure that there is conversion taking place.
In general, currency values crossing the boundaries of the platform are represented in the user’s session currency and formatted in the user’s locale.
Import
- A number formatted in the user’s locale: this is taken as a value in the user's session currency, for example, 1,234.56.
- The number prefixed by the three-letter currency code separated by a semicolon, for example, EUR;1.234,56.
This behavior can be customized in transform map scripts.
Export
Currency values are exported in the user’s session currency formatted in the user’s locale except when exporting as XML. When exporting currency in XML, the value is in the reference currency value with no formatting.
Check out the currency instances table - fx_currency_instance
filter by table and use Asset (alm_asset)
You should see a record with your pairs.
Each record would carry entries for the reference currency and currency of input
Check a record and see if the Reference currency, I'm expecting it to be USD, is correctly calculated.
The you are onto session currency and locale
The system uses two kinds of currency, session and reference.
- The value as entered, in the user's locale.
- The currency code, in the user's locale.
- The value converted to the reference currency using the current exchange rate.
Session currency
- The currency symbol
- The value converted to the session currency and shown in a localized number format.
- Single-currency mode setup using glide.i18n.single_currency and glide.i18n.single_currency.code.
- The default currency for the user’s locale.
Reference currency
- The system locale set using the property glide.system.locale
- The Java default locale, typically en.US
The filtering and aggregation features use the reference currency value to perform calculations on default currency fields. This can yield inaccurate results because of conversion rate changes.
Issues with currency fields
Users are often confused by the results of filtering, sorting, and displaying currency fields because the system works with at least two currencies for each value: the session currency and the reference currency.
- Lists filtered on currency fields might not be in the expected order because the reference currency values are used for filtering but session currency values are displayed.
- Aggregation of currency fields might not produce the expected results because reference currency values are aggregated and then converted to the session currency.
- Currency values might not be formatted as expected because currency values are formatted based on the user's locale and not on the currency code
The confusion is caused by the difference between session and reference currencies, changing conversion rates, and different session currencies used by different users.
and locale
here are two locale settings, system and user. The system locale determines the reference currency, and the user locale determines the session currency.
System locale
The system locale is set using the glide.system.locale property. The value is in the format Language.Country, where the language is an ISO 639 language code and the country is an ISO 3166 language code. Internally, this value is used as specified by Java. The system locale setting should be in the Java supported locales list. The system locale should be set once on a fresh zboot because reference currency values in currency fields are assumed to be in the currency implied by the system locale. To set this property, see Currency system properties.
User locale
- User record in which both country and language are specified.
- System locale set using the glide.system.locale property.
- Browser locale.
Amounts in currency fields are composed of a currency code and amount. Amounts are always shown in the session currency and are formatted in the Java-specified format for the user locale.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 10:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2018 12:54 AM
They look normal, so nothing strange there.
Is it different people doing the exports? Just wondering what the context of the export is.
My fear here is that you have an issue between location, currency and your browsers view of your "locale". Basically in the client view it's trying to find your locale and setting a session currency based on it but it's failing first time but working with a precedence override. When you are no longer in that browser context and you ask it to export a call is made to the back end to do the export and it's looking at your base user data and saying, don't know, can't find so send the system default reference currency that is USD.
So need to check what your user record language is, also the country code and any location as locations have a language associated with it.
If all of those line up I would be tempted to raise a hi ticket