Yesterday I migrated from Kubuntu 16.04 (KMymoney 4.8.2) to Kubuntu 18.04 (Kmymoney 5.0.2?). I used my already filled datebase and at first looks every thing looks OK. However on the forecast screens and reports the Opening Balance is mingled. For the Debts the signs(+ and -) for the amounts got switched. On Liable side amounts for Investment-accounts are wrong. I cannot explain the amounts on the Investment-accounts.
STEPS TO REPRODUCE
1. Migrate with an existing database from Kmymoney 4.8.2 to Kmymoney 5.0.1 in Kubuntu.
2. Open the Reports and select one of the forecast reports.
3. You see the mentioned errors in the column Opening Balances, the errors also show in the nett worth forecast on the startscreen in Kmymoney
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
Created attachment 115430 [details]
Example of wrong opening balances (manipulated because of privacy)
Created attachment 121480 [details]
Report on equity forecast
I can still see the wrong forecast behavior in Kmm 5.0.5. It is the same on the Overview page, as well as in the reports. The problem is that in the opening the number of shares is not converted into their value, while it is converted into their value for the forecasted days.
Created attachment 122961 [details]
patch for bug
I looked a bit into the code and came up with the attached patch. It works for me, but I must say that this is my first patch for any kde application, so please don't blame me for not following any guidlines. I hope it helps.
I found out that there is still a problem with liability accounts which are added with the wrong sign in the opening Balance. Actually, what date should the opening balance hold? Should it be really shown in the forecase?
Created attachment 122984 [details]
new patch for bug
I further investigated the problem with the wrong sign of the liabilities, and came up with another patch, which fixes also this problem.
Changing the sign breaks a testcase. Did you run 'make test'? BTW, I just verified that the testcase is correct. Running 'make test' produces 'bin/report-03.csv' which shows the data.
The opening balance is constructed by 3 transactions
- a withdrawal from the checking account at 14.00
- a withdrawal from the credit card at 88.01
- a withdrawal from the credit card at 133.22
Remember, that the balance of liabilities is shown with reverse sign in reports.
Created attachment 123033 [details]
a new version of the patch
No, I did not know about "make test" and how to use it. So now I changed my patch in that it only changes sign of liabilities for the forecast. This does not break the testcase. I have the impression that there is something funny going on with the liabilities in the forecast, but at least my patch seems to work. What do you think?
Git commit 83dd7a0d14b9700ca2632bafb8aba4c522d68685 by Thomas Baumgart.
Committed on 06/10/2019 at 16:52.
Pushed by tbaumgart into branch '5.0'.
Show value of opening balance for investments
The current implementation did only show the number of shares which
needs to be multiplied by the price to gain the value.
M +5 -0 kmymoney/plugins/views/reports/core/pivottable.cpp
*** Bug 414075 has been marked as a duplicate of this bug. ***