X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_payment.php;h=0d094ba346b5e49d0512ed05b905e1d33be4bf38;hb=21ba0553185531c12f16efef9010033d5dd62cdc;hp=2ceac5f387d05bd036fd817f33dc531e0993d462;hpb=3613e32ad573d5faccb974a421702bdd87583878;p=fa-stable.git diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 2ceac5f3..0d094ba3 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -17,7 +17,6 @@ include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/ui.inc"); 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"); @@ -114,6 +113,13 @@ function check_inputs() { global $Refs; + if (!get_post('supplier_id')) + { + display_error(_("There is no supplier selected.")); + set_focus('supplier_id'); + return false; + } + if ($_POST['amount'] == "") { $_POST['amount'] = price_format(0); @@ -160,7 +166,8 @@ function check_inputs() return false; } - if (input_num('amount') - input_num('discount') <= 0) + //if (input_num('amount') - input_num('discount') <= 0) + if (input_num('amount') <= 0) { display_error(_("The total of the amount and the discount is zero or negative. Please enter positive values.")); set_focus('amount');