Changed context help organization to enable use of central, multilanguage wiki.
[fa-stable.git] / applications / customers.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 customers_app extends application 
13 {
14         function customers_app() 
15         {
16                 global $installed_extensions;
17                 $this->application("orders", _($this->help_context = "&Sales"));
18         
19                 $this->add_module(_("Transactions"));
20                 $this->add_lapp_function(0, _("Sales &Quotation Entry"),
21                         "sales/sales_order_entry.php?NewQuotation=Yes", 'SA_SALESQUOTE');
22                 $this->add_lapp_function(0, _("Sales &Order Entry"),
23                         "sales/sales_order_entry.php?NewOrder=Yes", 'SA_SALESORDER');
24                 $this->add_lapp_function(0, _("Direct &Delivery"),
25                         "sales/sales_order_entry.php?NewDelivery=0", 'SA_SALESDELIVERY');
26                 $this->add_lapp_function(0, _("Direct &Invoice"),
27                         "sales/sales_order_entry.php?NewInvoice=0", 'SA_SALESINVOICE');
28                 $this->add_lapp_function(0, "","");
29                 $this->add_lapp_function(0, _("&Delivery Against Sales Orders"),
30                         "sales/inquiry/sales_orders_view.php?OutstandingOnly=1", 'SA_SALESDELIVERY');
31                 $this->add_lapp_function(0, _("&Invoice Against Sales Delivery"),
32                         "sales/inquiry/sales_deliveries_view.php?OutstandingOnly=1", 'SA_SALESINVOICE');
33
34                 $this->add_rapp_function(0, _("&Template Delivery"),
35                         "sales/inquiry/sales_orders_view.php?DeliveryTemplates=Yes", 'SA_SALESDELIVERY');
36                 $this->add_rapp_function(0, _("&Template Invoice"),
37                         "sales/inquiry/sales_orders_view.php?InvoiceTemplates=Yes", 'SA_SALESINVOICE');
38                 $this->add_rapp_function(0, _("&Create and Print Recurrent Invoices"),
39                         "sales/create_recurrent_invoices.php?", 'SA_SALESINVOICE');
40                 $this->add_rapp_function(0, "","");
41                 $this->add_rapp_function(0, _("Customer &Payments"),
42                         "sales/customer_payments.php?", 'SA_SALESPAYMNT');
43                 $this->add_rapp_function(0, _("Customer &Credit Notes"),
44                         "sales/credit_note_entry.php?NewCredit=Yes", 'SA_SALESCREDIT');
45                 $this->add_rapp_function(0, _("&Allocate Customer Payments or Credit Notes"),
46                         "sales/allocations/customer_allocation_main.php?", 'SA_SALESALLOC');
47
48                 $this->add_module(_("Inquiries and Reports"));
49                 $this->add_lapp_function(1, _("Sales Quotation I&nquiry"),
50                         "sales/inquiry/sales_orders_view.php?type=32", 'SA_SALESTRANSVIEW');
51                 $this->add_lapp_function(1, _("Sales Order &Inquiry"),
52                         "sales/inquiry/sales_orders_view.php?type=30", 'SA_SALESTRANSVIEW');
53                 $this->add_lapp_function(1, _("Customer Transaction &Inquiry"),
54                         "sales/inquiry/customer_inquiry.php?", 'SA_SALESTRANSVIEW');
55                 $this->add_lapp_function(1, "","");
56                 $this->add_lapp_function(1, _("Customer Allocation &Inquiry"),
57                         "sales/inquiry/customer_allocation_inquiry.php?", 'SA_SALESALLOC');
58
59                 $this->add_rapp_function(1, _("Customer and Sales &Reports"),
60                         "reporting/reports_main.php?Class=0", 'SA_SALESTRANSVIEW');
61
62                 $this->add_module(_("Maintenance"));
63                 $this->add_lapp_function(2, _("Add and Manage &Customers"),
64                         "sales/manage/customers.php?", 'SA_CUSTOMER');
65                 $this->add_lapp_function(2, _("Customer &Branches"),
66                         "sales/manage/customer_branches.php?", 'SA_CUSTOMER');
67                 $this->add_lapp_function(2, _("Sales &Groups"),
68                         "sales/manage/sales_groups.php?", 'SA_SALESGROUP');
69                 $this->add_lapp_function(2, _("Recurrent &Invoices"),
70                         "sales/manage/recurrent_invoices.php?", 'SA_SRECURRENT');
71                 $this->add_rapp_function(2, _("Sales T&ypes"),
72                         "sales/manage/sales_types.php?", 'SA_SALESTYPES');
73                 $this->add_rapp_function(2, _("Sales &Persons"),
74                         "sales/manage/sales_people.php?", 'SA_SALESMAN');
75                 $this->add_rapp_function(2, _("Sales &Areas"),
76                         "sales/manage/sales_areas.php?", 'SA_SALESAREA');
77                 $this->add_rapp_function(2, _("Credit &Status Setup"),
78                         "sales/manage/credit_status.php?", 'SA_CRSTATUS');
79                 if (count($installed_extensions) > 0)
80                 {
81                         foreach ($installed_extensions as $mod)
82                         {
83                                 if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "orders")
84                                         $this->add_rapp_function(2, $mod["title"], 
85                                                 "modules/".$mod["path"]."/".$mod["filename"]."?",
86                                                 isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' );
87                         }
88                 }
89         }
90 }
91
92
93 ?>