Credit note can be posted without customer selected when search customer List is...
[fa-stable.git] / purchasing / supplier_credit.php
index aff136119c58a4f5d527236fe1b7bdc37179ded0..4bfc235e52f4cd581b4e9be4de6bf2884929a570 100644 (file)
@@ -165,6 +165,13 @@ function check_data()
 {
        global $SysPrefs;
 
+       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 credit note cannot be processed because the there are no items or values on the invoice.  Credit notes are expected to have a charge."));