Minor bug in currency
[fa-stable.git] / applications / inventory.php
index a268c60d86ab3fff70b3844ad7c464e83dee9760..caeaf378d446dcde4c11cdf2751c773c04e899a7 100644 (file)
@@ -1,12 +1,20 @@
 <?php
-
-       include_once("./modules/installed_modules.php");
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
        class inventory_app extends application 
        {
                function inventory_app() 
                {
-                       global $installed_modules;
-                       $this->application("stock",_("Items and Inventory"));
+                       global $installed_extensions;
+                       $this->application("stock",_("&Items and Inventory"));
 
                        $this->add_module(_("Transactions"));
                        $this->add_lapp_function(0, _("Inventory Location &Transfers"),"inventory/transfers.php?NewTransfer=1");
@@ -24,7 +32,6 @@
                        $this->add_lapp_function(2, _("Item &Categories"),"inventory/manage/item_categories.php?");
                        $this->add_lapp_function(2, _("Inventory &Locations"),"inventory/manage/locations.php?");
                        $this->add_rapp_function(2, _("Inventory &Movement Types"),"inventory/manage/movement_types.php?");
-                       $this->add_rapp_function(2, _("Item Ta&x Types"),"taxes/item_tax_types.php?");
                        $this->add_rapp_function(2, _("&Units of Measure"),"inventory/manage/item_units.php?");
                        $this->add_rapp_function(2, _("&Reorder Levels"),"inventory/reorder_level.php?");
 
                        $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"]."?");
                                }
                        }       
                }