X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fdb%2Fgl_db_rates.inc;h=fa5926b6559fa04a67d548c1eefc4f6302f18405;hb=f4737ea725de62440c8bf58a7b4d7b187268fe93;hp=0c9ae6863b5d81d572f404ddff4789bbf7c37322;hpb=ce77ace4ce3b96189e38a4e99712fe119b01fb51;p=fa-stable.git diff --git a/gl/includes/db/gl_db_rates.inc b/gl/includes/db/gl_db_rates.inc index 0c9ae686..fa5926b6 100644 --- a/gl/includes/db/gl_db_rates.inc +++ b/gl/includes/db/gl_db_rates.inc @@ -69,7 +69,19 @@ function delete_exchange_rate($rate_id) db_query($sql, "could not delete exchange rate $rate_id"); } -//--------------------------------------------------------------------------------------------- +//----------------------------------------------------------------------------- +// Retrieve exchange rate as of date $date from external source (usually inet) +// +function retrieve_exrate($curr_b, $date) +{ + global $Hooks; + + if (method_exists($Hooks, 'retrieve_exrate')) + return $Hooks->retrieve_exrate($curr_b, $date); + else + return get_ecb_rate($curr_b); +} +//----------------------------------------------------------------------------- function get_ecb_rate($curr_b) {