[OPEN-ILS-GENERAL] Currency Exchange Rate Questions

Dan Scott dan at coffeecode.net
Tue Mar 15 11:09:59 EDT 2011


On Mon, Mar 14, 2011 at 09:16:32AM -0800, Sean Sutherland wrote:
> After perusing the acquisitions documentation, I have a few
> questions regarding currency exchange rates:
> 
> 1. Since exchange rates are constantly in flux, is it possible to
> edit the effective dates of a currency's exchange rate?

This doesn't appear to be possible at the database level; the table that
contains exchange rates simply has the "from" currency, the "to"
currency, and a ratio. There's no concept of dates as far as exchange
rates goes.
 
> 2. Is there a way to view a currency's exchange rates for a given
> date range?

Not natively within Evergreen right now. I suspect the best way to do
this would be to use a tool like
http://finance.yahoo.com/currency-converter/#from=USD;to=EUR;amt=1 to
track exchange rates, rather than trying to turn Evergreen into a
foreign exchange rate tracking tool.

> 3. What date is used to calculate the exchange on a given transaction?

Poking at the database schema and some of the code again, it looks like
the exchange rate is calculated when the fund is debited for a lineitem.
The acq.fund_debit table holds origin_amount, origin_currency, and
amount columns, so you could work backwards to see what rate was used
when that debit was calculated.

The exchange rate is also calculated when you transfer amounts from one
fund to another fund and the funds have different currency types.


More information about the Open-ils-general mailing list