X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/5ef582473f6b329be18ad83c61e053fdcd9c6ed5..b027832862272283d9203c994ec8fd39f6196887:/invoice_add.php diff --git a/invoice_add.php b/invoice_add.php index fb2c7fe3..9074ce2a 100644 --- a/invoice_add.php +++ b/invoice_add.php @@ -76,20 +76,20 @@ if ($request->getMethod() == 'POST') { if ($errors->isEmpty()) { if (ttInvoiceHelper::getInvoiceByName($cl_number)) $errors->add($i18n->getKey('error.invoice_exists')); - + if (!ttInvoiceHelper::invoiceableItemsExist($fields)) - $errors->add($i18n->getKey('error.no_invoiceable_items')); + $errors->add($i18n->getKey('error.no_invoiceable_items')); } if ($errors->isEmpty()) { - // Now we can go ahead and create our invoice. + // Now we can go ahead and create our invoice. if (ttInvoiceHelper::createInvoice($fields)) { header('Location: invoices.php'); exit(); } - $errors->add($i18n->getKey('error.db')); + $errors->add($i18n->getKey('error.db')); } -} // post +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.invoiceForm.number.focus()"');