New problem (master) stock sell showing up as payment

Thomas Baumgart thb at net-bembel.de
Wed Aug 3 07:03:14 BST 2022


Jack,

On Mittwoch, 3. August 2022 01:40:50 CEST Jack via KMyMoney-devel wrote:

> I just looked at on of my investment account to reconcile the new  
> statement, and the brokerage account has a large negative balance.   
> Without doing a full audit, it appears that two stock sell transactions  
> (for the same security) last month are showing up in the brokerage  
> account as Payments instead of Deposits.  I'm know I did a proper  
> reconciliation last month, but now those numbers don't match.  I have  
> not yet gone through all my saved copies to see when it changed, but  
> that's next on my list.
> 
> Just in case anyone has any ideas, one of the transactions is below.   
> I've trimmed the memo of lots of excess details Merrill Lynch includes,  
> and I trimmed the bankid.
> 
>    <TRANSACTION commodity="USD" entrydate="2022-07-02"  
> id="T000000000000025879" memo="Sale: PUTNAM ULTRA SHORT DURATION INCOME  
> FD..." postdate="2022-06-15">
>     <SPLITS>
>      <SPLIT account="A000345" action="" bankid="" id="S0001"  
> memo="Sale: PUTNAM ULTRA SHORT DURATION INCOME FD..." number=""  
> payee="" price="1/1" reconciledate="2022-06-30" reconcileflag="2"  
> shares="-55723/50" value="-55723/50"/>
>      <SPLIT account="A000941" action="Buy" bankid="ID 20220614..."  
> id="S0002" memo="Sale: PUTNAM ULTRA SHORT DURATION INCOME FD..."  
> number="" payee="" price="-10/1" reconciledate="2022-06-30"  
> reconcileflag="2" shares="-55723/500" value="55723/50"/>
>     </SPLITS>
>    </TRANSACTION>
> 
> Account 345 is the brokerage account and 941 is the stock account  
> within the investment account.

Looks like

  shares="-55723/500" value="55723/50"

is probably the source of the problem. That is simply wrong and may be 
caused by some bug. Somewhere, the split of the brokerage account (S0001)
is created based on the value part of the security split (S0002) by
simply inverting the value. Since value in S0001 has the wrong sign
you see those results. It could well be that this is still a problem
within the investment transaction editor (which is the new kid on
the block here).

> One thing which caught my eye is that the split for the security has  
> 'action="Buy"' which worried me more before I noticed that it has that  
> value for lots of transactions other then stock sales.  Might that be  
> an issue, or is it likely a red herring?

Within the XML file, the action string is always presented as "buy"
and the sign of the split controls if it is actually a buy or a sell
operation. The conversions happen in MyMoneySplit::investmentTransactionType
and MyMoneySplit::setAction. So that is not a problem. 

> I'll post more when I have a tighter window on when the problem started.

Did you enter the transactions manually or did you import them and edited
them afterwards?

-- 

Regards

Thomas Baumgart

https://www.signal.org/       Signal, the better WhatsApp
-------------------------------------------------------------
Why do programmers wear glasses?
Cause they don't C#.
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 868 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20220803/1c815614/attachment.sig>


More information about the KMyMoney-devel mailing list