Negative Stock Handling should be prior to add_stock_move
[fa-stable.git] / includes / session.inc
index ae77e1ba8df920d6db5cf3b99b325966e1d043e6..ea0d1d2bb7db15381d43d2bd95d4967f8e6c445a 100644 (file)
@@ -259,6 +259,9 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){
 
        login_timeout();
 
+       if (!$_SESSION["wa_current_user"]->old_db)
+               include_once($path_to_root . '/company/'.user_company().'/installed_extensions.php');
+
        install_hooks();
 
        if (!$_SESSION["wa_current_user"]->logged_in())
@@ -293,9 +296,6 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){
        } else
                set_global_connection();
 
-       if (!$_SESSION["wa_current_user"]->old_db)
-               include_once($path_to_root . '/company/'.user_company().'/installed_extensions.php');
-
        if (!isset($_SESSION["App"])) {
                $_SESSION["App"] = new front_accounting();
                $_SESSION["App"]->init();