After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722123 - Zero price entry added to price database on stock purchase
Zero price entry added to price database on stock purchase
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Register
2.6.0
Other Linux
: Normal normal
: ---
Assigned To: gnucash-ui-maint
gnucash-ui-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-13 18:55 UTC by Richard Ullger
Modified: 2018-06-29 23:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Price editor window (68.12 KB, image/jpeg)
2014-01-13 19:00 UTC, Richard Ullger
Details
Reinvestment transaction showing splits (67.94 KB, image/jpeg)
2014-01-21 21:51 UTC, Richard Ullger
Details

Description Richard Ullger 2014-01-13 18:55:05 UTC
Following the update to 2.6.0, gnucash has started adding zero price entries into the price database when a stock purchase is entered into a stock account register. The price source is recorded as user:split-register.
Comment 1 Richard Ullger 2014-01-13 19:00:16 UTC
Created attachment 266188 [details]
Price editor window
Comment 2 John Ralls 2014-01-17 00:24:17 UTC
Rats. It's supposed to be adding the effective price, but it seems to do that only when entered from the stock account. When I enter the txn from the stock account it doesn't do anything.

How are you entering the stock tranasction?
Comment 3 Richard Ullger 2014-01-18 20:29:48 UTC
The transactions are entered into an account register of type stock. All transactions entered into 2.6.0 so far have been auto-filled from previous transactions entered using gnucash 2.4.x.

Each transaction consists of splits for:

- Stock purchase
- Commission expense
- Stamp duty expense
- Decrease in the cash account for the purchase
- Income recording the dividend
- Increase in the cash account for the dividend.

In previous versions of gnucash, entering such a transaction was not recording any entries in the price database.
Comment 4 John Ralls 2014-01-18 21:17:14 UTC
Right, it's from a fix for Bug 157247, and it's supposed to insert the calculated price from the purchase split. I suppose that you have the splits visible to adjust the amounts when you hit Enter.

Out of curiosity, why is there a pair of dividend splits? One doesn't usually get a dividend at the time one purchases stock.
Comment 5 Richard Ullger 2014-01-18 21:37:50 UTC
The dividend is automatically reinvested when it is received into the account.

Recording the dividend receipt as a split of the stock reinvestment was the only way I could get the dividend reported as income on the Advanced Portfolio report.
Comment 6 Richard Ullger 2014-01-18 21:49:26 UTC
Yes, the transaction splits get filled from a previous reinvestment transaction. I adjust the figures to suit and press enter to record the transaction.
Comment 7 John Ralls 2014-01-20 02:28:53 UTC
(In reply to comment #5)
> The dividend is automatically reinvested when it is received into the account.
> 
> Recording the dividend receipt as a split of the stock reinvestment was the
> only way I could get the dividend reported as income on the Advanced Portfolio
> report.

Ah, I record those as separate transactions, because that's what my brokerage statements do. I also don't use the Advanced Portfolio Report, though I might have a look again after Mike Alexander worked it over yesterday.

But I can't replicate the problem. I'm getting properly filled in prices showing in the price editor.

Just to be sure, you're using the stock's register, not the cash account, right?
Comment 8 Richard Ullger 2014-01-20 19:47:44 UTC
Yes, I'm entering the transaction into the stock's register.

I entered a fresh transaction today, ie not one auto-filled from a previous transaction, and gnucash still entered a zero price into the price database.
Comment 9 John Ralls 2014-01-21 19:00:43 UTC
Could you attach a screenshot of that last transaction? One of us is obviously doing something different...
Comment 10 Richard Ullger 2014-01-21 21:51:55 UTC
Created attachment 266926 [details]
Reinvestment transaction showing splits

I've added a description in the split memo fields to help you identify each split as I've masked out sensitive data in the account names.
Comment 11 Richard Ullger 2014-01-21 22:03:16 UTC
The stock purchase line was entered by entering the number of shares, blanking the price, entering the cost and letting gnucash calculate the price per share.
Comment 12 John Ralls 2014-01-22 00:57:50 UTC
(In reply to comment #11)
> The stock purchase line was entered by entering the number of shares, blanking
> the price, entering the cost and letting gnucash calculate the price per share.

That was the secret. Now I can reproduce it.
Comment 13 John Ralls 2014-01-22 01:54:08 UTC
And fix it: r23740.
Comment 14 Richard Ullger 2014-02-03 18:17:23 UTC
This is still an issue under the following condition:

I have received a dividend which is not enough to buy one whole share. The dividend has been recorded in the stock account with the following splits:

	Tot Buy	Tot Sell
Stock
Income		41.50
Cash	41.50

The stock split is a blank split to tie the transaction to the stock account. Gnucash has entered a zero price entry into the price database. This causes the account total on the accounts page to show zero.
Comment 15 John Ralls 2014-02-23 02:07:19 UTC
OK, fixed that too with e421123.
Comment 16 John Ralls 2018-06-29 23:24:43 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=722123. Please update any external references or bookmarks.