Update from usntable branch.
[fa-stable.git] / gl / includes / db / gl_db_rates.inc
index bd0775eaa746ca7fa74a0e72b0622f9561cfffa8..c6d5c530bc159e331bb30bc2d142fee2f00e5e6e 100644 (file)
@@ -70,7 +70,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) 
 {