Bug 361898 - Investment's worth are not displayed in accounts page
Summary: Investment's worth are not displayed in accounts page
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.7.2
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-17 13:28 UTC by lp.allard.1
Modified: 2017-07-01 11:12 UTC (History)
1 user (show)

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


Attachments
anonymized file for testing (25.19 KB, text/xml)
2016-04-24 15:30 UTC, lp.allard.1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lp.allard.1 2016-04-17 13:28:59 UTC
I noticed that investments holding shares (and therefore having a worth) have a "Total Value" of $0.00 in my "Accounts" window while the "Total balance" column is empty for these investments.

That being said, the net worth value displayed at the bottom of the page contains the value of those investments in money and also the section's total (investments) also contains the monetary value of those investments.

Reproducible: Always

Steps to Reproduce:
1. Create a new investment
2. Buy shares at a certain price from a brokerage account
3. In the investment's ledger, the total value is displayed, but in the "Accounts" page, it is $0.00


Expected Results:  
Investment's worth should be displayed like for chequing or savings accounts in the "Accounts" page.

Kmymoney 4.7.2 running on client with Linux Mint 17.3 (Cinnamon desktop)
Remote database server running on Centos 7 64bit with MariaDB (InnoDB)
Comment 1 lp.allard.1 2016-04-24 15:29:40 UTC
I have prepared a small anon file from a brand new KMY file on 4.7.2.  Same problem, the investment balance is displayed as $0.00 unless equity accounts are shown.
Comment 2 lp.allard.1 2016-04-24 15:30:32 UTC
Created attachment 98567 [details]
anonymized file for testing
Comment 3 Thomas Baumgart 2016-05-15 07:30:30 UTC
Git commit f0c8b6fdb2b018b3b0f043f293672fe049b3593b by Thomas Baumgart.
Committed on 15/05/2016 at 07:25.
Pushed by tbaumgart into branch 'master'.

Display total value if equity accounts are hidden

Show the accounts value incl. the value of sub-accounts
 - if the account is not expanded or
 - the account is a top-level account or
 - the account is an investment account and equity accounts are hidden

That last condition was not present before and caused the value of
investments to be shown incorrect in case the display of equity accounts
had been suppressed by the respective setting.

M  +14   -6    kmymoney/widgets/kmymoneyaccounttreeview.cpp

http://commits.kde.org/kmymoney/f0c8b6fdb2b018b3b0f043f293672fe049b3593b
Comment 4 lp.allard.1 2016-05-15 14:36:56 UTC
Will this patch be implemented in KMM 4.7.2 or be part of the next release?
Comment 5 Thomas Baumgart 2016-05-16 06:51:20 UTC
It certainly won't go into 4.7.2 as this is already released. Don't know, if there ever will be a 4.7.3. For sure it will be part of the next (last) KDE4 based version which we want to name 4.8.0. Hopefully, it will also be extracted to the frameworks branch.