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

David Hampton hampton@employees.org
28 Dec 2002 08:20:34 -0800


--=-9HNXrZDpI1HO8Qktv3BE
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2002-12-24 at 14:53, Derek Atkins wrote:
> David Hampton <hampton@employees.org> 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.
>=20
> 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.
=20
> > 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?)
>=20
> 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


--=-9HNXrZDpI1HO8Qktv3BE
Content-Type: application/DEFANGED-444563; name="signature_asc.DEFANGED-444563"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA+Dc9RlSwHWMdNRQQRArHCAJwMU/2uKwq36u9vRJtoDPIxhmQs9gCgpq8p
Zd3bKRk4QmwJBrxhwzI4i5o=
=Nc+H
-----END PGP SIGNATURE-----

--=-9HNXrZDpI1HO8Qktv3BE--