Summary: | Incorrect rates used during a report | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Will Holland <will> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mark, ralf.habacker |
Priority: | NOR | ||
Version: | 4.7.2 | ||
Target Milestone: | --- | ||
Platform: | macOS (DMG) | ||
OS: | macOS | ||
Latest Commit: | https://commits.kde.org/kmymoney/622dab3f94878c501518795aa00c102d10562a1a | Version Fixed In: | 5.0.0 |
Sentry Crash Report: | |||
Attachments: | GBP Account and EUR Category example to reproduce bug |
Description
Will Holland
2016-12-20 16:10:57 UTC
Created attachment 102979 [details]
GBP Account and EUR Category example to reproduce bug
I reproduced this on 4.8.0 (Ubuntu) so 4.7.2 (OSX) behaviour may be different. Using the attached file, it can be seen that the ledger view is correct but the "Transactions by Month" report is converting the 80 EUR transaction to 120 GBP using the incorrect exchange rate on 20/12/2016. It is using the GBP/EUR exchange rate entered for the second transaction (300GBP=200EUR) instead of the rate entered for the first transaction (100GBP=80EUR).
All the reports appear to be doing a forex rate lookup based on the post date of the transaction rather than the actual rate used. From looking at the generated XML, the correct forex rate is stored in the split transaction (rate = shares / value) but any fix would be complicated by the fact that this rate may have nothing to do with the currently set base currency. One would presumably have to look at the currency of the account on other side of the split and if it is the same as the base currency then the (shares/value) can be used as the forex rate for reporting. Git commit 622dab3f94878c501518795aa00c102d10562a1a by Łukasz Wojniłowicz. Committed on 17/02/2017 at 20:15. Pushed by wojnilowicz into branch 'master'. Revise investment transaction report Summary: Price of transaction should be taken from transaction and not from stored prices. Investment accounts should report asset split as main split for correct amount value, as it contains fees. Related: bug 365306 Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> Differential Revision: https://phabricator.kde.org/D4445 Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> M +99 -45 kmymoney/reports/querytable.cpp M +7 -7 kmymoney/reports/tests/querytable-test.cpp M +1 -1 kmymoney/reports/tests/reportstestcommon.cpp https://commits.kde.org/kmymoney/622dab3f94878c501518795aa00c102d10562a1a |