Bug 312650 - Cannot update quantity of stocks in Investments screen
Summary: Cannot update quantity of stocks in Investments screen
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.2
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 04:46 UTC by vin
Modified: 2013-01-06 22:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A KMyMoney XML with some screenshots showing the prblem. (241.85 KB, application/zip)
2013-01-05 21:41 UTC, vin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vin 2013-01-05 04:46:14 UTC
After syncing with my brokerage account, some of the stock positions were downloaded with quantity 0.00. There's no way update or change that value in the software. Same with manually created investment positions - created with quantity 0.00 and no way to change the value. No documentation on that field in the help system.

Reproducible: Always

Steps to Reproduce:
1. Create an investment account
2. In "Investments" screen create a new investment
3. Update quantity to other than 0
Actual Results:  
Can update quantity to other than 0

Expected Results:  
Nowhere to change the quantity value.
Comment 1 David Houlden 2013-01-05 10:37:14 UTC
I think you have to change the quantity in the ledger not the investment screen. Can you edit the ledger entries?
Comment 2 vin 2013-01-05 10:39:35 UTC
There are no ledger entries.
Comment 3 David Houlden 2013-01-05 10:55:43 UTC
OK. Can you enter a buy transaction or an add shares transaction to get the quantity you want?
Comment 4 vin 2013-01-05 19:11:16 UTC
(In reply to comment #3)
> OK. Can you enter a buy transaction or an add shares transaction to get the
> quantity you want?

Yes, it appears that I can. I imported them directly from the brokerage and it seems like the import is somewhat problematic. I would expect to have an option to fix that, but I guess I'll have to give up the auto-download feature for this account.
Comment 5 vin 2013-01-05 20:33:21 UTC
Changing to normal priority as a workaround has been suggested, would love to have a more trivial solution implemented however.
Comment 6 David Houlden 2013-01-05 20:47:00 UTC
Without further information it is difficult to say if this is a KMyMoney import problem or a problem with the data provided by your brokerage. Was it an OFX direct download or a CSV or QIF file?  Do you have an example of the data which you could provide? After removing / ediiting any personal data of course.
Comment 7 vin 2013-01-05 21:01:47 UTC
(In reply to comment #6)
> Without further information it is difficult to say if this is a KMyMoney
> import problem or a problem with the data provided by your brokerage. Was it
> an OFX direct download or a CSV or QIF file?  Do you have an example of the
> data which you could provide? After removing / ediiting any personal data of
> course.

Its a OFX direct download, and undoubtedly the problem is somewhere with the download: some positions were downloaded with quantity OK, others with negative quantity (although its not a short position, don't know why it appeared as a negative value), and some with quantity=0.

What I wanted was an easy way to fix such a broken download. There's an option to edit an investment, I can change the market, I can change the price, I can change the security itself - but sadly, quantity is the only field that I cannot change. Which frankly doesn't make much sense to me.
Comment 8 allan 2013-01-05 21:04:40 UTC
(In reply to comment #2)
> There are no ledger entries.

I'm having a bit of dificulty understanding this.  You said initially -
"..some of the stock positions were downloaded with quantity 0.00.", but here you say there are no entries in the ledger.  Am I missing something obvious?
Comment 9 vin 2013-01-05 21:09:39 UTC
(In reply to comment #8)
> (In reply to comment #2)
> > There are no ledger entries.
> 
> I'm having a bit of dificulty understanding this.  You said initially -
> "..some of the stock positions were downloaded with quantity 0.00.", but
> here you say there are no entries in the ledger.  Am I missing something
> obvious?

Maybe I'm missing something here. I created an investment account. The program asked me if I want to create a brokerage account attached to it, and I answered yes. So I ended up with two accounts, same name, one with "(brokerage)" added to it.

I mapped the investment account to my E*Trade trading account, and did automatic download. I ended up with the dividend transactions in my ledger. The period I downloaded didn't have any buy/sell transactions, only dividends. When I go to the investment screen I see the positions that I have on E*Trade. No transactions in the ledger for them (which is what I expected, in fact, since there are no transactions in the period downloaded). The quantities for some of the positions were broken, and I wanted to fix them. Apparently that's impossible.
Comment 10 Jack 2013-01-05 21:33:49 UTC
There is a general issue with imports on investment accounts.  KMyMoney distinguishes the investment account (which just holds the shares) and the brokerage account (which just holds the associated cash), but most actual brokerage firms don't make that distinction, although it doesn't look like that problem has affected you.

However, it looks like you createed an investment account, and then download dividend transactions, but never put any shares into the account with a buy or add shares.  The quantities weren't "broken" they just showed 0, or do I misunderstand?  If I'm correct, you just need to do a "add shares" on the opening day of the account, or actually do the "buy shares" in which case you need to move enough cash into the brokerage account to pay for them.  Note that  both dividend, buy, and add shares transactions will show in the ledger for the investment account, but only dividend and buy will show up in the brokerage account because adding shares doesn't require a transfer of money in or out of the brokerage account.

If you can suggest any better wording for the manual to explain this better and avoid this type of confusion, please send it to me, and I'll be glad to add it.
Comment 11 vin 2013-01-05 21:41:59 UTC
Created attachment 76219 [details]
A KMyMoney XML with some screenshots showing the prblem.

I think I figured what the actual problem is. I'm attaching a sample XML of an account with several imported transactions. They all appear in the XML, but none appears on the screen. User doesn't see the transactions and flips (like me) because the balances (or quantities, in case of the securities) are off for no apparent reason.

Removed personal info.
Comment 12 Jack 2013-01-05 21:46:40 UTC
In response to Comment 7, the only important quantity numbers in an import have to do with changes in position - buy, sell, add, remove, dividend reinvest.  Position doesn't get imported, only things that change the position.  For example, in a dividend transaction, the only important number is the amount of the dividend.  Even if the OFX transaction includes the quantity of shares that lead to the dividend, that number is not imported.  (I'm not a developer, but that is based on my experience.)

Based on Comment 11, are you being confused by the difference between what shows up in the invenstment account ledger and what shows up in the brokerage account ledger?
Comment 13 allan 2013-01-05 22:33:51 UTC
(In reply to comment #11)
> Created attachment 76219 [details]
> A KMyMoney XML with some screenshots showing the prblem.
> 
> I think I figured what the actual problem is. I'm attaching a sample XML of
> an account with several imported transactions. They all appear in the XML,
> but none appears on the screen. User doesn't see the transactions and flips
> (like me) because the balances (or quantities, in case of the securities)
> are off for no apparent reason.
> 
> Removed personal info.

Ok.  The transactions screen-shot attachment appears to be of the Payees view and as you say, no transactions show.  However, if I load your xml file and look at the Payees view, I see the transactions, and the credit-card in Ledger view shows them.

This may be another 'gotcha', but the opening date for that account is 5 Jan, but the transaction dates are all December.  You need to edit the opening date of the account/s to include your earliest transactions.
Comment 14 vin 2013-01-06 22:59:37 UTC
Understood. I think this cleared it out, I was just looking for it in the wrong place. I should have used the "Add Shares" transaction to solve my problem. Thanks guys, sorry for making noise.