[Kmymoney-devel] Question about two different securities with same symbol

Allan agander93 at gmail.com
Wed Jan 15 10:36:54 UTC 2014


On 15/01/14 00:38, Jack wrote:
> I found some messages from the mailing list related, but none provided a
> solution.
>
> I have a security which is present in two different accounts as two
> different securities, with the same symbol.  In retrospect, I know I
> missed the prompt to use the existing security when creating it the
> second time.  However, because I later noticed what looked like
> duplicate price entries, and deleted them, I now have a consistency
> error about missing prices.
>
> Is there any reasonable way to modify the "smaller" account (the one
> with the fewer transactions and prices for this security) to use the
> other security so I can delete one of them?
>
> I can imagine creating yet another security in the "smaller" account,
> but this time use the other existing security, duplicate all the
> transactions and then delete the old ones.  That sounds  too easy to
> mess up.
>
> I can also imagine editing the KMY file.  Do I just have to find the
> accounts which represents the two securities, and then find all
> transactions pointing the the one I want to delete, and change them to
> point to the other?
>
> Should I just give up and replace the missing price?
>
> Thanks for suggestions.
>
> Jack
>

In the past, I've tended to edit the (backup) file, via search and 
replace on the ACCOUNT currency="Exxxxxx" field, replacing the old id 
with the required one.

It might be as well to look in the Prices section first for both ids, in 
case there might be an issue with the prices, as you might finish up 
with two batches of prices for the one id, unless you edited them all away.

Allan


More information about the KMyMoney-devel mailing list