Bug 451921 - Capital gains report should allow including closed accounts
Summary: Capital gains report should allow including closed accounts
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.1.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-26 08:59 UTC by zoltan1980
Modified: 2022-03-26 11:30 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 zoltan1980 2022-03-26 08:59:52 UTC
SUMMARY

For tax calculation purposes, it is useful to generate a report about capital gains realized in the previous year. However, by that time, the affected accounts could be closed. The capital gains from those closed accounts are still relevant though and should be included in the report. Currently they are omitted, even when the "show all accounts" setting is enabled in the view menu. I would suggest adapting one of the following behaviors:
- Respect the "show all accounts" setting of the view menu. (Personally I don't like this option too much, because it still makes it easy to accidentally omit closed accounts, but it at least makes it possible to include them.)
- Have a separate setting in the report configuration that allows including closed accounts and make it default to yes.
- Include closed accounts in the capital gains report unconditionally. (For unrealized capital gains there won't be anything to include from closed accounts and for realized gains it makes sense to include closed accounts.)

STEPS TO REPRODUCE
1. Create a pair of investment transactions that produces capital gain.
2. Close the account.
3. Generate a report of realized capital gains.

OBSERVED RESULT

Capital gains are not shown for the closed account.

EXPECTED RESULT

Capital gains should be shown for the closed account.

ADDITIONAL INFORMATION

Thanks for the great software! :)
Comment 1 zoltan1980 2022-03-26 11:23:26 UTC
I just noticed that "Realized Capital Gains" is just the name that I gave to the report, kmymoney just calls it a Capital Gains report with the "Sum investements" setting set to "Only sold". Apart from the different naming convention, it is a realized capital gains report in essence.

I also noticed that there already is a bug report about this behavior with the number 429710. However, in that bug the OP is asked to open a wishlist item instead, and this ticket is exactly that, so it's not an exact duplicate. Additionally, I think this report provides more details on the motivation for the desired behavior. Still, after reading the concerns against 429710, I would like to elaborate a bit more on why closed accounts should be included in my opinion.

1. If we approach the problem from the point of view of the "closed account" functionality, I would argue that users are expected to close an account once they close the corresponding "real" account at a financial institution and thus can no longer do transactions in it. As for the purpose of this function, I would say that it serves to reduce the clutter in the various account lists. However, hiding such accounts only makes sense when the associated information is irrelevant. This applies to ledger selection because it is not possible to do transactions and also applies to "snapshot" reports, because the account value is 0. However, it does not apply to historical reports, where closed accounts have a significant role.

2. If approaching the problem from the "Show all accounts" functionality, it shows closed accounts in the account selectors and allows opening their ledgers. I would argue that it should also apply to reports as I see no reason for why it shouldn't but I see several for why I should (see points 1 and 3).

3. Finally, if we approach from the use case - generating a realized capital gains report for tax purposes - it definitely makes sense to include these transactions, and this holds true irrespective of the first two bullet points. In fact, it is even misleading and dangerous to hide them, because if one were to solely rely on such a report for calculating taxes without noticing the omission of closed accounts, they would file their taxes wrong.
Comment 2 zoltan1980 2022-03-26 11:30:01 UTC
One more thing I forgot to mention: To reduce clutter in reports, I think closed account could still be hidden if they were closed throughout the whole period covered by the report (i.e., the got closed before the start of the reporting period). In this case it truely does not make too much sense to show them as they could not play any role in the results, thus can be safely omitted.