[kmymoney] [Bug 414246] New: Net Worth Report includes share value twice

Christoph Roick bugzilla_noreply at kde.org
Sun Nov 17 23:07:10 GMT 2019


https://bugs.kde.org/show_bug.cgi?id=414246

            Bug ID: 414246
           Summary: Net Worth Report includes share value twice
           Product: kmymoney
           Version: git (master)
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: reports
          Assignee: kmymoney-devel at kde.org
          Reporter: chrisito at gmx.de
  Target Milestone: ---

The fix for BUG 398982 where the opening balance in the forecast was corrected,
results in a regression in the reports.
In the reports the calculated account value already includes the share value
and therefore the fix multiplies the share value a second time.

I can obtain the desired behavior by applying this patch:

diff --git a/kmymoney/plugins/views/reports/core/pivottable.cpp
b/kmymoney/plugins/views/reports/core/pivottable.cpp
index c0d8517ed..c0f73a10f 100644
--- a/kmymoney/plugins/views/reports/core/pivottable.cpp
+++ b/kmymoney/plugins/views/reports/core/pivottable.cpp
@@ -697,7 +697,7 @@ void PivotTable::calculateOpeningBalances()
         }
       }

-      if (account.isInvest()) {
+      if (account.isInvest() and m_config.isIncludingForecast()) {
         // calculate value of shares
         value *= account.deepCurrencyPrice(from.addDays(-1));
       }


but I do not consider it a real fix, since to me it doesn't seem to be a
reliable distinction of cases nor did I try to understand how the account value
is obtained in the first place.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list