Summary: | small deposits entered in foreign currency are wrongly converted to base currency | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Michael Berger <idest> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christian-david, onet.cristian |
Priority: | NOR | ||
Version: | 4.6.4 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kmymoney/f773f22f2685f7ae6e5bbafd461873cdcc08e349 | Version Fixed In: | 4.7.1 |
Sentry Crash Report: |
Description
Michael Berger
2014-05-09 18:22:19 UTC
"Prices are set as follows: 1 IDR = 0,00006212 € 1€ = 16097,87508 IDR deposit IDR 1 returns € 16097,87" this looks like the prices are set 1 € = 0,00006212 IDR and 1 IDR = 16097,87508 € which is the the other way round than you wrote. Hi Christian, thanks for your comments. But no, the prices were definitely not set as you said they might. Prices are set as I had reported: 1€ = 16097,87508 IDR 1IDR = 0,00006212 € If prices were set reversely each of my several reports with all currencies set to the base currency would show garbage - but they don't. Only if I enter deposits of less than 100 IDR garbage is produced. When I delete those small deposits all records show again as they should. And secondly, if prices were set reversely, why is the conversion starting to produce correct results when adding deposits in the magnitude of 100 IDR and higher? (though the precision is still behind) I hope I did not misunderstand your comments!? If so, sorry! Michael On 05/11/2014 12:48 PM, Christian David wrote: > https://bugs.kde.org/show_bug.cgi?id=334564 > > Christian David <christian-david@web.de> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |christian-david@web.de > > --- Comment #1 from Christian David <christian-david@web.de> --- > "Prices are set as follows: > 1 IDR = 0,00006212 € > 1€ = 16097,87508 IDR > > deposit IDR 1 returns € 16097,87" > > this looks like the prices are set > 1 € = 0,00006212 IDR and > 1 IDR = 16097,87508 € > which is the the other way round than you wrote. > How many digits do you have in the price precision setting? That's in KMyMoney Settings > General > Global Then this may help to find the bug. As you said and as we can see, the calculations for 100 IDR and above are correct (100 IDR = 0,006212 € ≈ 0,01 €) . But below, somehow the exchange rate is reversed: 1 IDR = 0,00006212 € ⇒ 1 IDR = 16097,87508 IDR Here is to note that using the correct exchange rate would lead to 0 € ( 10 IDR = 0,0006212 € ≈ 0,00 €). Hi Alvaro, the precision is set to 8 digits On 05/11/2014 02:55 PM, Alvaro Soliverez wrote: > https://bugs.kde.org/show_bug.cgi?id=334564 > > --- Comment #3 from Alvaro Soliverez <asoliverez@kde.org> --- > How many digits do you have in the price precision setting? That's in KMyMoney > Settings > General > Global > Hi Alvaro, Christian, I entered deposits in amounts from 1 IDR to 1000000 IDR and this time observed the results in the Exchange Rate/Price Editor. The resulting figures are - in the mathematical sense - anything else than equicontinuous. Should I furnish you the resulting table? Michael On 05/11/2014 04:26 PM, Michael Berger wrote: > https://bugs.kde.org/show_bug.cgi?id=334564 > > --- Comment #5 from Michael Berger <idest@online.de> --- > Hi Alvaro, > the precision is set to 8 digits > > On 05/11/2014 02:55 PM, Alvaro Soliverez wrote: >> https://bugs.kde.org/show_bug.cgi?id=334564 >> >> --- Comment #3 from Alvaro Soliverez <asoliverez@kde.org> --- >> How many digits do you have in the price precision setting? That's in KMyMoney >> Settings > General > Global >> Please, that will provide us an additional data point to figure out what the problem is. Alvaro, here comes the list. Prices are set: 1 IDR = 0,00006212 € 1 € = 16087,1992 IDR deposit change Exchange rates as shown in Price Editor _IDR to amount IDR = € € = IDR_ *1 16097,87 16097,87 0,00006212 * 2 32195,75 16097,875 0,00006212 3 48293,62 16097,87333 0,00006212 5 80489,37 16097,874 0,00006212 10 160978,75 16097,875 0,00006212 50 804893,75 16097,875 0,00006212 80 1287830,00 16097,875 0,00006212 85 0,01 0,00011764 8500,00 86 0,01 0,00011627 8600,00 88 0,01 0,00011363 8800,00 90 0,01 0,00011111 9000,00 100 0,01 0,00010000 10000,00 110 0,01 0,00009090 11000,00 125 0,01 0,00008000 12500,00 150 0,01 0,00006666 15000,00 200 0,01 0,00005000 20000,00 500 0,03 0,00006000 16666,66... 1000 0,06 0,00006000 16999,66... 2000 0,12 0,00006000 16666,66... 5000 0,31 0,00006200 16129,0322... 10000 0,62 0,00006200 16129,0322... *16087* 1,00 0,00006216 16087,00* 20000 1,24 0,00006200 16129,0322... 50000 3,11 0,00006220 16077,1704... 100000 6,21 0,00006210 16103,0595... 500000 31,06 0,00006212 16097,875... 1000000 62,12 0,00006212 16097,875... * I entered 16087,1992 but the decimal points were truncated Hope that helps! Michael On 05/11/2014 06:08 PM, Alvaro Soliverez wrote: > https://bugs.kde.org/show_bug.cgi?id=334564 > > --- Comment #7 from Alvaro Soliverez <asoliverez@kde.org> --- > Please, that will provide us an additional data point to figure out what the > problem is. > Git commit 7f61ffb728b58bbb905bba87e184e221a7d9858a by Cristian Oneț. Committed on 18/10/2014 at 17:41. Pushed by conet into branch 'master'. Fix the currency conversion dialog for really big/small conversion rates. If the to value was equal to zero when the dialog was constructed a bad (inverse) conversion rate was applied. This code was there since version 1.5 (on CVS) of this file. I don't understand why it was added that way but now it's fixed. Also fixe the prices dialog to display the prices using the configured price precision. Now in case that the value after conversion becomes zero the transaction can't be entered. M +1 -2 kmymoney/dialogs/kcurrencycalculator.cpp M +1 -6 kmymoney/dialogs/kmymoneypricedlg.cpp M +0 -1 kmymoney/dialogs/kmymoneypricedlg.h http://commits.kde.org/kmymoney/7f61ffb728b58bbb905bba87e184e221a7d9858a Git commit f773f22f2685f7ae6e5bbafd461873cdcc08e349 by Cristian Oneț. Committed on 18/10/2014 at 17:41. Pushed by conet into branch '4.7'. Fix the currency conversion dialog for really big/small conversion rates. If the to value was equal to zero when the dialog was constructed a bad (inverse) conversion rate was applied. This code was there since version 1.5 (on CVS) of this file. I don't understand why it was added that way but now it's fixed. Also fixe the prices dialog to display the prices using the configured price precision. Now in case that the value after conversion becomes zero the transaction can't be entered. (cherry picked from commit 7f61ffb728b58bbb905bba87e184e221a7d9858a) M +1 -2 kmymoney/dialogs/kcurrencycalculator.cpp M +1 -6 kmymoney/dialogs/kmymoneypricedlg.cpp M +0 -1 kmymoney/dialogs/kmymoneypricedlg.h http://commits.kde.org/kmymoney/f773f22f2685f7ae6e5bbafd461873cdcc08e349 |