Merged changes form stabel branch up to the current state (2.3.22+).
[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
24         if (!ini_get('date.timezone'))
25        ini_set('date.timezone', 'Europe/Berlin');
26
27         // Log file for error/warning messages. Should be set to any location
28         // writable by www server. When set to empty string logging is switched off. 
29         // Special value 'syslog' can be used for system logger usage (see php manual).
30         //$error_logfile = '';
31         $error_logfile = dirname(__FILE__).'/tmp/errors.log';
32         $debug                  = 1;    // show sql on database errors
33
34         $show_sql               = 0;    // show all sql queries in page footer for debugging purposes
35         $go_debug               = 0;    // set to 1 for basic debugging, or 2 to see also backtrace after failure.
36         $pdf_debug              = 0;    // display pdf source instead reports for debugging when $go_debug!=0
37         // set $sql_trail to 1 only if you want to perform bugtracking sql trail
38         // Warning: this produces huge amount of data in sql_trail table.
39         // Don't forget switch the option off and flush the table manually after 
40         // trail, or your future backup files are overloaded with unneeded data.
41         //
42         $sql_trail              = 0; // save all sql queries in sql_trail
43         $select_trail   = 0; // track also SELECT queries
44         if ($go_debug > 0)
45         {
46                 error_reporting(-1);
47                 ini_set("display_errors", "On");
48         }
49         else
50         {
51                 error_reporting(E_USER_WARNING|E_USER_ERROR|E_USER_NOTICE);
52                 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
53                 ini_set("display_errors", "On");
54         }
55
56         if($error_logfile != '') {
57                 ini_set("error_log", $error_logfile);
58                 ini_set("ignore_repeated_errors", "On");
59                 ini_set("log_errors", "On");
60         }               
61         // Main Title
62         $app_title = "FrontAccounting";
63
64         // Build for development purposes
65         $build_version  = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));
66
67         // Powered by
68         $power_by               = "FrontAccounting";
69         $power_url              = "http://frontaccounting.com";
70
71         /* No check on edit conflicts. Maybe needed to be set to 1 in certains Windows Servers */
72         $no_check_edit_conflicts = 0;
73         
74         /* Do not print zero lines amount of 0.00 in Sales Documents if service item. 1 = do not */
75         $no_zero_lines_amount = 1;
76
77         /* Use icon for editkey (=true) right of combobox. 1 = use, 0 = do not use */
78         $use_icon_for_editkey = 0;
79
80         /* Creates automatic a default branch with contact. Value 0 do not create auto branch */
81         $auto_create_branch = 1;
82
83         /* Save Report selections (a value > 0 means days to save. 0 = no save) */
84         $save_report_selections = 0;
85
86         /* use popup windows for views */
87         $use_popup_windows = 1;
88
89         /* use date picker for all date fields */
90         $use_date_picker = 1;
91
92         /* use Audit Trails in GL */
93         /* This variable is deprecated. Setting this to 1, will stamp the user name in the memo fields in GL */
94         /* This has been superseded with built in Audit Trail */
95         $use_audit_trail = 0;
96
97         /* $show_voiced_gl_trans = 0, setting this to 1 will show the voided gl trans */
98         $show_voided_gl_trans = 0;
99
100         /* use old style convert (income and expense in BS, PL) */
101         $use_oldstyle_convert = 0;
102
103         /* show users online discretely in the footer */
104         $show_users_online = 0;
105
106         /* show item codes on purchase order */
107         $show_po_item_codes = 0;
108
109         /* default print destination. 0 = PDF/Printer, 1 = Excel */
110         $def_print_destination = 0;
111
112         /* default print orientation. 0 = Portrait, 1 = Landscape */
113         $def_print_orientation = 0;
114
115         // Wiki context help configuration
116         // If your help wiki use translated page titles uncomment next line
117         // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions
118         $old_style_help = 0;
119         //      locally installed wiki module
120         // $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
121         //      context help feed from frontaccounting.com
122         // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.';
123         //      not used
124         $help_base_url = null;
125
126         /* per user data/cache directory */
127         $comp_path = $path_to_root.'/company';
128
129         /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
130         $accounts_alpha = 0;
131
132         /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
133         2 = Islamic used by other arabic nations. 3 = traditional, but where non-workday is Friday and start of week is Saturday */
134         $date_system = 0;
135
136         /* email stock location if order below reorder-level */
137         /* Remember to set an email on the Location(s). */
138         $loc_notification = 0;
139
140         /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
141         $print_invoice_no = 0;
142
143         /* 1 = print Subtotal tax excluded, tax and Total tax included */
144         $alternative_tax_include_on_docs = 0;
145
146         /* suppress tax rates on documents. 0 = no, 1 = yes. */
147         $suppress_tax_rates = 0;
148
149         /* allow reopening closed transactions */
150         $allow_gl_reopen = 0;
151
152         $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD","MmmDDYYYY", "DDMmmYYYY", "YYYYMmmDD");
153         $dateseps               = array("/", ".", "-", " ");
154         $thoseps                = array(",", ".", " ");
155         $decseps                = array(".", ",");
156
157         /* default dateformats and dateseps indexes used before user login */
158         $dflt_date_fmt = 0;
159         $dflt_date_sep = 0;
160
161         /* default PDF pagesize taken from /reporting/includes/tcpdf.php */
162         $pagesizes              = array("Letter", "A4");
163
164         /* Accounts Payable */
165         /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
166            If this parameter is checked the proportion by which the purchase invoice is an overcharge
167            referred to before reporting an error */
168
169         $check_qty_charged_vs_del_qty = true;
170
171         /* System check to see if price charged on purchase invoices exceeds the purchase order price.
172            If this parameter is checked the proportion by which the purchase invoice is an overcharge
173            referred to before reporting an error */
174
175         $check_price_charged_vs_order_price = True;
176
177         $config_allocation_settled_allowance = 0.005;
178
179         /* Show average costed values instead of fixed standard cost in report, Inventory Valuation Report */
180         $use_costed_values = 0; 
181         
182         /* Allow negative prices for dummy/service items. To be moved to GL db settings */
183         $allow_negative_prices = 1;
184
185         /* Show menu category icons in core themes */
186         $show_menu_category_icons = 1;
187         
188         // Internal configurable variables
189         //-----------------------------------------------------------------------------------
190
191         /* Whether to display the demo login and password or not */
192
193         $allow_demo_mode = false;
194
195     /* Whether to allow sending new password by e-mail */
196     $allow_password_reset = false;
197
198     /* Print Item Images on Sales Quotations. Set to 1 if so. */
199     $print_item_images_on_quote = 0;
200
201         /* for uploaded item pictures */
202         $pic_width              = 80;
203         $pic_height     = 50;
204         $max_image_size = 500;
205
206         /* skin for Business Graphics. 1 = Office, 2 = Matrix, or 3 = Spring. 
207            Pallete skin attributes set in reporting/includes/class.graphic.inc */
208         $graph_skin     = 1;
209
210         /* UTF-8 font for Business Graphics. Copy it to /reporting/fonts/ folder. */
211         $UTF8_fontfile  = "FreeSans.ttf";
212
213 /*      
214         Before upgrade from pre-2.2 FA you have to move here your customized
215         security roles definitions. If you have used standard roles, you
216         can simply uncomment following two arrays. After upgrade both arrays need 
217         to be deleted or commented out. You may wish to change user roles to
218         new better defined in Users Setup. Old not used roles can be set inactive 
219         or deleted.
220 */
221 /* Standard FA2.1 Security Group definitions
222
223         $security_headings = array(
224                         _("Inquiries"),
225                         _("Accountant"),
226                         _("System Administrator"),
227         );
228
229         $security_groups = array(
230                         array(1,2),
231                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
232                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
233         );
234 */
235
236         //MySQL Backup and Restore Settings
237
238 if(isset($_SESSION["wa_current_user"])) {
239         define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
240 }
241         // static js files path
242         $js_path = $path_to_root.'/js/';
243         // standard external js scripts included in all files
244         $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
245         // additional js source included in header
246         $js_lib = $js_userlib = array();
247
248 /* 
249         Display a dropdown select box for choosing Company to login if false.
250         Show a blank editbox only if true where the Company NickName
251         will have to be manually entered. This is when privacy is needed.
252 */
253 $text_company_selection  = false;
254
255 /*  Should FA hide menu items (Applications, Modules, and Actions) from the user if they don't have access to them? 
256     0 for no       1 for yes
257 */
258
259         $hide_inaccessible_menu_items = 0;
260
261 /*
262         Brute force prevention.
263         $login_delay seconds delay is required between login attempts after $login_max_attemps failed logins.
264         Set $login_delay to 0 to disable the feature (not recommended)
265 */
266 $login_delay = 30;
267 $login_max_attempts = 10;
268
269 /*
270         Choose Exchange Rate Provider
271         Default is ECB for backwards compatibility
272 */
273 $xr_providers = array("ECB", "YAHOO", "GOOGLE", "BLOOMBERG");
274 $dflt_xr_provider = 0;
275
276 /*
277         Set to true when remote service is authoritative source of exchange rates, and can be stored automatically without
278         manual edition. Otherwise exrate is stored on first new currency transaction of the day.
279 */
280 $xr_provider_authoritative = false;
281
282 /*
283         Optional sorting sales documents lines during edition according to item code
284 */
285 $sort_sales_items = false;
286
287 /*
288         Trial Balance opening balance presentation option.
289         When set to true past years part of opening balance is cleared.
290 */
291 $clear_trial_balance_opening = false;
292
293 ?>