Bug 450927

Summary: Equities with zero balance option does not work
Product: [Applications] kmymoney Reporter: Hamdsa <hamdsa>
Component: generalAssignee: Hamdsa <hamdsa>
Status: RESOLVED FIXED    
Severity: critical CC: ralf.habacker
Priority: NOR    
Version: 5.1.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.0
Sentry Crash Report:
Attachments: Dashboard Screenshot

Description Hamdsa 2022-02-27 14:39:31 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
Toggling the 'Do now show equities with zero balance' does not work, all equities, including zero balance continue to show in the home dashboard screen

STEPS TO REPRODUCE
1. Settings | Configure KMyMoney | Do not show equities with zero balance
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2022-02-27 15:42:56 UTC
Where do you see equity accounts on the home dashboard? Can you attach a screenshot here, please?
Comment 2 Hamdsa 2022-02-27 16:19:30 UTC
Created attachment 147173 [details]
Dashboard Screenshot

Please see the screenshot attached. This list include all equities and investments that were ever traded and it's one long list, with majority of them zero balances, with no option to 'hide' them. I have to scroll all the way down to see anything else on the home dashboard.
Comment 3 Jack 2022-02-27 16:37:17 UTC
Which section of the Home  Page is this?  I do not see any equity accounts at all on my Home Page.  Also, it might not matter, but are these accounts open or closed?
Comment 4 Thomas Baumgart 2022-02-28 07:12:34 UTC
To me it looks like the Asset and Liability section with a lot of columns disabled (via settings). 

In addition to Jack's questions: What type of account are these? I doubt that these are equity accounts but can think of them being investment accounts. Equity accounts are always sub-accounts of investment accounts.

And a probably unrelated question:  why do you have the same (investment) account name multiple times?
Comment 5 Bug Janitor Service 2022-03-15 04:35:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Bug Janitor Service 2022-03-30 04:35:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 7 Hamdsa 2022-03-30 10:04:47 UTC
(In reply to Jack from comment #3)
> Which section of the Home  Page is this?  I do not see any equity accounts
> at all on my Home Page.  Also, it might not matter, but are these accounts
> open or closed?

It's from the homepage section, all listed under Asset Accounts
To clarify I was referring to them as 'equity' accounts as they were for individual equities (stocks etc.), but technically they are all investment accounts, sorry for the confusion, my mistake.
Comment 8 Hamdsa 2022-03-30 10:11:12 UTC
(In reply to Thomas Baumgart from comment #4)
> To me it looks like the Asset and Liability section with a lot of columns
> disabled (via settings). 
> 
> In addition to Jack's questions: What type of account are these? I doubt
> that these are equity accounts but can think of them being investment
> accounts. Equity accounts are always sub-accounts of investment accounts.
> 
> And a probably unrelated question:  why do you have the same (investment)
> account name multiple times?

You are right, they are investment accounts
I did not create the same accounts multiple times. had imported the data from GNUcash, but I believe it works the same way as it does in GNUCash i.e. if you trade the same investment in multiple brokerage accounts, it creates a separate investment account under each of those brokerage account, rather than using a single reference investment account (Quicken handles it differently), probably the result of a double accounting as each 'account' probably needs to be 'unique', just my guess.
There is no option to 'close' or hide these accounts per se so my home page shows every investment ever traded in my file, with most of them zero balances.
Comment 9 Thomas Baumgart 2022-07-01 07:58:01 UTC
Git commit b17daebdca0c0611e1f54659ae06a5a47a60ea90 by Thomas Baumgart.
Committed on 01/07/2022 at 07:43.
Pushed by tbaumgart into branch 'master'.

Improve closing investment accounts

One needed to close all security accounts first before one could close
the parent investment account. This change improves the process so that
an investment account can be closed with all sub-ordinate security
accounts in one go if the conditions to close an account apply to all
accounts to be closed (balance equal to zero, not referenced in
schedules, ...)

M  +29   -0    kmymoney/mymoney/mymoneyfile.cpp
M  +9    -2    kmymoney/views/kaccountsview.cpp
M  +34   -14   kmymoney/views/kaccountsview_p.h

https://invent.kde.org/office/kmymoney/commit/b17daebdca0c0611e1f54659ae06a5a47a60ea90
Comment 10 Thomas Baumgart 2022-07-01 07:58:25 UTC
Git commit 7999c11a4e1dfcd1459ca7c9adcdecb3dd037150 by Thomas Baumgart.
Committed on 01/07/2022 at 07:57.
Pushed by tbaumgart into branch '5.1'.

Improve closing investment accounts

One needed to close all security accounts first before one could close
the parent investment account. This change improves the process so that
an investment account can be closed with all sub-ordinate security
accounts in one go if the conditions to close an account apply to all
accounts to be closed (balance equal to zero, not referenced in
schedules, ...)
(cherry picked from commit b17daebdca0c0611e1f54659ae06a5a47a60ea90)

M  +29   -0    kmymoney/mymoney/mymoneyfile.cpp
M  +15   -3    kmymoney/views/kaccountsview.cpp
M  +38   -18   kmymoney/views/kaccountsview_p.h

https://invent.kde.org/office/kmymoney/commit/7999c11a4e1dfcd1459ca7c9adcdecb3dd037150
Comment 11 Thomas Baumgart 2023-02-05 13:40:30 UTC
No negative feedback since improvement. I'll close it again.