X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fexchange_rates.php;h=2592b0cc01eaa93cb6a01ef9e7c5e4dc45cbfd6e;hb=d0bbcca1a0477f19cf4ef6872a59fcdf9da4f4e9;hp=39ad4bea02df38c6895200205ee54fdaf97eac6c;hpb=ea24e6536845545b8220c3c21801b51b831bbfeb;p=fa-stable.git diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index 39ad4bea..2592b0cc 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 9; $path_to_root="../.."; include($path_to_root . "/includes/db_pager.inc"); @@ -25,13 +34,7 @@ function check_data() set_focus('date_'); return false; } - if (!check_num('BuyRate', 0)) - { - display_error( _("The exchange rate must be numeric and greater than zero.")); - set_focus('BuyRate'); - return false; - } - if ($_POST['BuyRate'] <= 0) + if (input_num('BuyRate') <= 0) { display_error( _("The exchange rate cannot be zero or a negative number.")); set_focus('BuyRate'); @@ -126,9 +129,6 @@ function display_rate_edit() if (isset($_POST['get_rate'])) { $_POST['BuyRate'] = exrate_format(get_ecb_rate($_POST['curr_abrev'])); - if ($_POST['BuyRate'] == 0) { - display_error(_('This currency is not listed by ECB. Enter exchange rate manually.')); - } $Ajax->activate('BuyRate'); } small_amount_row(_("Exchange Rate:"), 'BuyRate', null, '', @@ -137,7 +137,7 @@ function display_rate_edit() end_table(1); - submit_add_or_update_center($selected_id == '', '', true); + submit_add_or_update_center($selected_id == '', '', 'both'); display_note(_("Exchange rates are entered against the company currency."), 1); } @@ -164,7 +164,7 @@ if ($Mode == 'Delete') //--------------------------------------------------------------------------------------------- -start_form(false, true); +start_form(); if (!isset($_POST['curr_abrev'])) $_POST['curr_abrev'] = get_global_curr_code();