Bug 340158 - Some discrepancies between stocks displayed in Ledgers and on Institutions screen
Summary: Some discrepancies between stocks displayed in Ledgers and on Institutions sc...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.7.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL: http://i.imgur.com/4TDHsS2.png
Keywords:
: 349325 378073 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-20 13:33 UTC by Nick Elliott
Modified: 2018-03-28 08:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Elliott 2014-10-20 13:33:05 UTC
I have an investment account called 'Shares' which belongs to an Institution called 'Stocks and Shares'.

The ledger for 'Shares' contains shareholdings (Stocks) in 5 different companies.

However on the 'Institutions' screen only 3 of the stocks are listed in the 'Shares' account and the other 2 are listed directly under 'Stock and Shares' (see URL attachment).

This has happened to one other of my Institutions/Investment accounts, many others are displayed correctly.

Reproducible: Always

Steps to Reproduce:
1. Upgrade from version 4.6.6 to 4.7.0
2.
3.


Expected Results:  
In KMyMoney 4.6.6 all 5 shares correctly appeared under the Shares account which meant that the correct total value of the account was displayed on screen.
Comment 1 Cristian Oneț 2014-10-20 13:41:23 UTC
Could it be that the two missing stocks don't belong to that institution? If you expand all items under which institution do the missing stocks appear?
Comment 2 Nick Elliott 2014-10-20 14:06:33 UTC
The stocks are not missing - they appear under the "Stocks and Shares" institution (to which they belong). See the image I've provided in the bug report URL.

Notice that the 2 stocks 'Lloyds Banking...' and 'Schneider...' are listed at the same level as the 'Shares' account when they should be listed under it. (So should the deleted holding in 'Friends Provident').

In all other parts of KMyMoney the hierarchy is correct:

'Stock and Shares' institution ---> 'Shares' account ---> individual stocks

It's only on the Investments screen that this information is displayed incorrectly.
Comment 3 Cristian Oneț 2014-10-20 15:11:40 UTC
The only way I can see this happening is if MyMoneyFile::accountList contains the child accounts in the list before their parent account. Thomas, is that possible?
Comment 4 Nick Elliott 2014-10-21 08:03:02 UTC
Perhaps this is a consequence of the code being tidied up in 4.7.0 as it did not happen in previous versions of KMyMoney.
Comment 5 NSLW 2017-04-02 05:34:51 UTC
Could you provide your .kmy file?

(In reply to Nick Elliott from comment #0)
> I have an investment account called 'Shares' which belongs to an Institution
> called 'Stocks and Shares'.
> 
> The ledger for 'Shares' contains shareholdings (Stocks) in 5 different
> companies.
> 
> However on the 'Institutions' screen only 3 of the stocks are listed in the
> 'Shares' account and the other 2 are listed directly under 'Stock and
> Shares' (see URL attachment).
> 
> This has happened to one other of my Institutions/Investment accounts, many
> others are displayed correctly.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Upgrade from version 4.6.6 to 4.7.0
> 2.
> 3.
> 
> 
> Expected Results:  
> In KMyMoney 4.6.6 all 5 shares correctly appeared under the Shares account
> which meant that the correct total value of the account was displayed on
> screen.
Comment 6 NSLW 2017-04-15 13:11:30 UTC
Git commit 62faad4adf84ea5e879f4c098a210ebef48521bf by Łukasz Wojniłowicz.
Committed on 15/04/2017 at 12:59.
Pushed by wojnilowicz into branch 'master'.

Show/Hide zero-balance equities in account models
FIXED-IN:5.0

Differential Revision: https://phabricator.kde.org/D5341

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

M  +28   -0    kmymoney/dialogs/settings/ksettingsgeneral.cpp
M  +4    -1    kmymoney/dialogs/settings/ksettingsgeneral.h
M  +1    -0    kmymoney/dialogs/settings/ksettingskmymoney.cpp
M  +23   -8    kmymoney/models/accountsmodel.cpp

https://commits.kde.org/kmymoney/62faad4adf84ea5e879f4c098a210ebef48521bf
Comment 7 NSLW 2017-05-01 05:40:29 UTC
*** Bug 349325 has been marked as a duplicate of this bug. ***
Comment 8 NSLW 2017-05-02 05:29:36 UTC
*** Bug 378073 has been marked as a duplicate of this bug. ***