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 334255 - Missing information in stock purchase split transaction (non default currency)
Missing information in stock purchase split transaction (non default currency)
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Register
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: Charles Day
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2006-03-11 21:32 UTC by Bengt Thuree
Modified: 2018-06-29 20:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tar file with some screenshots (580.00 KB, application/x-compressed-tar)
2006-03-11 21:34 UTC, Bengt Thuree
Details

Description Bengt Thuree 2006-03-11 21:32:31 UTC
wrong arguments for gnc:make-gnc-monetary ?

Create a new file
Only choose Investment accounts
Add one Assets->Bank account

Tie Commodity ERICB.ST to Stock
	Full Name - Ericsson B
	Symbol ERICB.ST
	Type Stockholm
	Live data from Yahoo(Europe/Paris time)

Create the following Stock Purchase
	Assets:Investment:Bro:Stock	
		300 shares
		5 each
	Expenses:Commissions	200
	Assets:Bank			1700
	--> All 0

Check the Account chart and all looks ok.

Create the following accounts
	Stock2 (duplicate of Stock)
	Bank2 (Currency SEK (Swedish KR))
	Commissions2 (Currency SEK (Swedish KR))

Create the following Stock Purchase
	Assets:Investment:Bro:Stock2	
		300 shares
		5 each
	Expenses:Commissions2	200
	Assets:Bank2			1700
	--> All 0

Check the Account chart, and Bank2 and Commissions2 = 0
Check the Bank2 and Commissions2 split transaction, and they are blank

I tried to do the same with a new Brokerage Account, which had currency SEK. But did not change anything.
I have attached screenshots from the above transactions.


Below is the output from the Console for this session.
$ gnucash
gnucash: [M] "Found Finance::Quote version "1.08

;;; WARNING (wrong arguments for gnc:make-gnc-monetary:  #f #<<gnc-numeric> num: 0 denom: 1>)

;;; WARNING (wrong arguments for gnc:make-gnc-monetary:  #f #<<gnc-numeric> num: 0 denom: 1>)

;;; WARNING (wrong arguments for gnc:make-gnc-monetary:  #f #<<gnc-numeric> num: 0 denom: 1>)


$ gnucash --version
GnuCash 1.9.2
Built 2006-03-08 from r13498
Comment 1 Bengt Thuree 2006-03-11 21:34:34 UTC
Created attachment 61103 [details]
Tar file with some screenshots

Tar file that contains the following
94K 2006-03-12 08:14 Accounts.jpg
72K 2006-03-12 08:17 Bank2.jpg
75K 2006-03-12 08:15 Bank.jpg
73K 2006-03-12 08:18 Commissions2.jpg
73K 2006-03-12 08:16 Commissions.jpg
38K 2006-03-12 08:24 Commodity.jpg
72K 2006-03-12 08:17 Stock2.jpg
71K 2006-03-12 08:14 Stock.jpg
Comment 2 bill 2007-08-24 19:16:39 UTC
I've also had the same problem with the blank transaction on the cash account side (Same as Stock2/Bank2/Commissions2). My default currency is CDN, I can't confirm the console output.
Comment 3 Kradak Thomas 2007-09-28 09:53:43 UTC
Version: 2.2.1 (built from r16462)
OS: Win XP Pro

I can add that the problem exists for me. I make this claim based on the screenshots provided by Bengt Thuree (above).

As far as replication is concerned, I have yet to work this out completely, as my short term memory is quite lossy. I can add a few details, though:

(1) I see an error stating that Finance::quote was not installed properly (?)
(2) I have made stock purchases that do not exhibit this problem.
(3) Splits for the stock account appear, whereas they do not in the brokerage/bank account.
(4) When I buy/sell a stock through the brokerage account, the splits appear OK here as well as in the stock account.
(5) When I buy/sell a stock through the stock account, the splits appear OK in the stock account, but are BLANK in the brokerage account.

Therefore, my recommended action for users until this is fixed is:

Undertake all stock buy/sell transactions through the funding bank, not through the account for the particular security traded.
Comment 4 Jonathan Kamens 2008-01-15 09:21:15 UTC
Still a problem in 2.2.3.
Seems to make it mostly impossible to track stock purchases and sales in GnuCash.  Doesn't that make this an important bug to fix?
Comment 5 Charles Day 2008-07-28 02:41:21 UTC
I'm not quite sure that I understand the attached screenshots. Did you intend for the stock purchase price to be 5 AUD per share, or 5 SEK per share?

When you purchase a stock, the parent of the stock account determines the currency used for the transaction. So for the first purchase, using funds from Assets:Bank, the transaction says you paid a total of AUD 1700 for 300 shares (1500 AUD for the shares @ 5 AUD per share, plus 200 AUD commission.)

If that's what you intended, great, but if ERICB.ST is quoted by Yahoo! in SEK, then you also need a price for SEK if you want totals to display in AUD.

In the second purchase, the transaction *still* occurs in AUD terms because the parent of Stock2 is denominated in AUD. Since Bank2 and Commisions2 are denominated in SEK, you should have been able to enter an SEK-AUD exchange rate entered for those two splits. The exchange rate appears to be zero, and that's why you see blank splits in the SEK accounts. This sounds the same as bug 495137.

So again, is the stock purchase price supposed to be 5 AUD per share, or 5 SEK per share?
Comment 6 Bengt Thuree 2008-07-31 10:39:11 UTC
Would have been great to get a bit more responce 2 years ago on this one.
Sorry for mentioning that, but this bug (everything related to currencies) caused me to stop using GnuCash :(

Anyway, I will try to reply based on my memory and description.

1) First purchase was done using all default values, which works great.

2) Second purchase was done using a different currency, which did not work at all. 

I always run into problems with different currencies in GnuCash. Especially when you do transaction between them. In particular stock actions.

Duplicate of bug 495137 :) Based on the timestamp, I would say the other way around :)

