Fixed link bugs in sales order entry and optimized a couple of functions in ui_contro...
[fa-stable.git] / sales / customer_invoice.php
index b0bdbd65539ae9fc88ee269cad73b620dca8c241..bd0e2d2bd9bfa6429fe827f2e917ea655a480de6 100644 (file)
@@ -298,7 +298,7 @@ if (isset($_POST['process_invoice']) && check_data()) {
 
        $newinvoice=  $_SESSION['Items']->trans_no == 0;
        copy_to_cart();
-       if ($new_invoice) new_doc_date($_SESSION['Items']->document_date);
+       if ($newinvoice) new_doc_date($_SESSION['Items']->document_date);
        $invoice_no = $_SESSION['Items']->write();
 
        processing_end();