After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 130920 - User-defined currencies should be available
User-defined currencies should be available
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Documentation
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Yawar Amin
Tom Bullock
: 570974 602164 648627 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-01-08 18:20 UTC by bruno schwander
Modified: 2018-06-29 20:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug #130920 (3.83 KB, patch)
2011-01-13 04:53 UTC, Yawar Amin
committed Details | Review

Description bruno schwander 2004-01-08 18:20:02 UTC
Proposal:

Currently, only ISO currencies are available. However, checking-type bank
accounts are available in many countries that are not denominated in any
national currency. For example precious metals-denominated bank accounts,
where all transactions are made in terms of a certain weight of precious metal.

Discussion:

When this enhancement was proposed on the gnucash development mailling
list, it was suggested to "simply use a stock or mutual fund account, that
would help track the amount of the commodity (for example the precious
metal) in addition to the value (in national currency) of the said commodity."

However this method fails in light of the following, which underlines the
necessity of, to the least, letting users define other non-ISO currencies
for an account:

A precious-metal (or any non-national currency such as eGold, eBullion, 
the ithaca hour, etc.) denominated bank account is completely different
from a stock/fund account. According to the suggested method above, one
could set up in gnuCash a stock market account and trade dollars in it,
where dollars are 'sold' and 'bought', instead of using a bank type
account. Obviously nobody does that, and a bank/checking account type is
used instead. 

Similarly, a precious metal, or other non-national currency account, where
all fees and transactions are made in the unit of the account, NOT some
other national currency, can not be considered a 'stock' account. The
commodity in the account is not 'sold' or 'bought', it is just another unit
(currency) that increases or decreases the balance of the account. The
value of the account is expressed in the unit of the account (for example
ounces of gold). It is not because a given currency is backed by a
commodity, that the currency suddenly becomes a pure commodity (it only
becomes better money, see Ludwig von Mises and austrian economics :-) )

As another example of the necessity to have non-national currencies
denominated accounts, let us consider the following hypothetical situation:

Let us imagine that GnuCash is totally US-centric and only manages US
dollars. Someone comes along and wishes GnuCash managed also Indian rupees.
The solution, he is told, is to have a stock account in which he trades
Indian rupees in and out, converting payments and such in US dollars.

Does that make sense ? It seems not. The indian guy does not care for US
dollars except for that small USD account that he uses to receive money his
relatives in the US send him. Twice a year he transfers the USD amounts to
his Indian rupees account, but the vast majority of his transactions are in
Indian rupees.

That is why metal-denominated (or any other non-national currency) 'bank'
accounts should be available in gnucash, just as DM, USD, YEN, and CHF...

Considering that privately issued currencies are currently becoming
extremely common (as mentioned above, the gold backed e-Currencies, but
also the liberty dollars, ALFII' ALC, the gold dinar, etc. etc. all are
receiving increawee interest and significant circulation) and that it would
be very difficult for the developers of gnuCash to keep track of all
available, defined currencies in the world, and that it would show once
again that the open-source community is at the forefront of innovation,
flexibility and freedom, this simple enhancement would prove extremely
valuable to gnuCash and its users.

Implementation suggestion:

At this time, when setting up an account in gnuCash, the dialog box to
choose which currency to use for the account has a "Type" drop-box, that
only currently shows "CURRENCY". Another commodity namespace "USER
CURRENCY" could show up in there, and the user-defined currencies be saved
along the user accounts data.


bruno schwander

ref: gnucash-devel mailling list, circa Dec 30 2003 discussion between
myself <bruno@tinkerbox.org> and Derek Atkins <warlord@MIT.EDU>
Comment 1 gerv 2005-12-06 00:22:06 UTC
One more pedestrian reason for allowing this (and, as far as I can tell, it's
simply a matter of removing the error message which prevents it) is that Gnucash
doesn't have a completely up-to-date list of all the currencies of the world.
For example, it doesn't have the Cuban Convertible Peso (CUC).

Gerv
Comment 2 Beto Zamora 2009-05-02 12:20:20 UTC
Well not only it may not have all currencies. In Chile, along with the Chilean Peso, we have another type of currency used for loans, called "Unidad de Fomento" (UF). The UF exchange rate changes daily according to the last month Price Index, so at the end of the month it climbs or goes down in the exact same percentage that the Price index moved last month.

As for now I'm using another currency for that matter (VEF) which has a similar acronym to the UF, but the problem is that whenever I do an automatic update of stock/currencies, I lose the information I had. And the other problem is that I can't use 4 decimals because VEF is configured to use only 2 decimals and this can't be changed by the user.

Please add User-Defined currencies in the next release!!

Regards,
--
Beto
Comment 3 Phil Longstaff 2009-06-22 20:30:56 UTC
*** Bug 570974 has been marked as a duplicate of this bug. ***
Comment 4 Christian Stimming 2009-11-23 20:06:16 UTC
*** Bug 602164 has been marked as a duplicate of this bug. ***
Comment 5 Frank H. Ellenberger 2010-11-12 18:49:57 UTC
I do not remember, when the patches were applied, but in svn are some enhancements:

Re: At least there are 
 1. precious metals XAG, XAU, XPD, XPT
 2. non governmental national: CHE, CHW
 3. index based: CLF, COU, MXV, UYI, VEF
 4. regional: XCD, XOF, XPF
 5. multi national: XDR, XFO, XFU
 6. dummies: XXX, XTS, which you can (mis)use at your own risk

