Summary: | Reports show currency-converted values even when asked not to | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Brendon Higgins <brendon> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git (master) | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kmymoney/2c2d932439ac6eac8adbdfabe8598a4887582512 | Version Fixed In: | |
Attachments: | Anonymized budget exhibiting the problem |
Description
Brendon Higgins
2012-04-04 00:03:40 UTC
Could you please attach an anonymous file to reproduce this? Created attachment 70240 [details]
Anonymized budget exhibiting the problem
Anonymized budget attached. After opening, look at the Transactions by Category report. The first entry (306.38) to account A000054, is actually (304.47) in the ledger of that account. This account is in CAD, and the report is supposed to be converting everything to CAD, so there should be no discrepancy. If you customize the report to not convert values to base currency, this erroneous conversion is still applied. Conversion seems to be okay for entries in AUD. I used to use AUD as the base currency, but now it is CAD.
Ok, I think I found the problem. It's using a conversion rate from 5 days before, instead of using the reverse for the same day. (If only Thomas were around to point me to the correct area of the code to fix that.) Now, it shouldn't use any conversion at all when not converting to base currency. I'll keep looking into this. Quick explanation, which may help in the future. First, the transaction are a beast. Now, more to the point. When running a non-base currency report, the individual splits of a transaction were still being converted to the currency of the main split (that gets selected on-the-fly by several criteria). In this case, the main split was the CAD account, over the AUD category, therefore it got converted to CAD. The wrong value is due to what I mentioned before, an old value is being used instead of the same-day reverse one. I've posted a patch that removes that conversion, and adds the display of currency for individual splits. It will have to be reviewed by others before pushing this to master branch. The complexity of those reports has the potential to make it very disruptive, so it will take a while to push it. I want to thank the thorough description of the bug and the attached test file which made it easy to pinpoint the problem and verify the fixes. Git commit 9fc583d3db4fe2c16448790d7ee17145fbe8bd2f by Alvaro Soliverez. Committed on 01/05/2012 at 00:33. Pushed by asoliverez into branch 'master'. Multi-currency transaction reports: each individual should be shown in its own currency, not the one of the main split. Fixed the display of currency for those cases when the currency is different from the base currency. Added test for Transaction by Account report with multiple currencies, contributed by Cristian Onet. There might be some more fixing to do, as it's one of the most complex reports. Related: bug 295533 REVIEW:104774 M +18 -10 kmymoney/reports/querytable.cpp M +79 -0 kmymoney/reports/querytabletest.cpp M +1 -0 kmymoney/reports/querytabletest.h http://commits.kde.org/kmymoney/9fc583d3db4fe2c16448790d7ee17145fbe8bd2f Git commit 2c2d932439ac6eac8adbdfabe8598a4887582512 by Alvaro Soliverez. Committed on 01/05/2012 at 01:10. Pushed by asoliverez into branch 'master'. Price: When a price is not found for the exact date, verify if the reciprocal exists for that date before searching previous dates prices REVIEW:104786 M +28 -4 kmymoney/mymoney/mymoneyfile.cpp http://commits.kde.org/kmymoney/2c2d932439ac6eac8adbdfabe8598a4887582512 |