{
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."));
$Ajax->activate('inv_tot');
}
-if (get_post('AddGLCodeToTrans'))
+if (get_post('AddGLCodeToTrans') || get_post('update'))
$Ajax->activate('inv_tot');
br();