Special, as long as you do not enter exchange rates to other currencies, you can use the currency XXX (no [ISO-]currency) for nearly everything you wish to use. But if you wish to enter exchange rate you should create your own commodities.

Re #1: fixed some time ago
Re #2: fixed some time ago
Re #3: fixed some time ago

In the future, if you find a symbol in ISO 4217, which is not in GnuCashs currency list, please file a separate bug report: currency symbol XYZ is missing in <version> - I watch a list with the keywords currency and commodity.

Also if the smallest currency unit (SCU) is wrong, file a separate bug report. Background: most information is taken from wikipedias ISO 4217 table, but they show usually the smallest cash unit, while accounting sometimes uses more decimals like e.g. IDR.

Final question: 
Do we really need user defined currencies?
If not, I would prefer, to move this bug to the documentation module as that indeed should be improved.
Comment 6 Frank H. Ellenberger 2010-11-12 23:13:51 UTC
I add you here, because parts of the above said needs documentation. Before I added the keyword "documentation", but I do not  know, if you search for it.
Comment 7 Christian Stimming 2010-12-03 20:06:27 UTC
@Frank: I wouldn't expect the original poster to answer again, after 6 years :-)

Hence: Still an open issue? Or closed?
Comment 8 Frank H. Ellenberger 2010-12-06 23:02:36 UTC
@Christian: From my POV 

1. on the short parts or a rework of comment #5 should flow in the documentation.

2. on long term we should enable Units like 
 a) SI units
  liter for milk, gas, ...
  kg for butter, flour, ...
  km/miles for bonus miles, business travelling in tax declaration
 b) factors like 1 t = 1000 kg
 c) derivates like 1 kWh
this would improve invoicing, tax declarations, ...
But this could be handled in a separate bug.

3. I am not shure about the best way to handle complementary currencies [http://en.wikipedia.org/wiki/Complementary_currency] et. al.: CHE and CHW got ISO symbols , the other not, so we can (currently) not get quotes from Finance::Quote. But the user can define them as commodity in a self defined namespace e.g. complementary_currency. The downside of this approach is, it can not be used as default currency or report currency.

So finally I think in most cases there are better solutions, for the remaining we should either allow, to edit and add currencies or allow at least one additional namespace for report currency and eventually default currency.
Comment 9 Christian Stimming 2010-12-27 20:34:32 UTC
ok, parts of comment #5 should go into the documentation. Apart from this, we won't implement "user-defined currencies" in the near future.
Comment 10 Yawar Amin 2011-01-13 04:10:04 UTC
I'm working on a patch for this right now. The basic plan is to mention two
ways of handling user-defined currencies--(1) defining them as new
securities, and (2) using XXX/XTS, with the choice left to the informed
reader.
Comment 11 Yawar Amin 2011-01-13 04:53:20 UTC
Created attachment 178204 [details] [review]
Bug #130920

Explain workaround for user-defined currencies.
Comment 12 Frank H. Ellenberger 2011-04-26 15:40:21 UTC
*** Bug 648627 has been marked as a duplicate of this bug. ***
Comment 13 Pander 2011-05-09 11:32:13 UTC
Overview of non-ISO currency codes is here:

  https://secure.wikimedia.org/wikipedia/en/wiki/ISO_4217#Without_currency_code
Comment 14 Kurt 2011-09-29 19:36:06 UTC
I did a little bit of tweaking and figured out how to make GnuCash treat non-ISO4217 currencies like regular currencies without having to settle for the insufficient XXX/XTS or securities methods. I shared an example here in which I enabled the Ithaca HOUR and the bitcoin: <a>https://bitcointalk.org/index.php?topic=29884.msg549693#msg549693</a>

I really hope that GnuCash developers will devise a better way for users to define non-standard currencies such that GnuCash will treat them properly.
Comment 15 Frank H. Ellenberger 2011-09-30 03:18:23 UTC
Kurt, the source file is iso-4217-currencies.scm. If it got touched make will run iso-currencies-to-c to create the .c file.

/usr/share/xml/iso-codes/iso_4217.xml is from a separate project: 
http://pkg-isocodes.alioth.debian.org/, which we use for the translation of the currency names. I explained some of the background in https://bugzilla.gnome.org/show_bug.cgi?id=648627#c2

Did you get an error before you added the entries there?

To have user defined currencies would be a nice-to-have, but it is not very high on my *personal* priority list.
Comment 16 Kurt 2011-09-30 03:46:37 UTC
(In reply to comment #15)
> Kurt, the source file is iso-4217-currencies.scm. If it got touched make will
> run iso-currencies-to-c to create the .c file.
> 
> /usr/share/xml/iso-codes/iso_4217.xml is from a separate project: 
> http://pkg-isocodes.alioth.debian.org/, which we use for the translation of the
> currency names. I explained some of the background in
> https://bugzilla.gnome.org/show_bug.cgi?id=648627#c2
> 
> Did you get an error before you added the entries there?

I haven't tried running GnuCash, with the modified .scm file, with an unmodified iso_4217.xml. A comment in the .scm file told me not to.

> To have user defined currencies would be a nice-to-have, but it is not very
> high on my *personal* priority list.

:( Well, hopefully my little kludge will help folks in the meantime.
Comment 17 John Ralls 2018-06-29 20:40:09 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=130920. Please update any external references or bookmarks.