GNOME Bugzilla – Bug 348701
Wrong currency symbol when currency is set to DKK
Last modified: 2018-06-29 21:10:30 UTC
When creating an invoice, the currency symbol is euro instead of "KR" or "DKK". The currency_symbol in /usr/share/i18n/locales/da_DK is correct (not euro), and when choosing another currency, for example SEK, the corresponding symbols appear, so the bug seems to be somewhere in the localization which I have not been able to identify. The problem is severe, as it makes gnucash unusable for invoicing (and thus business accounting) in Denmark.
Some more details needed: What is your exact locale or LANG setting? (echo $LANG) What are the various default currency settings in the GnuCash preferences; default currency for new accounts? default currency for new reports?
Oh, and one more question: Which currency symbol do you see when you run one of the other text reports, for example the "balance sheet"? Does this show the correct KR or DKK? If yes, then this is a problem of the invoice and business function (and I'd change it to the Business component). If no, then it is a problem of either gnucash in general or your locale.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
Sorry it took so long to provide the information, but I did not see the first two comments before today. After looking a bit more around it appears that the text-like reports, such as Invoices, General Ledger, Income Statement etc. use the Euro symbol for currency, the Barcharts correctly use DKK and accounts and the Piecharts use the generic currency symbol (¤). > What is your exact locale or LANG setting? (echo $LANG) en_DK.UTF-8 > What are the various default currency settings in the GnuCash > preferences; default currency for new accounts? DKK > default currency for new reports? DKK > Which currency symbol do you see when you run one of > the other text reports, for example the "balance sheet"? Balance sheet in euros, barchart in DKK, and piecharts in ¤ (generic currency symbol).
Does "locale -k LC_MONETARY" show DKK?
`locale -k LC_MONETARY` shows: > locale -k LC_MONETARY int_curr_symbol="DKK " currency_symbol="¤" mon_decimal_point="," mon_thousands_sep="." mon_grouping=3;3 positive_sign="" negative_sign="-" int_frac_digits=2 frac_digits=2 p_cs_precedes=1 p_sep_by_space=0 n_cs_precedes=1 n_sep_by_space=0 p_sign_posn=1 n_sign_posn=1 int_p_cs_precedes=1 int_p_sep_by_space=0 int_n_cs_precedes=1 int_n_sep_by_space=0 int_p_sign_posn=1 int_n_sign_posn=1 duo_int_curr_symbol="DKK " duo_currency_symbol="¤" duo_int_frac_digits=2 duo_frac_digits=2 duo_p_cs_precedes=1 duo_p_sep_by_space=0 duo_n_cs_precedes=1 duo_n_sep_by_space=0 duo_int_p_cs_precedes=1 duo_int_p_sep_by_space=0 duo_int_n_cs_precedes=1 duo_int_n_sep_by_space=0 duo_p_sign_posn=1 duo_n_sign_posn=1 duo_int_p_sign_posn=1 duo_int_n_sign_posn=1 uno_valid_from=10101 uno_valid_to=99991231 duo_valid_from=10101 duo_valid_to=99991231 monetary-decimal-point-wc=44 monetary-thousands-sep-wc=46 monetary-codeset="UTF-8"
I have the exact same problem and responses as the reporter. I use Kubuntu, hence KDE /morten
Hmmm found a small workaround. It seems this is related to the en_DK locale. Start gnucash like this: LC_MONETARY="da_DK.UTF-8" gnucash or set your locale to da_DK.UTF-8.... I don't know why this is an issue, but now it shows "dk" /morten
setting LC_MONETARY to DKK and changing the default currencies from "locale" (which shows USD after that env setting was set) to DKK seems to be a usable workaround. I believe the issue is with empty currency settings from the en_DK locale
Ok, so the current currency symbol (¤) is converted to € in src/report/report-system/html-style-info.c, see http://svn.gnucash.org/trac/changeset/7200. Christian, do you think this is still necessary? (16:57:04) warlord: I suspect it was to deal with gtkthml-1 and utf-8 locales. Nonetheless, we may agree that there is a bug in the locale (maybe it is a forgotten interim solution) to only use that symbol instead of "kr" or "DK". We may also consider showing the user a warning about a possible bug in her locale.
From the discussion at http://lists.gnucash.org/pipermail/gnucash-devel/2002-September/006747.html and follow-ups I would gather we can revert r7200 by now. I'm not sure whether this fixes this bug, but maybe it does.
What is the status of this?
I have tested the suggestion to revert r7200 and this seems to do the trick. This problem has been fixed in the development version (r18563). The fix will be available in the next major software release. Thank you for your bug report.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=348701. Please update any external references or bookmarks.