Bug 429710 - Capital gains report issue when account closed
Summary: Capital gains report issue when account closed
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-27 07:21 UTC by stephanesp
Modified: 2020-11-29 08:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stephanesp 2020-11-27 07:21:05 UTC
SUMMARY

When closing a dealing account and the shares within it, the shares do not appear in the capital gains report anymore. However, if I leave them open, the price update keeps updating their price (even if those are, for instance, all funds that no longer exist). They should appear, at least in the "by type" capital gains report

STEPS TO REPRODUCE
1. Open two dealing accounts A & B
2. Buy and sell shares of the same stock in both
3. Sell all in account A
4. Close account A
5. Run capital gains report by type

OBSERVED RESULT
Gains are only calculated on trades in account B (All benefits/losses made in account A are ignored)

EXPECTED RESULT
Include all trades when calculating capital gains

SOFTWARE/OS VERSIONS
Linux Ubuntu 20.10

ADDITIONAL INFORMATION
Comment 1 Jack 2020-11-28 22:03:02 UTC
I think the report is working as designed.  Closing an account says you are no longer interested in it.  If you want the capital gains of a final sale of shares to be included in a report, you need to leave the account open.  If reports included closed accounts, they would either end up excessively crowded, or you would have to explicitly exclude all the closed accounts (at least all except the one you did want included.)

You might turn this into a "wishlist" to add a configuration item to reports to allow inclusion of closed accounts, but given the workaround is so easy, I don't know if it matters.
Comment 2 stephanesp 2020-11-29 08:22:28 UTC
In the case of dealing accounts, if I leave the stocks as open to have the gains/losses in the "by type" report, their price is updated each time an "update stocks & currency prices" is run", which takes a long time.

Also, if I leave the old dealing account open and have the same stock in another dealing account (e.g. different bank), the stock appears twice in the "by type" report. I agree it should appear twice in the "by account" report but I am not sure it should in the "by type". At the moment, it seems to be done at the equity x account level; should it not be at the security level ?