On 2020-05-15 12:35, John Ralls wrote:
Jim,
Use plain text with a fixed-width typeface to be sure that the formatting 
survives the list server.

Thank you for the tip. Here are my three examples from my original message of 14. May <https://lists.gnucash.org/pipermail/gnucash-user/2020-May/091160.html>.

The transaction I entered was this (simplified a bit from my actual numbers):

Account                   Shares  Price    Buy         Sell

Brokerage CAD:ETF:DLR      200    14.00    2,800.00
Brokerage USD:ETF:DLR.U   -200    10.00                2,000.00


That is, move out 200 shares of the US-dollar DLR.UR, at the share price at 
which I bought them,
and bring in 200 shares of the Canadian-dollar DLR, at the share prices they 
were at when I
bought the DLR.U.  That's pretty much what the real-world journal transfer of 
shares in my
brokerage account was like.

I expected that GnuCash would add in TRADING:FUND splits to balance the 
quantity of DLR and
DLR.U shares in the transaction. I expected to see:

Account                   Shares  Price    Buy         Sell

Brokerage CAD:ETF:DLR      200    14.00    2,800.00
Trading:FUND:DLR.U         200    10.00    2,000.00
Brokerage USD:ETF:DLR.U   -200    10.00                2,000.00
Trading:FUND:DLR          -200    14.00                2,800.00

What I got was that, plus a Trading:CURRENCY:CAD split that was not motivated 
by anything,
and then an Imbalance-CAD split to balance the Trading:CURRENCY:CAD split:

Account                   Shares  Price    Buy         Sell

Brokerage CAD:ETF:DLR      200    14.00    2,800.00
Trading:FUND:DLR.U         200    10.00    2,000.00
Trading:CURRENCY:CAD                         800.00
Brokerage USD:ETF:DLR.U   -200    10.00                2,000.00
Trading:FUND:DLR          -200    14.00                2,800.00
Imbalance-CAD                                            800.00

[Hopefully those examples get through clearly on the list.]

On 2020-05-15 12:35, John Ralls wrote:
GnuCash only knows how to balance transactions in currency so there's always a 
currency involved, it's the one for the account that you start from or if that 
account has a non-currency commodity like a stock, it's the currency of the 
first parent account that has a currency.
GnuCash does know how to balance transactions in multiple currencies if they start from a banking or credit card account. It does that all the time when recording my travel expenses.  This confirms my suspicion that the underlying problem is that GnuCash can't handle a _stock_ transaction in multiple currencies.
For a transfer between commodity accounts you use only the currency of the 
account you start in. The price doesn't really matter, it's just there so that 
GnuCash can make sure that the transaction is balanced… so start in split view 
and create the two splits *using the same price for each*.…

OK, I can see this as an effective workaround. Using the same price for each means the same amount for each split. When GnuCash treats all splits as in the same currency, even though different splits have different currencies in their parent accounts, having the same amount means the splits balance. The drawback of this workaround is that the transaction will have a misleading share price and amount for one or the other split.

What I take from this is that it is time to file a bug report in GnuCash asking for support of multi-currency stock transactions. I may even look at the source and see if I can figure out how to fix it.
Regards,
John Ralls

I always appreciate your helpful support on this list, on top of all the development you do. Thank you, John.

Best regards,
     —Jim DeLaHunt, software engineer, Vancouver, Canada

--
    --Jim DeLaHunt, [email protected]     http://blog.jdlh.com/ (http://jdlh.com/)
      multilingual websites consultant

      355-1027 Davie St, Vancouver BC V6E 4L2, Canada
         Canada mobile +1-604-376-8953

_______________________________________________
gnucash-user mailing list
[email protected]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to