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 //--------------------------------------------------
14 // User configurable variables
15 //---------------------------------------------------
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 */
21 if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
22 die("Restricted access");
24 if (!ini_get('date.timezone'))
25 ini_set('date.timezone', 'Europe/Berlin');
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
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.
42 $sql_trail = 0; // save all sql queries in sql_trail
43 $select_trail = 0; // track also SELECT queries
47 ini_set("display_errors", "On");
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");
56 if($error_logfile != '') {
57 ini_set("error_log", $error_logfile);
58 ini_set("ignore_repeated_errors", "On");
59 ini_set("log_errors", "On");
62 $app_title = "FrontAccounting";
64 // Build for development purposes
65 $build_version = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));
68 $power_by = "FrontAccounting";
69 $power_url = "http://frontaccounting.com";
71 /* No check on edit conflicts. Maybe needed to be set to 1 in certains Windows Servers */
72 $no_check_edit_conflicts = 0;
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;
77 /* Use icon for editkey (=true) right of combobox. 1 = use, 0 = do not use */
78 $use_icon_for_editkey = 0;
80 /* Creates automatic a default branch with contact. Value 0 do not create auto branch */
81 $auto_create_branch = 1;
83 /* Save Report selections (a value > 0 means days to save. 0 = no save) */
84 $save_report_selections = 0;
86 /* use popup windows for views */
87 $use_popup_windows = 1;
89 /* use date picker for all date fields */
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 */
97 /* $show_voiced_gl_trans = 0, setting this to 1 will show the voided gl trans */
98 $show_voided_gl_trans = 0;
100 /* use old style convert (income and expense in BS, PL) */
101 $use_oldstyle_convert = 0;
103 /* show users online discretely in the footer */
104 $show_users_online = 0;
106 /* show item codes on purchase order */
107 $show_po_item_codes = 0;
109 /* default print destination. 0 = PDF/Printer, 1 = Excel */
110 $def_print_destination = 0;
112 // Wiki context help configuration
113 // If your help wiki use translated page titles uncomment next line
114 // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions
116 // locally installed wiki module
117 // $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
118 // context help feed from frontaccounting.com
119 // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.';
121 $help_base_url = null;
123 /* per user data/cache directory */
124 $comp_path = $path_to_root.'/company';
126 /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
129 /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
130 2 = Islamic used by other arabic nations. 3 = traditional, but where non-workday is Friday and start of week is Saturday */
133 /* email stock location if order below reorder-level */
134 /* Remember to set an email on the Location(s). */
135 $loc_notification = 0;
137 /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
138 $print_invoice_no = 0;
140 /* 1 = print Subtotal tax excluded, tax and Total tax included */
141 $alternative_tax_include_on_docs = 0;
143 /* suppress tax rates on documents. 0 = no, 1 = yes. */
144 $suppress_tax_rates = 0;
146 $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD","MmmDDYYYY", "DDMmmYYYY", "YYYYMmmDD");
147 $dateseps = array("/", ".", "-", " ");
148 $thoseps = array(",", ".", " ");
149 $decseps = array(".", ",");
151 /* default dateformats and dateseps indexes used before user login */
155 /* default PDF pagesize taken from /reporting/includes/tcpdf.php */
156 $pagesizes = array("Letter", "A4");
158 /* Accounts Payable */
159 /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
160 If this parameter is checked the proportion by which the purchase invoice is an overcharge
161 referred to before reporting an error */
163 $check_qty_charged_vs_del_qty = true;
165 /* System check to see if price charged on purchase invoices exceeds the purchase order price.
166 If this parameter is checked the proportion by which the purchase invoice is an overcharge
167 referred to before reporting an error */
169 $check_price_charged_vs_order_price = True;
171 $config_allocation_settled_allowance = 0.005;
173 /* Allow negative prices for dummy/service items. To be moved to GL db settings */
174 $allow_negative_prices = 1;
176 /* Show menu category icons in core themes */
177 $show_menu_category_icons = 0;
179 // Internal configurable variables
180 //-----------------------------------------------------------------------------------
182 /* Whether to display the demo login and password or not */
184 $allow_demo_mode = false;
186 /* for uploaded item pictures */
189 $max_image_size = 500;
191 /* skin for Business Graphics. 1 = Office, 2 = Matrix, or 3 = Spring.
192 Pallete skin attributes set in reporting/includes/class.graphic.inc */
196 Before upgrade from pre-2.2 FA you have to move here your customized
197 security roles definitions. If you have used standard roles, you
198 can simply uncomment following two arrays. After upgrade both arrays need
199 to be deleted or commented out. You may wish to change user roles to
200 new better defined in Users Setup. Old not used roles can be set inactive
203 /* Standard FA2.1 Security Group definitions
205 $security_headings = array(
208 _("System Administrator"),
211 $security_groups = array(
213 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
214 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
218 //MySQL Backup and Restore Settings
220 if(isset($_SESSION["wa_current_user"])) {
221 define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
223 // static js files path
224 $js_path = $path_to_root.'/js/';
225 // standard external js scripts included in all files
226 $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
227 // additional js source included in header
228 $js_lib = $js_userlib = array();
230 if (!defined('ICON_EDIT'))
232 define("ICON_EDIT", "edit.gif");
233 define("ICON_DELETE", "delete.gif");
234 define("ICON_ADD", "ok.gif");
235 define("ICON_UPDATE", "ok.gif");
236 define("ICON_OK", "ok.gif");
237 define("ICON_CANCEL", "cancel.png");
238 define("ICON_GL", "gl.png");
239 define("ICON_PRINT", "print.png");
240 define("ICON_PDF", "pdf.gif");
241 define("ICON_DOC", "invoice.gif");
242 define("ICON_CREDIT", "credit.gif");
243 define("ICON_RECEIVE", "receive.gif");
244 define("ICON_DOWN", "download.gif");
245 define("ICON_MONEY", "money.png");
246 define("ICON_REMOVE", "remove.png");
247 define("ICON_REPORT", "report.png");
248 define("ICON_VIEW", "view.gif");
249 define("ICON_SUBMIT", "ok.gif");
250 define("ICON_ESCAPE", "escape.png");
254 Display a dropdown select box for choosing Company to login if false.
255 Show a blank editbox only if true where the Company NickName
256 will have to be manually entered. This is when privacy is needed.
258 $text_company_selection = false;
260 /* Should FA hide menu items (Applications, Modules, and Actions) from the user if they don't have access to them?
264 $hide_inaccessible_menu_items = 0;
267 Brute force prevention.
268 $login_delay seconds delay is required between login attempts after $login_max_attemps failed logins.
269 Set $login_delay to 0 to disable the feature (not recommended)
272 $login_max_attempts = 10;
275 Choose Exchange Rate Provider
276 Default is ECB for backwards compatibility
278 $xr_providers = array("ECB", "YAHOO", "GOOGLE", "BLOOMBERG");
279 $dflt_xr_provider = 0;