Data picker omitted in kbd tabbing sequence
[fa-stable.git] / config.php
1 <?php
2         /*--------------------------------------------------\
3         |               |               | config.php                    |
4         |---------------------------------------------------|
5         | FrontAccounting                                                                       |
6         | http://frontaccounting.com/                                           |
7         | by FrontAccounting                                            |
8         |---------------------------------------------------|
9         |                                                   |
10         \--------------------------------------------------*/
11
12         //--------------------------------------------------
13
14         // User configurable variables
15         //---------------------------------------------------
16
17         /*Show debug messages returned from an error on the page.
18         Debugging info level also determined by settings in PHP.ini
19         if $debug=1 show debugging info, dont show if $debug=0 */
20
21 if (!isset($path_to_root))
22 //if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
23         die("Restricted access");
24
25         $debug                  = 1;
26         $show_sql               = 0;
27         $go_debug               = 1;
28         if ($go_debug == 1)
29         {
30                 error_reporting(E_ALL);
31                 ini_set("display_errors", "On");
32         }
33         else
34         {
35                 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
36                 ini_set("display_errors", "Off");
37         }
38         // Main Title
39         $app_title = "FrontAccounting";
40         // application version
41         $version                = "2.0 Pre Alpha";
42
43         // Build for development purposes
44         $build_version  = "2";
45
46         // Powered by
47         $power_by               = "FrontAccounting";
48         $power_url              = "http://frontaccounting.net";
49
50         /* use popup windows for views */
51         $use_popup_windows = 1;
52
53         /* use date picker for all date fields */
54         $use_date_picker = 1;
55
56         /* use Audit Trails in GL */
57         $use_audit_trail = 0;
58
59         /* Integrated base Wiki Help URL or null if not used */
60         $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
61
62         /* per user data/cache directory */
63         $comp_path = $path_to_root.'/company';
64         
65         /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
66         $accounts_alpha = 0;
67
68         /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
69         2 = Islamic used by other arabic nations */
70         $date_system = 0;
71
72         /* email stock location if order below reorder-level */
73         $loc_notification = 0;
74
75         /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
76         $print_invoice_no = 0;
77
78         $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
79         $dateseps               = array("/", ".", "-", " ");
80         $thoseps                = array(",", ".", " ");
81         $decseps                = array(".", ",");
82
83         $pagesizes              = array("Letter", "A4"); // default PDF pagesize
84
85         /* Default border and spacing for tables */
86         /* Should be moved to CSS */
87
88         $table_style    = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
89         $table_style2   = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
90
91         /* Accounts Payable */
92         /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
93         If this parameter is checked the proportion by which the purchase invoice is an overcharge
94         referred to before reporting an error */
95
96         $check_qty_charged_vs_del_qty = true;
97
98         /* System check to see if price charged on purchase invoices exceeds the purchase order price.
99         If this parameter is checked the proportion by which the purchase invoice is an overcharge
100         referred to before reporting an error */
101
102         $check_price_charged_vs_order_price = True;
103
104         $config_allocation_settled_allowance = 0.005;
105
106         // Internal configurable variables
107         //-----------------------------------------------------------------------------------
108
109         /* Whether to display the demo login and password or not */
110
111         $allow_demo_mode = false;
112
113         /* for uploaded item pictures */
114         $pic_width              = 80;
115         $pic_height     = 50;
116         $max_image_size = 500;
117
118         /* skin for Business Graphics, 1, 2 or 3 */
119         $graph_skin     = 1;
120
121         /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
122         the areas of functionality accessible can be modified.
123         Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
124         Each script has a particular security category associated with it.
125         If the security setting of the page is contained in the security group as determined by the access level then the user will be allowed access.
126         Each page has a $page_security = x; variable
127         This value is compared to contents of the array applicable which is based on the access level of the user.
128         Access authorisation is checked in header.inc this is where _SESSION["AccessLevel"] is the index of the security_groups array. If you wish to add more security groups with then you must add a new SecurityHeading to the security_headings array
129         and a new array of Security categories to the Security Groups array
130         This mechanism allows more fine grained control of access
131         security_groups is an array of arrays
132         The index is the order in which the array of allowed pages is defined new ones can be defined at will
133         or by changing the numbers in each array the security access can be tailored. These numbers need to read
134         in conjunction with the Page Security index
135         */
136
137         $security_headings = array(
138                         _("Inquiries"),
139                         _("Accountant"),
140                         _("System Administrator"),
141         );
142
143         $security_groups = array(
144                         array(1,2),
145                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
146                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16),
147         );
148
149         /*
150         System tabs. This variable should be in future included from separate file for extended module manager
151         */
152         $applications = array (
153                 'orders' => _("Sales"),
154                 'AP'=>_("Purchases"),
155                 'stock'=> _("Items and Inventory"),
156                 'manuf'=> _("Manufacturing"),
157                 'proj'=>_("Dimensions"),
158                 'GL'=>_("Banking and General Ledger"),
159                 'system'=>_("Setup")
160         );
161         /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
162         $def_app = "orders";
163
164
165         //MySQL Backup and Restore Settings
166
167 if(isset($_SESSION["wa_current_user"])) {
168         define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
169 }
170         // static js files path
171         $js_path = $path_to_root.'/js/';
172         // standard external js scripts included in all files
173         $js_static = array('behaviour.js');
174         // additional js source included in header
175         $js_lib = $js_userlib = array();
176         
177 ?>