X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_payment.php;h=ce217913e0aefc4522fac4060232d13a12fc7617;hb=9437de4193bde74b4a77e6ddcafede09b500c241;hp=713d0122ffda7fc292716b9cf3a767bf1fea960e;hpb=ddadb47f2620ce6902ad4694ce6512568862ba05;p=fa-stable.git diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 713d0122..ce217913 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -102,10 +102,13 @@ function check_inputs() return false; } - if (isset($_POST['charge']) && input_num('charge') > 0 && get_company_pref('bank_charge_act') == '') { - display_error(_("The Bank Charge Account has not been set in System and General GL Setup.")); - set_focus('charge'); - return false; + if (isset($_POST['charge']) && input_num('charge') > 0) { + $charge_acct = get_company_pref('bank_charge_act'); + if (get_gl_account($charge_acct) == false) { + display_error(_("The Bank Charge Account has not been set in System and General GL Setup.")); + set_focus('charge'); + return false; + } } if (isset($_POST['_ex_rate']) && !check_num('_ex_rate', 0.000001)) @@ -161,7 +164,11 @@ function check_inputs() } $_SESSION['alloc']->amount = -input_num('amount'); - return check_allocations(); + + if (isset($_POST["TotalNumberOfAllocs"])) + return check_allocations(); + else + return true; } //----------------------------------------------------------------------------------------