Bug 415668 - Networth by month shows incorrect values for investment
Summary: Networth by month shows incorrect values for investment
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.0.7
Platform: Other Linux
: NOR grave
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 414246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-29 09:05 UTC by Thomas Baumgart
Modified: 2020-01-25 14:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.8
Sentry Crash Report:


Attachments
Sample file showing the networth by month report error (4.69 KB, text/xml)
2019-12-29 09:05 UTC, Thomas Baumgart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2019-12-29 09:05:47 UTC
Created attachment 124768 [details]
Sample file showing the networth by month report error

SUMMARY
The reported values for an investment differ between the reports. Networth By Year report shows correct values, the numbers provided in Networth By Month are wrong. From the numbers it seems that the number of shares is multiplied twice with the price instead of once.

STEPS TO REPRODUCE
1. Open attached sample file
2. Open Networth by month report
3. Open Networth by year report

OBSERVED RESULT
Values for Portfolio account differ

EXPECTED RESULT
Values for Portfolio account are identical
Comment 1 Thomas Baumgart 2019-12-29 13:39:47 UTC
Looks like I introduced this myself when fixing bug 398982 with https://cgit.kde.org/kmymoney.git/commit/?id=83dd7a0d14b9700ca2632bafb8aba4c522d68685
Comment 2 Thomas Baumgart 2019-12-30 07:48:49 UTC
Git commit c4c0e3c3a0453f806c0fff5de884788c8953bba1 by Thomas Baumgart.
Committed on 30/12/2019 at 07:48.
Pushed by tbaumgart into branch '5.0'.

Avoid duplicate multiplication with price for investments

In non forecast reports, the number of shares of investment accounts was
multiplied twice with the price due to a change made with commit
83dd7a0d.

This change reverts commit 83dd7a0d and fixes the original problem in
the right place.
FIXED-IN: 5.0.8

M  +5    -5    kmymoney/plugins/views/reports/core/pivottable.cpp

https://commits.kde.org/kmymoney/c4c0e3c3a0453f806c0fff5de884788c8953bba1
Comment 3 Thomas Baumgart 2019-12-30 07:49:55 UTC
Git commit f382487fc966383282a704b4f91f8e26c0b20b18 by Thomas Baumgart.
Committed on 30/12/2019 at 07:49.
Pushed by tbaumgart into branch 'master'.

Avoid duplicate multiplication with price for investments

In non forecast reports, the number of shares of investment accounts was
multiplied twice with the price due to a change made with commit
83dd7a0d.

This change reverts commit 83dd7a0d and fixes the original problem in
the right place.
FIXED-IN: 5.0.8
(cherry picked from commit c4c0e3c3a0453f806c0fff5de884788c8953bba1)

M  +5    -5    kmymoney/plugins/views/reports/core/pivottable.cpp

https://commits.kde.org/kmymoney/f382487fc966383282a704b4f91f8e26c0b20b18
Comment 4 Thomas Baumgart 2020-01-25 14:47:11 UTC
*** Bug 414246 has been marked as a duplicate of this bug. ***