I'm using kmymoney for mac os x - version: 4.7.2 When I view my income/expence report, with everything converted to £ (my default currency), I see that I have some errors. Specifically I have one category with two transactions in it. One is a refund, and so the exchange rate was maintained for this transaction (i.e. within the transaction I have used the same value for £ and for €). When I look at the report, this category is not zero - i.e. the exchange rate applied for that conversion appears to be different to the ones in the transactions. So: Steps to reproduce. 1. Create account in £ 2. Create Category in € 3. Create transaction on day 1, between account and category. Set exchange rate, and verify totals. 4. Create transaction on day 2, between account and category. Set exchange rate and verify totals. 5. Create other transactions between other accounts and other categories that may also define the exchange rates for day1 and day2. 6. look at income and expense by month, and note that although the total for the category is 0 in the leger view, it is not 0 in the transaction view.
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