Typo in ISO_8859-1 => ISO-8859-1. Fixed
[fa-stable.git] / purchasing / supplier_invoice.php
index 0dc1a77ad90444f74649e2ceefbec5e118c8dd13..d3cef151f0c9717f509b2785006930d5cec14b40 100644 (file)
@@ -170,6 +170,13 @@ function check_data()
 {
        global $Refs;
 
+       if (!get_post('supplier_id')) 
+       {
+               display_error(_("There is no supplier selected."));
+               set_focus('supplier_id');
+               return false;
+       } 
+
        if (!$_SESSION['supp_trans']->is_valid_trans_to_post())
        {
                display_error(_("The invoice cannot be processed because the there are no items or values on the invoice.  Invoices are expected to have a charge."));
@@ -401,7 +408,7 @@ if ($id != -1 || $id2 != -1)
        $Ajax->activate('inv_tot');
 }
 
-if (get_post('AddGLCodeToTrans'))
+if (get_post('AddGLCodeToTrans') || get_post('update'))
        $Ajax->activate('inv_tot');
 
 br();