X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_credit.php;h=25c24e3b0afdf31771954d07b0ede86581ad817f;hb=2b2cbcfe6a448536113966cbb11b79eda73db5ab;hp=6f27aa51874fbc29c262059c9a4913101fda05d0;hpb=f018643dc04ce130f1729e16a65458af443308a0;p=fa-stable.git diff --git a/purchasing/supplier_credit.php b/purchasing/supplier_credit.php index 6f27aa51..25c24e3b 100644 --- a/purchasing/supplier_credit.php +++ b/purchasing/supplier_credit.php @@ -9,12 +9,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$path_to_root=".."; +$page_security = 'SA_SUPPLIERCREDIT'; +$path_to_root = ".."; include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc"); -$page_security=5; - include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/data_checks.inc"); @@ -33,7 +32,6 @@ page(_("Supplier Credit Note"), false, false, "", $js); check_db_has_suppliers(_("There are no suppliers defined in the system.")); //--------------------------------------------------------------------------------------------------------------- -set_editor('supplier', 'supplier_id' , 'reference'); if (isset($_GET['AddedID'])) { @@ -139,7 +137,7 @@ if (isset($_POST['AddGLCodeToTrans'])){ function check_data() { - global $total_grn_value, $total_gl_value; + global $total_grn_value, $total_gl_value, $Refs; if (!$_SESSION['supp_trans']->is_valid_trans_to_post()) { @@ -148,7 +146,7 @@ function check_data() return false; } - if (!references::is_valid($_SESSION['supp_trans']->reference)) + if (!$Refs->is_valid($_SESSION['supp_trans']->reference)) { display_error(_("You must enter an credit note reference.")); set_focus('reference'); @@ -162,7 +160,7 @@ function check_data() return false; } - if (!references::is_valid($_SESSION['supp_trans']->supp_reference)) + if (!$Refs->is_valid($_SESSION['supp_trans']->supp_reference)) { display_error(_("You must enter a supplier's credit note reference.")); set_focus('supp_reference');