X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fexchange_rates.php;h=6d13b06bf90f3bd77b712eed49eaff45115ea39f;hb=9a4dbbda763486152d2e98485a7a2a699426141d;hp=90ab428f37db35a37d4d6eb6403c8791804f975c;hpb=abcfb8a4bcb005eb944c08570fd95069db24a67c;p=fa-stable.git diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index 90ab428f..6d13b06b 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -19,7 +19,7 @@ include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/banking.inc"); $js = ""; -if ($use_date_picker) +if (user_use_date_picker()) $js .= get_js_date_picker(); page(_($help_context = "Exchange Rates"), false, false, "", $js); @@ -108,8 +108,9 @@ function display_rates($curr_code) function display_rate_edit() { - global $selected_id, $Ajax; - + global $selected_id, $Ajax, $SysPrefs; + $xchg_rate_provider = ((isset($SysPrefs->xr_providers) && isset($SysPrefs->dflt_xr_provider)) + ? $SysPrefs->xr_providers[$SysPrefs->dflt_xr_provider] : 'ECB'); start_table(TABLESTYLE2); if ($selected_id != "") @@ -139,7 +140,7 @@ function display_rate_edit() $Ajax->activate('BuyRate'); } amount_row(_("Exchange Rate:"), 'BuyRate', null, '', - submit('get_rate',_("Get"), false, _('Get current ECB rate') , true), 'max'); + submit('get_rate',_("Get"), false, _('Get current rate from') . ' ' . $xchg_rate_provider , true), 'max'); end_table(1); @@ -177,7 +178,7 @@ if (!isset($_POST['curr_abrev'])) echo "
"; echo _("Select a currency :") . " "; -echo currencies_list('curr_abrev', null, true); +echo currencies_list('curr_abrev', null, true, true); echo "
"; // if currency sel has changed, clear the form @@ -187,9 +188,9 @@ if ($_POST['curr_abrev'] != get_global_curr_code()) $selected_id = ""; } -set_global_curr_code($_POST['curr_abrev']); +set_global_curr_code(get_post('curr_abrev')); -$sql = get_sql_for_exchange_rates(); +$sql = get_sql_for_exchange_rates(get_post('curr_abrev')); $cols = array( _("Date to Use From") => 'date', @@ -199,7 +200,7 @@ $cols = array( ); $table =& new_db_pager('orders_tbl', $sql, $cols); -if (is_company_currency($_POST['curr_abrev'])) +if (is_company_currency(get_post('curr_abrev'))) { display_note(_("The selected currency is the company currency."), 2); @@ -221,4 +222,3 @@ end_form(); end_page(); -?>