I did not try to change the parent account to a different currency. To me should not be needed, but if it is, there should be code to detect it (that stock is using different currency than account) as well as documentation update.

Hope this is enough.
Comment 7 Charles Day 2008-07-31 16:12:09 UTC
Sorry for the long delay. More volunteers would be nice. Personally, I've only been involved for less than a year, and QIF importer bugs ate all my attention until recently. Anyway, I am now going back through some of the old bugs and trying to pick up the ones involving investments.

When I said this was the same as bug 495137, I only meant that the root cause is the same. Obviously yours was reported earlier. However, I may end up marking this one as a duplicate and track this problem via bug 495137 since there is a current user there who has provided a sample file and can do testing. It's unfortunate that your report wasn't handled earlier, when you were still using GnuCash. I agree that the documentation needs to be updated. The register should also detect this situation and ask which currency is being used, but that might not happen until the register rewrite gets completed. (I don't know if anyone is actively working on that.)

Don't be surprised if you see me add comments to other bugs of yours. I am touching a lot of currency- and investment-related bugs at the moment. I will try to remember that you can only provide further information by memory.
Comment 8 Charles Day 2008-08-29 16:54:43 UTC
For documentation, I see that the Tutorial and Concepts Guide shows foreign stock purchases being entered via the register of the account used to make payment (rather than the stock register). But that really isn't a warning against entering purchases in the stock register, and the section needs some updates anyway, so I will go ahead and make some changes.

So I think I will use this bug to just track an immediate fix for the documentation, and leave bug 495137 open to track code changes (and any necessary documentation changes once those have happened.)
Comment 9 Charles Day 2008-08-31 17:44:32 UTC
Documentation fix committed as r17481. (Thanks, Andreas) Requesting backport for 2.2.
Comment 10 Andreas Köhler 2008-09-19 02:56:38 UTC
As described in http://lists.gnucash.org/pipermail/gnucash-devel/2008-September/023828.html there is no process for backporting documentation fixes.

Resolving as FIXED (sorry for stealing bugzilla points, Charles, no harm intended :))
Comment 11 John Ralls 2018-06-29 20:59:25 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=334255. Please update any external references or bookmarks.