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 504257 - Need to replace old Afghanistan Afghani (AFA) with new Afghanistan Afghani (AFN)
Need to replace old Afghanistan Afghani (AFA) with new Afghanistan Afghani (AFN)
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Engine
2.2.x
Other Windows
: Normal minor
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2007-12-18 14:54 UTC by Daniel Harding
Modified: 2018-06-29 21:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change the fraction for AFA from 100 to 1. (710 bytes, patch)
2007-12-18 15:01 UTC, Daniel Harding
none Details | Review
Adds new Afganistan Afghani (AFN) to the currency list (834 bytes, patch)
2007-12-21 13:20 UTC, Daniel Harding
committed Details | Review

Description Daniel Harding 2007-12-18 14:54:48 UTC
The Afghanistan Afghani (AFA) cannot be subdivided.  One Afghani is the smallest unit of currency used (equal to approximately 0.02 USD).  However, by default GnuCash uses a fraction of 1/100 for AFA.

This can be observed by opening the "Edit currency" window for AFA - the fraction traded will be 100, but should be 1.
Comment 1 Daniel Harding 2007-12-18 15:01:52 UTC
Created attachment 101197 [details] [review]
Change the fraction for AFA from 100 to 1.
Comment 2 Andrew Sackville-West 2007-12-20 16:36:24 UTC
per http://en.wikipedia.org/wiki/Afghan_afghani (as of today...) the Afghani has a sub-unit called the "pul" at 100 pul to 1 Afghani. 

I'm not up on currency issues, but this seems to indicate that gnucash is correct to use the 1/100 fraction in this case.
Comment 3 Daniel Harding 2007-12-20 18:25:23 UTC
OK, I should have done a little more research.  You are right, AFA was in fact subdivided into 100 pul.  My mistake was not realizing that AFA has now been replaced by AFN, which does not have subdivisions.  From the Wikipedia article you referenced, in the section "Second afghani, 2002-":

"Between October 7, 2002, and January 2, 2003, a new afghani was introduced with the ISO 4217 code AFN. No subdivisions have been issued."

So, AFA is actually obsolete and my patch is incorrect.  Instead, the AFN currency should be added, using a fraction of 1/1.

I'll need to research how GnuCash deals with obsolete currencies (for AFA) and see if I can't put together a new patch in the next day or two bringing all this up-to-date.

Changing the summary of this bug (was "Smallest fraction traded for AFA currency should be 1 instead of 100") to reflect this.
Comment 4 Daniel Harding 2007-12-21 13:20:48 UTC
Created attachment 101403 [details] [review]
Adds new Afganistan Afghani (AFN) to the currency list

New patch:  left the old Afghanistan Afghani (AFA) unchanged, except that it is now renamed to "Afghanistan Afghani (old)".  Added the new Afghanistan Afghani with ISO 4217 code AFN and code number 971 (see http://en.wikipedia.org/wiki/ISO_4217#Active_codes), and a fraction of 1/1.
Comment 5 Andrew Sackville-West 2007-12-21 19:00:10 UTC
Applied r16690

In the future, please diff from the top level (you diffed from src/). 

I see that the past practice has been to leave the old currency in place, just renaming it and noting the change.  Derek has asked if we need both in place. I say yes: many others are still in place and this one is more recent than those. 

Thanks for this!
Comment 6 Andreas Köhler 2008-01-05 01:00:33 UTC
branches/2.2 @ r16788 for GnuCash 2.2.3.
Thanks a lot!
Comment 7 John Ralls 2018-06-29 21:56:49 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=504257. Please update any external references or bookmarks.