Bug 280368

Summary: Investment Holdings by Account shows previously sold stock with zero Shares and zero Amount
Product: [Applications] kmymoney Reporter: Alvaro Soliverez <asoliverez>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alvaro Soliverez 2011-08-18 17:24:37 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

Bug:

The report Investment Holdings by Account shows previously sold stock with zero Shares and zero Amount.
When you customize the date range to Today, the problem persists.  The OS is Ubuntu 11.04.

Recommendation:

Investors do NOT want to see reports cluttered with past positions.  Please make this the default behaviour in a near future release.

Reproducible: Always

Steps to Reproduce:
Run the report


Expected Results:  
Empty stock should not be shown
Comment 1 Alvaro Soliverez 2011-08-18 17:25:24 UTC
Posted this on behalf of Peter Zay.

To me, it looks like the stocks are not really zero. Peter, please post an anonymous file to debug this further.
Comment 2 David Houlden 2011-08-18 18:08:40 UTC
I can confirm this problem. The report entries go away if you close the account for the stock after they have all been sold.
Comment 3 Alvaro Soliverez 2011-08-24 03:42:40 UTC
Ok, I found the problem. If it's not in expert mode, it will not allow you to select the individual stocks for the report.

I'll add a purge of the accounts with zero balance and no transaction for the timeframe of the report, but it will have a small impact on performance.

I'll be posting a reviewrequest shortly.
Comment 4 Alvaro Soliverez 2011-08-31 02:48:59 UTC
SVN commit 1250384 by asoliverez:

Check investment-only reports and only add subaccounts if the balance is non-zero or there are related transactions.

BUG:280368
REVIEW:6779

 M  +67 -8     listtable.cpp  
 M  +3 -1      listtable.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1250384