Updated security areas for all menu options.
[fa-stable.git] / applications / inventory.php
1 <?php
2 /**********************************************************************
3     Copyright (C) FrontAccounting, LLC.
4         Released under the terms of the GNU General Public License, GPL, 
5         as published by the Free Software Foundation, either version 3 
6         of the License, or (at your option) any later version.
7     This program is distributed in the hope that it will be useful,
8     but WITHOUT ANY WARRANTY; without even the implied warranty of
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
10     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 class inventory_app extends application 
13 {
14         function inventory_app() 
15         {
16                 global $installed_extensions;
17                 $this->application("stock",_("&Items and Inventory"));
18
19                 $this->add_module(_("Transactions"));
20                 $this->add_lapp_function(0, _("Inventory Location &Transfers"),
21                         "inventory/transfers.php?NewTransfer=1", 'SA_LOCATIONTRANSFER');
22                 $this->add_lapp_function(0, _("Inventory &Adjustments"),
23                         "inventory/adjustments.php?NewAdjustment=1", 'SA_INVENTORYADJUSTMENT');
24
25                 $this->add_module(_("Inquiries and Reports"));
26                 $this->add_lapp_function(1, _("Inventory Item &Movements"),
27                         "inventory/inquiry/stock_movements.php?", 'SA_ITEMSTRANSVIEW');
28                 $this->add_lapp_function(1, _("Inventory Item &Status"),
29                         "inventory/inquiry/stock_status.php?", 'SA_ITEMSSTATVIEW');
30                 $this->add_rapp_function(1, _("Inventory &Reports"),
31                         "reporting/reports_main.php?Class=2", 'SA_ITEMSTRANSVIEW');
32
33                 $this->add_module(_("Maintenance"));
34                 $this->add_lapp_function(2, _("&Items"),
35                         "inventory/manage/items.php?", 'SA_ITEM');
36                 $this->add_lapp_function(2, _("&Foreign Item Codes"),
37                         "inventory/manage/item_codes.php?", 'SA_FORITEMCODE');
38                 $this->add_lapp_function(2, _("Sales &Kits"),
39                         "inventory/manage/sales_kits.php?", 'SA_SALESKIT');
40                 $this->add_lapp_function(2, _("Item &Categories"),
41                         "inventory/manage/item_categories.php?", 'SA_ITEMCATEGORY');
42                 $this->add_lapp_function(2, _("Inventory &Locations"),
43                         "inventory/manage/locations.php?", 'SA_INVENTORYLOCATION');
44                 $this->add_rapp_function(2, _("Inventory &Movement Types"),
45                         "inventory/manage/movement_types.php?", 'SA_INVENTORYMOVETYPE');
46                 $this->add_rapp_function(2, _("&Units of Measure"),
47                         "inventory/manage/item_units.php?", 'SA_UOM');
48                 $this->add_rapp_function(2, _("&Reorder Levels"),
49                         "inventory/reorder_level.php?", 'SA_REORDER');
50
51                 $this->add_module(_("Pricing and Costs"));
52                 $this->add_lapp_function(3, _("Sales &Pricing"),
53                         "inventory/prices.php?", 'SA_SALESPRICE');
54                 $this->add_lapp_function(3, _("Purchasing &Pricing"),
55                         "inventory/purchasing_data.php?", 'SA_PURCHASEPRICING');
56                 $this->add_rapp_function(3, _("Standard &Costs"),
57                         "inventory/cost_update.php?", 'SA_STANDARDCOST');
58                 if (count($installed_extensions) > 0)
59                 {
60                         foreach ($installed_extensions as $mod)
61                         {
62                                 if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "stock")
63                                         $this->add_rapp_function(2, $mod["title"], 
64                                                 "modules/".$mod["path"]."/".$mod["filename"]."?",
65                                                 isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' );
66                         }
67                 }
68         }
69 }
70
71
72 ?>