X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_payment.php;h=265fe536ed01b64f5db599382ae2f0aa220e147c;hb=b5c5d915d8ce6e85605dce6efc5d2b61ea02f3ee;hp=68ed1c8f61b8762878d9c9528c21ebc1bc93d2c4;hpb=ebc600101ceab69c06eac4b1bd4d1782af45de05;p=fa-stable.git diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 68ed1c8f..265fe536 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -17,8 +17,8 @@ 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"); $js = ""; if ($use_popup_windows) @@ -69,7 +69,10 @@ if (isset($_GET['AddedID'])) display_notification_centered( _("Payment has been sucessfully entered")); - display_note(get_gl_view_str(22, $payment_id, _("View the GL &Journal Entries for this Payment"))); + 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(ST_SUPPAYMENT, $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"); @@ -84,6 +87,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); @@ -130,7 +140,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');