Fixed ajax support for multiply selects.
[fa-stable.git] / config.default.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     //--------------------------------------------------
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) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
22         die("Restricted access");
23         // Log file for error/warning messages. Should be set to any location
24         // writable by www server. When set to empty string logging is switched off. 
25         // Special value 'syslog' can be used for system logger usage (see php manual).
26         //$error_logfile = '';
27         $error_logfile = dirname(__FILE__).'/tmp/errors.log';
28         $debug                  = 1;
29         $show_sql               = 0;
30         $go_debug               = 1;
31         $pdf_debug              = 0;
32         // set $sql_trail to 1 only if you want to perform bugtracking sql trail
33         // Warning: this produces huge amount of data in sql_trail table.
34         // Don't forget switch the option off and flush the table manually after 
35         // trail, or your future backup files are overloaded with unneeded data.
36         //
37         $sql_trail              = 0; // save all sql queries in sql_trail
38         $select_trail   = 0; // track also SELECT queries
39         if ($go_debug == 1)
40         {
41                 error_reporting(E_ALL);
42                 ini_set("display_errors", "On");
43         }
44         else
45         {
46                 error_reporting(E_USER_WARNING|E_USER_ERROR|E_USER_NOTICE);
47                 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
48                 ini_set("display_errors", "On");
49         }
50
51         if($error_logfile != '') {
52                 ini_set("error_log", $error_logfile);
53                 ini_set("ignore_repeated_errors", "On");
54                 ini_set("log_errors", "On");
55         }               
56         // Main Title
57         $app_title = "FrontAccounting";
58         // application version
59         $version                = "2.2 RC";
60
61         // Build for development purposes
62         $build_version  = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));
63
64         // Powered by
65         $power_by               = "FrontAccounting";
66         $power_url              = "http://frontaccounting.net";
67
68         /* use popup windows for views */
69         $use_popup_windows = 1;
70
71         /* use date picker for all date fields */
72         $use_date_picker = 1;
73
74         /* use Audit Trails in GL */
75         $use_audit_trail = 0;
76
77         /* use old style convert (income and expense in BS, PL) */
78         $use_oldstyle_convert = 0;
79
80         /* show users online discretely in the footer */
81         $show_users_online = 0;
82
83         /* Integrated base Wiki Help URL or null if not used */
84         //$help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
85         $help_base_url = null;
86
87         /* per user data/cache directory */
88         $comp_path = $path_to_root.'/company';
89
90         /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
91         $accounts_alpha = 0;
92
93         /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
94         2 = Islamic used by other arabic nations */
95         $date_system = 0;
96
97         /* email stock location if order below reorder-level */
98         $loc_notification = 0;
99
100         /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
101         $print_invoice_no = 0;
102
103         $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
104         $dateseps               = array("/", ".", "-", " ");
105         $thoseps                = array(",", ".", " ");
106         $decseps                = array(".", ",");
107
108         $pagesizes              = array("Letter", "A4"); // default PDF pagesize
109
110         /* Default border and spacing for tables */
111         /* Should be moved to CSS */
112
113         if (!isset($_SESSION['bordercolor']))
114                 $_SESSION['bordercolor'] = "#8cacbb";
115         $table_style    = "cellpadding=3 border=1 bordercolor='".$_SESSION['bordercolor']."' class='tablestyle'";
116         $table_style2   = "cellpadding=3 border=1 bordercolor='#cccccc' class='tablestyle2'";
117
118         /* Accounts Payable */
119         /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
120         If this parameter is checked the proportion by which the purchase invoice is an overcharge
121         referred to before reporting an error */
122
123         $check_qty_charged_vs_del_qty = true;
124
125         /* System check to see if price charged on purchase invoices exceeds the purchase order price.
126         If this parameter is checked the proportion by which the purchase invoice is an overcharge
127         referred to before reporting an error */
128
129         $check_price_charged_vs_order_price = True;
130
131         $config_allocation_settled_allowance = 0.005;
132
133         // Internal configurable variables
134         //-----------------------------------------------------------------------------------
135
136         /* Whether to display the demo login and password or not */
137
138         $allow_demo_mode = false;
139
140         /* for uploaded item pictures */
141         $pic_width              = 80;
142         $pic_height     = 50;
143         $max_image_size = 500;
144
145         /* skin for Business Graphics, 1, 2 or 3 */
146         $graph_skin     = 1;
147
148 /*      
149         Before upgrade from pre-2.2 FA you have to move here your customized
150         security roles definitions. If you have used standard roles, you
151         can simply uncomment following two arrays. After upgrade both arrays need 
152         to be deleted or commented out. You may wish to change user roles to
153         new better defined in Users Setup. Old not used roles can be set inactive 
154         or deleted.
155 */
156 /* Standard FA2.1 Security Group definitions
157
158         $security_headings = array(
159                         _("Inquiries"),
160                         _("Accountant"),
161                         _("System Administrator"),
162         );
163
164         $security_groups = array(
165                         array(1,2),
166                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
167                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
168         );
169 */
170
171         //MySQL Backup and Restore Settings
172
173 if(isset($_SESSION["wa_current_user"])) {
174         define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
175 }
176         // static js files path
177         $js_path = $path_to_root.'/js/';
178         // standard external js scripts included in all files
179         $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
180         // additional js source included in header
181         $js_lib = $js_userlib = array();
182
183 if (!defined('ICON_EDIT'))
184 {
185         define("ICON_EDIT", "edit.gif");        
186         define("ICON_DELETE", "delete.gif");    
187         define("ICON_ADD", "ok.gif");   
188         define("ICON_UPDATE", "ok.gif");        
189         define("ICON_OK", "ok.gif");    
190         define("ICON_CANCEL", "cancel.png");    
191         define("ICON_GL", "gl.png");    
192         define("ICON_PRINT", "print.png");      
193         define("ICON_PDF", "pdf.gif");  
194         define("ICON_DOC", "invoice.gif");      
195         define("ICON_CREDIT", "credit.gif");    
196         define("ICON_RECEIVE", "receive.gif");  
197         define("ICON_DOWN", "download.gif");    
198         define("ICON_MONEY", "money.png");      
199         define("ICON_REMOVE", "remove.png");    
200         define("ICON_REPORT", "report.png");    
201         define("ICON_VIEW", "view.gif");        
202         define("ICON_SUBMIT", "ok.gif");
203         define("ICON_ESCAPE", "escape.png");    
204 }
205 ?>