]> wagnertech.de Git - timetracker.git/blobdiff - invoice_add.php
Refactoring a bit.
[timetracker.git] / invoice_add.php
index 347f6b43abee3e5e3de287b65625498d0aeaad31..0efc99eec9b5cdc789e16eb8a372a785b4a1dc7e 100644 (file)
@@ -86,10 +86,11 @@ if ($request->isPost()) {
     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()"');