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

Derek Atkins warlord@MIT.EDU
28 Dec 2002 18:27:55 -0500


David Hampton <hampton@employees.org> writes:

> At the time I was seeing multiple redundant transactions entered for the
> same day. I.E. Five different entries in the pricedb all stating that
> the exchange rate for USD->CAD on 12/27 was 0.6421.  I do not see this

Odd.  I seem to recall testing that to make sure I didn't do that..
Thanks for revertng.

> now when I revert this change, so I will commit the reversion.  Note
> that when time of day  support is added, you only want to add a second
> or subsequent entry to the pricedb on any given day if the price has
> changed from the last entry.  Entering five transactions for five
> different purchases using the same exchange rate, there should only be
> one entry in the pricedb.

Maybe..  I can certainly see where this could lead to problems.  For
example, let's say you have three transactions using the same two
commodities all on the same day.  Let's assume they occur at T0, T1,
and T2, but you enter them in order T0, T2, T1.  Now assume that T0
and T2 have the same exchange rate but T1 does not.  If you simply
check that the "rate has changed", then you wont get a pricedb entry
for T2, just T0 and T1.

If you later enter a txn at T3, you'll pull in the "T1" pricedb entry,
not the T2 (because there is no entry for T2).

Perhaps this isn't a major problem?

> > There may be a currency trader in our midst.  I don't know, but why
> > eit them if you don't have to?  In general the register as it was would
> > do the right thing and assume the "right" currency.
> 
> I disagree. Perhaps an option to allow different forward/backward
> exchange rates is needed.

Ok, why do you disagree?

FTR, there was another reason that I implemented the currency swap,
and that was to cope with the user interface of editing an exchange
rate and amount entry at the same time from the "wrong" account.  If
I've got a TXN in GBP and have one split that goes into a USD account,
if I open the USD account, change the price, then click on the "Edit
Exchange Rate" menu item, I want to be able to have the right amount
and exchange rates.

The swapping is important in particular in the case where you have a
disconnected transaction currency.  I've got an example data file
in one of the bug reports.

The key UI concern I had is that when I edit the amount and exchange rate,
in the end I want to change the VALUE based on the amount, so that the
amount shown is the amount I typed in.  If you don't swap the entries
in the echange-rate dialog then if you cannot get the "TO Amount"
features to work properly.

> David

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