From 4cc125aae770dfdd6ce987e79a06949a9cf26511 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 13 May 2024 23:10:34 +0000 Subject: [PATCH] case 4597 --- docs/8.0/ayanova/docs/changelog.md | 4 ++++ docs/8.0/ayanova/docs/home-user-settings.md | 6 ++++++ docs/8.0/customer/docs/home-user-settings.md | 6 ++++++ server/AyaNova/resource/rpt/ay-report.js | 3 +-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/8.0/ayanova/docs/changelog.md b/docs/8.0/ayanova/docs/changelog.md index 10c2d6c6..da39afc1 100644 --- a/docs/8.0/ayanova/docs/changelog.md +++ b/docs/8.0/ayanova/docs/changelog.md @@ -19,6 +19,10 @@ Released 2024-TBD-TBD **Fixed** TBD +**Added** + +- Docs: added documentation about a potential issue with "US" being prepended to currency values for non US users and how to correct it in [user settings currency code](home-user-settings.md#currency-code) + ### AyaNova 8.1.5 Released 2024-05-03 diff --git a/docs/8.0/ayanova/docs/home-user-settings.md b/docs/8.0/ayanova/docs/home-user-settings.md index e55e1d31..e1fd927f 100644 --- a/docs/8.0/ayanova/docs/home-user-settings.md +++ b/docs/8.0/ayanova/docs/home-user-settings.md @@ -73,6 +73,12 @@ The Currency Code controls how currency values are displayed and accepted for in Some other common currency codes are: "EUR" - Euro, "GBP" - Great British Pound, "CAD" - Canadian dollar, "AUD" - Australian dollar. +Mismatch issue: if you are not in the USA and see currency values incorrectly displayed on reports with the prefix "US" as in "US$2.22" this indicates that there is a mismatch between your country code and the default currency code for the US. + +For example if you're in Canada and your country code is defaulting to `en-ca` and you do not set the currency code to `CAD` but leave it to it's default of `USD` the dollar values will automatically be prepended with "US" to the diplsy on reports due to this mismatch. + +The solution is to explicitly set your matching currency code to your language seeting, for example `CAD`. + #### 12 hour clock This _optional_ setting controls whether times are displayed and selected in 12 hour (AM/PM) format or 24 hour format. If not set it will be determined from the browser default language setting. diff --git a/docs/8.0/customer/docs/home-user-settings.md b/docs/8.0/customer/docs/home-user-settings.md index 71f95723..bf52d33e 100644 --- a/docs/8.0/customer/docs/home-user-settings.md +++ b/docs/8.0/customer/docs/home-user-settings.md @@ -64,6 +64,12 @@ The Currency Code controls how currency values are displayed and accepted for in Some other common currency codes are: "EUR" - Euro, "GBP" - Great British Pound, "CAD" - Canadian dollar, "AUD" - Australian dollar. +Mismatch issue: if you are not in the USA and see currency values incorrectly displayed on reports with the prefix "US" as in "US$2.22" this indicates that there is a mismatch between your country code and the default currency code for the US. + +For example if you're in Canada and your country code is defaulting to `en-ca` and you do not set the currency code to `CAD` but leave it to it's default of `USD` the dollar values will automatically be prepended with "US" to the diplsy on reports due to this mismatch. + +The solution is to explicitly set your matching currency code to your language seeting, for example `CAD`. + #### 12 hour clock This _optional_ setting controls whether times are displayed and selected in 12 hour (AM/PM) format or 24 hour format. If not set it will be determined from the browser default language setting. diff --git a/server/AyaNova/resource/rpt/ay-report.js b/server/AyaNova/resource/rpt/ay-report.js index 97affa83..45f470c2 100644 --- a/server/AyaNova/resource/rpt/ay-report.js +++ b/server/AyaNova/resource/rpt/ay-report.js @@ -236,8 +236,7 @@ function currencyLocalized(ayValue) { AYMETA.ayClientMetaData.LanguageName || "en-US", { style: "currency", - currency: AYMETA.ayClientMetaData.CurrencyName || "USD", - currencyDisplay: 'narrowSymbol' + currency: AYMETA.ayClientMetaData.CurrencyName || "USD" } ).format(ayValue); }