X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_payment.php;h=0c8aa7dd4940c75979d984fafdf4f6ec9e786a93;hb=883307779f9ca5bac0533702a8702b0cccb4742f;hp=713d0122ffda7fc292716b9cf3a767bf1fea960e;hpb=ddadb47f2620ce6902ad4694ce6512568862ba05;p=fa-stable.git diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 713d0122..0c8aa7dd 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -19,6 +19,7 @@ include_once($path_to_root . "/includes/banking.inc"); include_once($path_to_root . "/includes/data_checks.inc"); //include_once($path_to_root . "/purchasing/includes/ui/supp_alloc_ui.inc"); include_once($path_to_root . "/purchasing/includes/purchasing_db.inc"); +include_once($path_to_root . "/reporting/includes/reporting.inc"); $js = ""; if ($use_popup_windows) @@ -28,7 +29,7 @@ if ($use_date_picker) add_js_file('payalloc.js'); -page(_("Supplier Payment Entry"), false, false, "", $js); +page(_($help_context = "Supplier Payment Entry"), false, false, "", $js); if (isset($_GET['supplier_id'])) { @@ -69,6 +70,9 @@ if (isset($_GET['AddedID'])) display_notification_centered( _("Payment has been sucessfully entered")); + submenu_print(_("&Print This Remittance"), ST_SUPPAYMENT, $payment_id."-".ST_SUPPAYMENT, 'prtopt'); + submenu_print(_("&Email This Remittance"), ST_SUPPAYMENT, $payment_id."-".ST_SUPPAYMENT, null, 1); + display_note(get_gl_view_str(22, $payment_id, _("View the GL &Journal Entries for this Payment"))); // hyperlink_params($path_to_root . "/purchasing/allocations/supplier_allocate.php", _("&Allocate this Payment"), "trans_no=$payment_id&trans_type=22"); @@ -102,10 +106,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 +168,11 @@ function check_inputs() } $_SESSION['alloc']->amount = -input_num('amount'); - return check_allocations(); + + if (isset($_POST["TotalNumberOfAllocs"])) + return check_allocations(); + else + return true; } //----------------------------------------------------------------------------------------