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 543061 - Fractional not working in IDR (rupiah) currency
Fractional not working in IDR (rupiah) currency
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: General
2.2.x
Other All
: Normal normal
: ---
Assigned To: Charles Day
Andreas Köhler
Depends on:
Blocks: backport
 
 
Reported: 2008-07-15 09:12 UTC by JJ Setiawan
Modified: 2018-06-29 22:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
introduce indonesian Sen (Fractional of IDR) (778 bytes, patch)
2008-08-13 19:37 UTC, Frank H. Ellenberger
committed Details | Review

Description JJ Setiawan 2008-07-15 09:12:58 UTC
Please describe the problem:
If I enter a transaction with fractional amount, such as 5000/3, the result is still 1,667.00 instead of 1,666.67

In each account, I already edit the smallest fraction into 1/100, and in Edit - Preferences - General, I already enable the Automatic decimal point, Decimal Places 2.


Steps to reproduce:
1. Make New Account Hierarchy
2. Set the currency into IDR
3. Set the preferences - General Decimal Places 2
4. Edit all account, the smallest fraction into 1/100
5. Type a transaction, with fractional amount, such as 5000/3



Actual results:
It displayed 1,667.00

Expected results:
It displaed 1,666.67

Does this happen every time?
Yes

Other information:
I won't happened if I use USD currency.
Comment 1 Charles Day 2008-07-27 19:39:25 UTC
Confirmed. I can reproduce this as of r17402.
Comment 2 Charles Day 2008-07-27 19:44:57 UTC
This appears to a variation of bug 408444. I think the "smallest fraction" setting of 1/100 on the account is being ignored in favor of the setting on the currency (which for IDR is 1). It should be the other way around.
Comment 3 Frank H. Ellenberger 2008-08-13 19:37:48 UTC
Created attachment 116519 [details] [review]
introduce indonesian Sen (Fractional of IDR)

Salamat Pagi,

I can't imagine by the backpack of paper I got against EUR 100, but http://en.wikipedia.org/wiki/ISO_4217 shows 2 decimals and http://de.wikipedia.org/wiki/ISO_4217 says 1 Rupiah = 100 Sen.

(And now I need another test currency ;-) )
Comment 4 Charles Day 2008-08-13 20:12:59 UTC
I think sen was killed by inflation. Due to bug 408444 I think that the "smallest" fraction setting of the account is being ignored, so if we apply this patch then every IDR account will be forced to use 2 decimal places.

I wonder if it is better to leave the default as zero decimal places, even though this does not follow ISO 4217. If bug 408444 is fixed then the reporter can just set the particular account's "smallest fraction" to 1/100.

But I am not familiar with using IDR; maybe accounts are kept in 2 decimal places even though the sen is dead.
Comment 5 Charles Day 2008-08-13 20:16:39 UTC
Let's ask the reporter:

JJ, why do you want to use 2 decimal places for IDR accounts? Is that normal practice? Do you think it would be good to default all IDR accounts to 2 decimal places?
Comment 6 Frank H. Ellenberger 2008-08-13 21:26:35 UTC
He has to accumulate many rounding errors until he can pay a coin of Rs 100 (smallest common) or Rs 25 (smallest official, but really rare).

Some reference of www.bi.go.id or so would be nice.

Or JJ and who else like, can apply the patch private.
Comment 7 JJ Setiawan 2008-08-14 00:36:52 UTC
Yes, I agree. And No I don't agree.

In normal / daily life, the Indonesia's government does not provide 1/100 fractional real money.

But, you know that in ALL BANK account in Indonesia, the 1/100 fractional STILL be USED 100%.

Please take a look at the Indonesia's Big company report / financial statement, or you can see the Jakarta Stock Exchange.

And the exchange rate between IDR and ALL other currency, ALWAYS uses 1/100 fractional (in bank transaction).

I can not understand why it's so important to maintain 0 decimal points, while the Indonesia's accounting real life practice ALWAYS and ALWAYS using 1/100 fractional nominal.

I hope you can  consider this issue wisely.

Warmest regards.
JJ Setiawan
Comment 8 Charles Day 2008-08-14 04:53:33 UTC
Thanks for the fast response. So we really have two bugs here:

1. The "smallest fraction" setting of the account is ignored (see bug 408444).

2. The "smallest fraction" setting of the IDR currency should be 1/100 instead of 1.

So I think I will apply Frank's patch, which fixes #2. If some user really wants to have 0 decimal points for an IDR-denominated account, they will have to wait until bug 408444 is fixed; then they can set the account's smallest fraction to 1 to customize it.
Comment 9 Charles Day 2008-08-14 17:41:56 UTC
I have added additional comments to bug 408444 to emphasize bug #1. I think we should track that bug there instead of here. We will continue to track #2 here.
Comment 10 Charles Day 2008-08-15 17:08:08 UTC
Frank Ellenberger's patch committed as r17472. Requesting backport for 2.2.

Thanks very much!
Comment 11 Andreas Köhler 2008-09-17 17:10:21 UTC
Applied to branches/2.2 as r17540 for inclusion in GnuCash 2.2.7.
Thanks a lot!
Comment 12 John Ralls 2018-06-29 22:07:38 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=543061. Please update any external references or bookmarks.