Added generic tags support; tags for dimensions/gl accounts.
[fa-stable.git] / applications / generalledger.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 general_ledger_app extends application 
13 {
14         function general_ledger_app() 
15         {
16                 global $installed_extensions;
17                 $this->application("GL",_("&Banking and General Ledger"));
18
19                 $this->add_module(_("Transactions"));
20                 $this->add_lapp_function(0, _("&Payments"),
21                         "gl/gl_bank.php?NewPayment=Yes", 'SA_PAYMENT');
22                 $this->add_lapp_function(0, _("&Deposits"),
23                         "gl/gl_bank.php?NewDeposit=Yes", 'SA_DEPOSIT');
24                 $this->add_lapp_function(0, _("Bank Account &Transfers"),
25                         "gl/bank_transfer.php?", 'SA_BANKTRANSFER');
26                 $this->add_rapp_function(0, _("&Journal Entry"),
27                         "gl/gl_journal.php?NewJournal=Yes", 'SA_JOURNALENTRY');
28                 $this->add_rapp_function(0, _("&Budget Entry"),
29                         "gl/gl_budget.php?", 'SA_BUDGETENTRY');
30                 $this->add_rapp_function(0, _("&Reconcile Bank Account"),
31                         "gl/bank_account_reconcile.php?", 'SA_RECONCILE');
32                         
33                 $this->add_module(_("Inquiries and Reports"));
34                 $this->add_lapp_function(1, _("&Journal Inquiry"),
35                         "gl/inquiry/journal_inquiry.php?", 'SA_GLANALYTIC');
36                 $this->add_lapp_function(1, _("GL Account &Inquiry"),
37                         "gl/inquiry/gl_account_inquiry.php?", 'SA_GLTRANSVIEW');
38                 $this->add_lapp_function(1, _("Bank Account &Inquiry"),
39                         "gl/inquiry/bank_inquiry.php?", 'SA_BANKTRANSVIEW');
40                 $this->add_lapp_function(1, _("Ta&x Inquiry"),
41                         "gl/inquiry/tax_inquiry.php?", 'SA_TAXREP');
42
43                 $this->add_rapp_function(1, _("Trial &Balance"),
44                         "gl/inquiry/gl_trial_balance.php?", 'SA_GLANALYTIC');
45                 $this->add_rapp_function(1, _("Banking &Reports"),
46                         "reporting/reports_main.php?Class=5", 'SA_BANKREP');
47                 $this->add_rapp_function(1, _("General Ledger &Reports"),
48                         "reporting/reports_main.php?Class=6", 'SA_GLREP');
49
50                 $this->add_module(_("Maintenance"));
51                 $this->add_lapp_function(2, _("Bank &Accounts"),
52                         "gl/manage/bank_accounts.php?", 'SA_BANKACCOUNT');
53                 $this->add_lapp_function(2, _("&Quick Entries"),
54                         "gl/manage/gl_quick_entries.php?", 'SA_QUICKENTRY');
55                 $this->add_lapp_function(2, _("Account &Tags"),
56                         "admin/tags.php?type=account", 'SA_GLACCOUNTTAGS');
57                 $this->add_lapp_function(2, "","");
58                 $this->add_lapp_function(2, _("&Currencies"),
59                         "gl/manage/currencies.php?", 'SA_CURRENCY');
60                 $this->add_lapp_function(2, _("&Exchange Rates"),
61                         "gl/manage/exchange_rates.php?", 'SA_EXCHANGERATE');
62
63                 $this->add_rapp_function(2, _("&GL Accounts"),
64                         "gl/manage/gl_accounts.php?", 'SA_GLACCOUNT');
65                 $this->add_rapp_function(2, _("GL Account &Groups"),
66                         "gl/manage/gl_account_types.php?", 'SA_GLACCOUNTGROUP');
67                 $this->add_rapp_function(2, _("GL Account &Classes"),
68                         "gl/manage/gl_account_classes.php?", 'SA_GLACCOUNTCLASS');
69                 if (count($installed_extensions) > 0)
70                 {
71                         foreach ($installed_extensions as $mod)
72                         {
73                                 if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "GL")
74                                         $this->add_rapp_function(2, $mod["title"], 
75                                                 "modules/".$mod["path"]."/".$mod["filename"]."?",
76                                                 isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' );
77                         }
78                 }
79         }
80 }
81
82
83 ?>