X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_trans_gl.php;h=b2b827fee00d90de7efd34df97af26b89e4628c2;hb=41069728f318cd75cfecce474a7ac464e2894615;hp=cc78626998f5f2d480ec7707bdd2ab4565050bd7;hpb=217f175953339fd10cd5aee5942cc263a4092323;p=fa-stable.git diff --git a/purchasing/supplier_trans_gl.php b/purchasing/supplier_trans_gl.php index cc786269..b2b827fe 100644 --- a/purchasing/supplier_trans_gl.php +++ b/purchasing/supplier_trans_gl.php @@ -3,10 +3,10 @@ $page_security=5; $path_to_root=".."; -include($path_to_root . "/purchasing/includes/supp_trans_class.inc"); -include($path_to_root . "/includes/session.inc"); +include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc"); +include_once($path_to_root . "/includes/session.inc"); -include($path_to_root . "/purchasing/includes/purchasing_ui.inc"); +include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc"); $js = ""; if ($use_date_picker) $js .= get_js_date_picker(); @@ -48,15 +48,17 @@ if (isset($_POST['AddGLCodeToTrans'])){ if (db_num_rows($result) == 0) { display_error(_("The account code entered is not a valid code, this line cannot be added to the transaction.")); + set_focus('gl_code'); $input_error = true; } else { $myrow = db_fetch_row($result); $gl_act_name = $myrow[1]; - if (!is_numeric($_POST['amount'])) + if (!check_num('amount')) { display_error(_("The amount entered is not numeric. This line cannot be added to the transaction.")); + set_focus('amount'); $input_error = true; } } @@ -64,7 +66,8 @@ if (isset($_POST['AddGLCodeToTrans'])){ if ($input_error == false) { $_SESSION['supp_trans']->add_gl_codes_to_trans($_POST['gl_code'], $gl_act_name, - $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['amount'], $_POST['memo_']); + $_POST['dimension_id'], $_POST['dimension2_id'], + input_num('amount'), $_POST['memo_']); clear_fields(); } }