Removed obsolete complete parameter.
[fa-stable.git] / purchasing / supplier_payment.php
index 938c2a8d506d4b984195e86abf6fa5dcc79074eb..0d094ba346b5e49d0512ed05b905e1d33be4bf38 100644 (file)
@@ -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');
@@ -249,7 +256,7 @@ if (isset($_POST['ProcessSuppPayment']))
 
 start_form();
 
-       start_outer_table("$table_style2 width=60%", 5);
+       start_outer_table(TABLESTYLE2, "width=60%", 5);
 
        table_section(1);
 
@@ -285,7 +292,7 @@ start_form();
        div_end();
        }
 
-       start_table("$table_style width=60%");
+       start_table(TABLESTYLE, "width=60%");
        amount_row(_("Amount of Discount:"), 'discount');
        amount_row(_("Amount of Payment:"), 'amount');
        textarea_row(_("Memo:"), 'memo_', null, 22, 4);