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
14 function general_ledger_app()
16 global $installed_extensions;
17 $this->application("GL", _($this->help_context = "&Banking and General Ledger"));
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');
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 &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');
43 $this->add_rapp_function(1, _("Trial &Balance"),
44 "gl/inquiry/gl_trial_balance.php?", 'SA_GLANALYTIC');
45 $this->add_rapp_function(1, _("Balance &Sheet Drilldown"),
46 "gl/inquiry/balance_sheet.php?", 'SA_GLANALYTIC');
47 $this->add_rapp_function(1, _("&Profit and Loss Drilldown"),
48 "gl/inquiry/profit_loss.php?", 'SA_GLANALYTIC');
49 $this->add_rapp_function(1, _("Banking &Reports"),
50 "reporting/reports_main.php?Class=5", 'SA_BANKREP');
51 $this->add_rapp_function(1, _("General Ledger &Reports"),
52 "reporting/reports_main.php?Class=6", 'SA_GLREP');
54 $this->add_module(_("Maintenance"));
55 $this->add_lapp_function(2, _("Bank &Accounts"),
56 "gl/manage/bank_accounts.php?", 'SA_BANKACCOUNT');
57 $this->add_lapp_function(2, _("&Quick Entries"),
58 "gl/manage/gl_quick_entries.php?", 'SA_QUICKENTRY');
59 $this->add_lapp_function(2, _("Account &Tags"),
60 "admin/tags.php?type=account", 'SA_GLACCOUNTTAGS');
61 $this->add_lapp_function(2, "","");
62 $this->add_lapp_function(2, _("&Currencies"),
63 "gl/manage/currencies.php?", 'SA_CURRENCY');
64 $this->add_lapp_function(2, _("&Exchange Rates"),
65 "gl/manage/exchange_rates.php?", 'SA_EXCHANGERATE');
67 $this->add_rapp_function(2, _("&GL Accounts"),
68 "gl/manage/gl_accounts.php?", 'SA_GLACCOUNT');
69 $this->add_rapp_function(2, _("GL Account &Groups"),
70 "gl/manage/gl_account_types.php?", 'SA_GLACCOUNTGROUP');
71 $this->add_rapp_function(2, _("GL Account &Classes"),
72 "gl/manage/gl_account_classes.php?", 'SA_GLACCOUNTCLASS');
73 if (count($installed_extensions) > 0)
75 foreach ($installed_extensions as $mod)
77 if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "GL")
78 $this->add_rapp_function(2, $mod["title"],
79 "modules/".$mod["path"]."/".$mod["filename"]."?",
80 isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' );