f4dace29603086197c6cb89441548ee22ce7fef7
[fa-stable.git] / applications / dimensions.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         include_once("./modules/installed_modules.php");
13         class dimensions_app extends application
14         {
15                 function dimensions_app()
16                 {
17                         global $installed_modules;
18                         $dim = get_company_pref('use_dimension');
19                         $this->application("proj",_("Dimensions"));
20
21                         if ($dim > 0)
22                         {
23                                 $this->add_module(_("Transactions"));
24                                 $this->add_lapp_function(0, _("Dimension &Entry"),"dimensions/dimension_entry.php?");
25                                 $this->add_lapp_function(0, _("&Outstanding Dimensions"),"dimensions/inquiry/search_dimensions.php?outstanding_only=1");
26
27                                 $this->add_module(_("Inquiries and Reports"));
28                                 $this->add_lapp_function(1, _("Dimension &Inquiry"),"dimensions/inquiry/search_dimensions.php?");
29
30                                 $this->add_rapp_function(1, _("Dimension &Reports"),"reporting/reports_main.php?Class=4");
31                                 if (count($installed_modules) > 0)
32                                 {
33                                         $i = 0;
34                                         foreach ($installed_modules as $mod)
35                                         {
36                                                 if ($mod["tab"] == "proj")
37                                                 {
38                                                         if ($i++ == 0)
39                                                                 $this->add_module(_("Maintenance"));
40                                                         $this->add_rapp_function(2, $mod["name"], "modules/".$mod["path"]."/".$mod["filename"]."?");
41                                                 }
42                                         }
43                                 }
44                         }
45                 }
46         }
47
48
49 ?>