problem selling stocks

Derek Atkins warlord at MIT.EDU
Mon Jul 17 09:51:29 EDT 2006


Jeremy Harris <jgh at wizmail.org> writes:

> Sorry.  In either the stock account or the alternate, for a split
> that is in this condition, a right-click on any of the splits
> of the transaction produces a menu which does have an
> "edit exchange rates" entry but which when selecting
> that entry has no apparent effect.  The menu goes away;
> no further window for the edit operation appears.

As I said before, you cannot do this from the stock account.
You must do it from the other account.  Also, have you tried
each of the various splits?  You MAY need to do it from each
target account..  This particular code is a little buggy.  It
really just helps if you create the transaction from the GBP
account in the first place.

>>  I cannot reproduce your problem, so I just
>> don't know what else to say.  Did you read the bug report that I
>> pointed you at?
>
> I did, but it didn't seem to give any additional info over what you
> said.  Probably I should re-read it in case.

Okay.

> One question:  does a stock account have an inherent currency?  I
> can't see a way of displaying or editing one, and the initial
> create uses the currency box to select the stock.
> Is it the default currency and if so, is it that at account-create
> or whatever is current?   Or is it that of its parent account?

No.  Transactions have a "common currency", but a Stock Account only
has a commodity.  The transaction is "balanced" in the common
currency, so each split must have an exchange-rate with the common
currency (this could be implicitly "1" if it's the same currency).

When you create transactions in a stock account the transaction uses
the LOCALE currency as the common currency.  This is the root of the
problem.  If you're running in an en_US locale but are trying to
account for stocks buying and selling in GBP, you have a transaction
that looks like this:

                       TXN{USD}
                      /       \
                Stock(SYMB)  Bank(GBP)

In columnar form, this looks like:

  Stock     <shares>(SYMB)     <value>(USD)
  Bank      <amount>(GBP)      <value>(USD)

Notice the issue here?  Each "exchange rate" is really to USD!  You
can handle the first split from the stock account, but the SECOND
split you have to handle from the bank account..  Also, you may need
to not only set the exchange rate but ALSO set the value of the split
manually.

If, however, you created the transaction from the Bank(GBP) account,
then the transaction would look like this:

                       TXN{GBP}
                      /       \
                Stock(SYMB)  Bank(GBP)

And you'd be happy.

> Thanks,
>    Jeremy

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list