if (ttInvoiceHelper::createInvoice($fields)) {
header('Location: invoices.php');
exit();
- }
+ } else {
$err->add($i18n->getKey('error.db'));
+ }
}
-} // POST
+} // isPost
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
$smarty->assign('onload', 'onLoad="document.invoiceForm.number.focus()"');