On Tue, 2002-12-24 at 14:53, Derek Atkins wrote: > David Hampton <[EMAIL PROTECTED]> writes: > > I changed code to update the pricedb to check for an existing exchange > > rate entry on the day of the transaction, not at the exact second of the > > transaction. This prevents multiple entries for the same exchange rate > > on the same day. > > Please revert this -- I did this for a reason. Right now, all txns in > one day have the same Timespec, but in the future if we support a > timestamp I want to allow support for multiple exchange rates in one > day. Right now it should do the right thing with my old code because > all txns in one day have the same timestamp, so it should do the same > thing as your code, but down the road when we support a time-of-day > for a txn I want the behavior I had before.
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 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. > > This was a user convenience. If you know the exchange rate in one > > direction, then you know (or approximately know) the exchange rate in > > the other direction. What's the likelihood that users are going to want > > to transfer money to/from the same currency in the same day? (Is there > > a currency trader in out midst?) > > 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. David
signature_asc_DEFANGED-444563.DEFANGED-1394
Description: application/defanged-1394