GNOME Bugzilla – Bug 432764
Price Editor: Don't round prices
Last modified: 2018-06-29 21:33:47 UTC
Please describe the problem: It seems, we have 2 different calculations of exchange rates for journal and account ( first read below, then continue here In 2.0.5: booking by journal opens exchange dialogue. After entering the bookings Price database shows "0+1000003/6000000" editing here seems to have no effect, but reopening it is changed to "0.016667") Steps to reproduce: 1. open a new file 2. create 2 accounts: cash_EU(EUR), cash_IN(INR) 3. put EUR 1000,00 in cash_EU 4. book the money from cash_EU to cash_IN with exchange rate 60 INR = 1 EUR N.B. usualy I work in journal Actual results: in Journal I see EUR 1000,00, in Accounts I see EUR 1000,02 (I did not call financequote and also see only my manually entered exchange rate in price editor) Expected results: same amounts in both views, preferrable the 1000.00 EUR, which were entered Does this happen every time? 2.1.0 svn r15986 2.0.5 r15617 opening has the same view " creating also Other information: As I remember right in 1.8 the price editor stored expression, may be in sometimes a little strange form like "0 + 1 / 60". Now, the price editor seems to calculate a decimal "0.016667" this format seems to be to short for precise calculations.
As stated on IRC this might be the same bug as bug#406127
I don't think this is related to bug 406127; that bug has to do with calculations using commodity SCU vs. account SCU. This is a problem with the price editor: if you "edit" a price using the price editor and click OK, the price gets rounded to 6 digits. This is the same cause as bug 309863 and bug 502017.
A fix has been committed in r17421 and r17429. Requesting backport for 2.2. Until then, a workaround is to not press "OK" in the Price Editor if you don't intend to change the price.
*** Bug 502017 has been marked as a duplicate of this bug. ***
After a new price editing, I get the wonderful result of "1/60" and the difference in the accounts page is gone. Thanks for the good work! But something else seems now broken. I have problems, to enter a new transaction. I tried the following starting from 1. cash account 2. G/L 3. cash-ID Result of 1 and 2: When I move EUR 500 from cash to Cash-ID with a rate of 1 EUR = 12500 IDR, cash shows a transaction of 500, while Cash-ID shows a transaction with no visible values, which seems to mean zero. On the accounts page then I have a imbalance of EUR 500. I assume, the following is happening: I credit cash by EUR 500. Gnucash defaults a debit of 500 in the next line. I select cash-ID and enter the exchange rate. GC compares the total of debit with credit, both have the same amount => OK [Here it seems to ignore the currencies] I close the transaction. GC tries to store in cash-ID IDR 500 instead of 500*12500. This would be a value of EUR 0,04 but IDR has no paise [1/100] as INR has => The amount is rounded to 0 => my EUR 500 end in smoke. No, my assumption is wrong: also the amount of 50000 disappears. Result of 3: Cash-ID debit 500*12500 -> 625000 credit defaults to 6250000 when selecting cash, no transfer-window pops up after finishing the transaction, cash shows a really big deficit editing again, change exchange rate, enter debit amount 12500 displays negative results (user confused), but the absolut values are OK. confirm and close TXN accounts page shows: Present, Total: "IDR 6250000" Present EUR, Total (EUR): "EUR" Price editor has an record with no price, instead the rate were credited to cash. Funny!
OOps! Sorry, now _I_ was really confused about amount and rate. Ok, I deleted and entered the transaction again in cash_id. on cash_EUR I called edit exchange, entered the rate of 12500, OK. tabbing over the end of the line the Transfer window pops up again with rate 0, I enter 12500 again. after closing txn, cash-ID shows IDR 6250000/EUR- in the account page Cash has a record with empty amounts. Price editor has a record with empty price. N.B. I have the impression, tabbing to the next line opens the transfer window, while entering does not.
Correction: Comment #6 line 3 should read: on cash-ID ... About N.B.: While tabbing through a new txn, the transfer window really pops up twice - once for each direction of exchange - while Enter only ask once.
Could you open a new bug for this? It seems like a separate problem.
To be continued ... in http://bugzilla.gnome.org/show_bug.cgi?id=547335
(In reply to comment #3) > A fix has been committed in r17421 and r17429. Requesting backport for 2.2. Applied to branches/2.2 in r17511 and r17512. Thanks a lot!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=432764. Please update any external references or bookmarks.