Rewritten extensions system to enable per company module/plugin
[fa-stable.git] / applications / inventory.php
index 449095292b37d78c5b8409f555d0c28ab8ca20e7..caeaf378d446dcde4c11cdf2751c773c04e899a7 100644 (file)
@@ -13,7 +13,7 @@
        {
                function inventory_app() 
                {
-                       global $installed_modules;
+                       global $installed_extensions;
                        $this->application("stock",_("&Items and Inventory"));
 
                        $this->add_module(_("Transactions"));
                        $this->add_lapp_function(3, _("Sales &Pricing"),"inventory/prices.php?");
                        $this->add_lapp_function(3, _("Purchasing &Pricing"),"inventory/purchasing_data.php?");
                        $this->add_rapp_function(3, _("Standard &Costs"),"inventory/cost_update.php?");
-                       if (count($installed_modules) > 0)
+                       if (count($installed_extensions) > 0)
                        {
-                               foreach ($installed_modules as $mod)
+                               foreach ($installed_extensions as $mod)
                                {
-                                       if ($mod["tab"] == "stock")
-                                               $this->add_rapp_function(2, $mod["name"], "modules/".$mod["path"]."/".$mod["filename"]."?");
+                                       if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "stock")
+                                               $this->add_rapp_function(2, $mod["title"], "modules/".$mod["path"]."/".$mod["filename"]."?");
                                }
                        }       
                }