Bug 431300 - Equity records
Summary: Equity records
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: database (show other bugs)
Version: 4.8.0
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-08 11:19 UTC by Nick
Modified: 2022-09-26 21:49 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 Nick 2021-01-08 11:19:23 UTC
SUMMARY
Why do we have to create new equity records for the same equity, in a different investment account?

For example : I have 2 investment accounts, a Share account, and a Pension account, and I have shares in Royal Dutch Shell in the Share account already.

If I then buy exactly the same RDS company shares for my Pension account, I have to create a new Equity record.

In my KMyMoney system I manage accounts for myself, my wife and our 2 children, often having the same equities in those accounts.  This has resulted in me having multiple identical Equity records (obviously with different quantities), in various investment accounts.

Surely at the database level, the Equity to Account relationship should be a many-to-many one, i.e an account can hold many equities and an equity can appear on many accounts.

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

ADDITIONAL INFORMATION
Comment 1 Jack 2021-01-08 21:36:42 UTC
This site is for reporting bugs, not requesting help.  Please see https://kmymoney.org/support.html for info on getting help from the mailing list, forum, or IRC.

For your question, you do NOT have to create new equity accounts for use of the same security in multiple investment accounts.  Please see the Handbook at https://docs.kde.org/stable5/en/extragear-office/kmymoney/details.investments.securities.html#details.investments.reuse for how to do this.

Given that this is discussed more than rarely, I am changing some of the fields of this bug to make it a wishlist:  When the new equity wizard is run, KMM should check for whether it already exists in all cases, not only if all fields except for the Trading Symbol are blank.  However, I'm not sure what the proper behavior would be if any of those other fields do not match the existing equity.  I suppose the user could be prompted with a popup showing the differences, with actions of 1) use the existing values here, 2) create a new equity with these values, 3) use the existing equity with these new values, or 4) re-edit the values and check again (which would repeat this popup based on the new values, and 5) cancel.
Comment 2 Jack 2022-09-26 21:49:39 UTC
Reading my reply now, I realize it wasn't complete accurate in describing things.  I apologize for that.
Part of the issue is a potential confusion with terminology.  Any ownership of a stock (or mutual fund) requires a SECURITY to exist.  
That contains the basic information about the stock, such as trading symbol, exchange, and source of online quotes.  Then, for each Investment Account which owns any of that Security, there does need to be an EQUITY account.  That is used to keep the shares owned in that Investment Account separate from shares owned in any other Investment account.  One example of the need for this is that the two investment accounts may have different currencies, even if that is not a common occurrence.
As you point out, there are some problems with this specific implementation - there is a danger of creating a new SECURITY when adding an EQUITY to an Investment account.  Bug 443566 is specifically about making this easier, and less prone to error.  The current way also duplicates some information about the stock, which can lead to confusion.
The development team is about to start reviewing all open bugs about Investments, and hopefully some of them will be addressed in the coming months.  As developer resources are scarce, there is no timetable for this.  The process of adding a Security to an Investment Account will certainly be considered, as will whether a separate Equity Account per Investment Account is really necessary.  I think it's fair to say that the goals are increased functionality with decreased chances for errors and confusion, but anything which requires major changes to the underlying data structures may end up further deferred.