CVS update: gnucash/src/register/ledger-core

Derek Atkins warlord@MIT.EDU
24 Dec 2002 09:46:39 -0500


David,

In what way did you change the logic in the xfer dialog (other than
the fact that the dialog denoted the price, not the exchange rate)?
Note that when the user types 1000 into the Amount field and "1.56"
into the "price" field (which is exactly how it is labeled), it will
show you the "641.02" in the "To Amount" field, which is exactly what
gets posted in the transaction.

Also, the 'swap' routine was there to make sure that you always were
working from the correct number.  If you are working from the "other"
account then you need to make sure that the number the user typed in
is the number at the top (or at least the converted rate), otherwise
it will reak all amounts of havoc on user input.

I was very careful to test this with all different sorts or scenarios
when multi-currency transactions and editing the transactions and
exchange rates from different accounts...  Did you make sure it all
still works and "does the right thing" in all cases?

Another thing to note is that checking the forward and reverse
exchange rates is a Bad Idea, because they MAY be different.  For
example, go to a bank, ask to exchange $1000USD to CAD; they've give
you, say, $1560CAD.  Now get back in line and ask to exchange that
back to USD, and they'll probably give you something more like
$990USD....  The order DOES matter, which is why I had that extra
logic in there....

-derek

hampton@linas.org (David Hampton) writes:

> Date:	Monday December 23, 2002 @ 19:50
> Author:	hampton
> 
> Update of /home/cvs/cvsroot/gnucash/src/register/ledger-core
> In directory www.linas.org:/tmp/cvs-serv1889/src/register/ledger-core
> 
> Modified Files:
> 	split-register-control.c 
> Log Message:
> Change logic to multiply by the exchange rate instead of divide.  Look
> for both both forward and reverse currency quotes in the
> pricedb. Attempt to install currency quotes into the pricedb in a
> consistent manner.  Give the user better feedback on exactly what the
> exchange rate means. Obsolete the currency "swap" routine. #101450
> 
> 
> _______________________________________________
> gnucash-patches mailing list
> gnucash-patches@lists.gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches

-- 
       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@MIT.EDU                        PGP key available