[GNC] currency of "value" in stock account

Lionel Élie Mamane lmamane-gnucash.user.ml at conuropsis.org
Wed Nov 10 04:09:48 EST 2021


On Tue, Nov 09, 2021 at 06:04:13PM +0100, Lionel Élie Mamane wrote:
> On Tue, Nov 09, 2021 at 07:31:08AM -0500, Derek Atkins wrote:
>> On Tue, November 9, 2021 6:41 am, Lionel Élie Mamane wrote:

>>> I create an account of type "Stock" that uses that security, let's say
>>> assets:investments:foobar
>>> I open the register for that account

>>> Now, there are columns "price" (which is per-share-price), and
>>> columns "buy" and "sell" which are the total price of the
>>> transaction. What is not clear to me, is what currency are these
>>> columns in? I didn't make a choice for that, and it doesn't seem
>>> to be indicated on screen.

>> It is the currency of the parent account.  So in this case it would
>> be the currency of Assets:Investments.

> OK, thanks.

I discovered that the "show lots" window display these amounts _with_
the currency symbol, and so allows some visibility on that
information. From some tests I did, it seems your assertion is not
correct. The amounts, at least as shown by the "show lots" window,
seem to be in the currency of the account of the second split in the
transaction.

That is, if I enter:

assets:investments:foobar	5	21	105
assets:current assets:bank EUR				105

then the "a:c a:bank EUR" account is credited by 105 EUR, and the
"sell" in a:i:foobar is 105 EUR (shown as € in "show lots").

But if I enter:

assets:investments:foobar	5	21	105
assets:current assets:bank USD				105

then the "a:c a:bank EUR" account is credited by 105 USD, and the
"sell" in a:i:foobar is 105 USD (shown as $ in "show lots").


Which means that the same ledger shows in the same column amounts in
differing currencies, without labelling them with the currency. I'd
argue this is bad, and a bug.


Additionally, I tried, and putting a EUR buy transaction and a USD
sell transaction in the same lot breaks the capital gains/losses
computation, it just puts 0 capital gain/loss. That might, or might
not, be fixable (especially if you have trading accounts activated).


More information about the gnucash-user mailing list