//
function retrieve_exrate($curr_b, $date)
{
- global $Hooks;
-
- if (method_exists($Hooks, 'retrieve_exrate'))
- return $Hooks->retrieve_exrate($curr_b, $date);
- else
- return get_extern_rate($curr_b, 'ECB', $date);
+ return $rate = hook_retrieve_exrate($curr_b, $date);
+ if (is_numeric($rate))
+ return $rate;
+ return get_extern_rate($curr_b, 'ECB', $date);
}
//-----------------------------------------------------------------------------
function price_in_words($amount, $document=0)
{
- global $Hooks;
// use local price_in_words() if the hook is defined
- if (method_exists($Hooks, 'price_in_words'))
- {
- return $Hooks->price_in_words($amount, $document);
- }
+ $price = hook_price_in_words($amount, $document);
+ if ($price)
+ return $price;
+
// Only usefor Remittance and Receipts as default
if (!($document == ST_SUPPAYMENT || $document == ST_CUSTPAYMENT || $document == ST_CHEQUE))
return "";
function print_tax_report()
{
- global $path_to_root, $trans_dir, $Hooks, $systypes_array;
+ global $path_to_root, $trans_dir, $systypes_array;
$from = $_POST['PARAM_0'];
$to = $_POST['PARAM_1'];
$rep->Font();
$rep->NewLine();
- if (method_exists($Hooks, 'tax_report_done'))
- {
- $Hooks->tax_report_done();
- }
+ hook_tax_report_done();
$rep->End();
}