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 suppliers_app extends application
14 function suppliers_app()
16 global $installed_extensions;
17 $this->application("AP",_("&Purchases"));
19 $this->add_module(_("Transactions"));
20 $this->add_lapp_function(0, _("Purchase &Order Entry"),
21 "purchasing/po_entry_items.php?NewOrder=Yes", 'SA_PURCHASEORDER');
22 $this->add_lapp_function(0, _("&Outstanding Purchase Orders Maintenance"),
23 "purchasing/inquiry/po_search.php?", 'SA_SUPPTRANSVIEW');
24 $this->add_rapp_function(0, _("&Payments to Suppliers"),
25 "purchasing/supplier_payment.php?", 'SA_SUPPLIERPAYMNT');
26 $this->add_rapp_function(0, "","");
27 $this->add_rapp_function(0, _("Supplier &Invoices"),
28 "purchasing/supplier_invoice.php?New=1", 'SA_SUPPLIERINVOICE');
29 $this->add_rapp_function(0, _("Supplier &Credit Notes"),
30 "purchasing/supplier_credit.php?New=1", 'SA_SUPPLIERCREDIT');
31 $this->add_rapp_function(0, _("&Allocate Supplier Payments or Credit Notes"),
32 "purchasing/allocations/supplier_allocation_main.php?", 'SA_SUPPLIERALLOC');
34 $this->add_module(_("Inquiries and Reports"));
35 $this->add_lapp_function(1, _("Purchase Orders &Inquiry"),
36 "purchasing/inquiry/po_search_completed.php?", 'SA_SUPPTRANSVIEW');
37 $this->add_lapp_function(1, _("Supplier Transaction &Inquiry"),
38 "purchasing/inquiry/supplier_inquiry.php?", 'SA_SUPPTRANSVIEW');
39 $this->add_lapp_function(1, "","");
40 $this->add_lapp_function(1, _("Supplier Allocation &Inquiry"),
41 "purchasing/inquiry/supplier_allocation_inquiry.php?", 'SA_SUPPLIERALLOC');
43 $this->add_rapp_function(1, _("Supplier and Purchasing &Reports"),
44 "reporting/reports_main.php?Class=1", 'SA_SUPPTRANSVIEW');
46 $this->add_module(_("Maintenance"));
47 $this->add_lapp_function(2, _("&Suppliers"),
48 "purchasing/manage/suppliers.php?", 'SA_SUPPLIER');
49 if (count($installed_extensions) > 0)
51 foreach ($installed_extensions as $mod)
53 if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "AP")
54 $this->add_rapp_function(2, $mod["title"],
55 "modules/".$mod["path"]."/".$mod["filename"]."?",
56 isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' );