Session destroy on install finish added.
[fa-stable.git] / purchasing / supplier_invoice.php
index ce56148738dfe0720000cec842b72fe007e11198..b0434e68d3670ebd64b78dfc4125d84007d1d106 100644 (file)
@@ -65,8 +65,7 @@ if (isset($_GET['New']))
                unset ($_SESSION['supp_trans']);
        }
 
-       $_SESSION['supp_trans'] = new supp_trans;
-       $_SESSION['supp_trans']->is_invoice = true;
+       $_SESSION['supp_trans'] = new supp_trans(ST_SUPPINVOICE);
 }
 
 //--------------------------------------------------------------------------------------------------
@@ -185,7 +184,7 @@ function check_data()
 
        if (is_reference_already_there($_SESSION['supp_trans']->supplier_id, $_POST['supp_reference']))
        {       /*Transaction reference already entered */
-               display_error(_("This invoice number has already been entered. It cannot be entered again." . " (" . $_POST['supp_reference'] . ")"));
+               display_error(_("This invoice number has already been entered. It cannot be entered again.") . " (" . $_POST['supp_reference'] . ")");
                return false;
        }