X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_invoice.php;h=d3cef151f0c9717f509b2785006930d5cec14b40;hb=51f9e62242aa3697a2d9350d6d1040d5c647c7a5;hp=0dc1a77ad90444f74649e2ceefbec5e118c8dd13;hpb=45aa0f7f7e8a8683305bbdbc58fdb3b791d2115e;p=fa-stable.git diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index 0dc1a77a..d3cef151 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -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();