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");
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';
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.
37 $sql_trail = 0; // save all sql queries in sql_trail
38 $select_trail = 0; // track also SELECT queries
41 error_reporting(E_ALL);
42 ini_set("display_errors", "On");
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");
51 if($error_logfile != '') {
52 ini_set("error_log", $error_logfile);
53 ini_set("ignore_repeated_errors", "On");
54 ini_set("log_errors", "On");
57 $app_title = "FrontAccounting";
58 // application version
59 $version = "2.2m5 CVS";
61 // Build for development purposes
62 $build_version = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));
65 $power_by = "FrontAccounting";
66 $power_url = "http://frontaccounting.net";
68 /* use popup windows for views */
69 $use_popup_windows = 1;
71 /* use date picker for all date fields */
74 /* use Audit Trails in GL */
77 /* use old style convert (income and expense in BS, PL) */
78 $use_oldstyle_convert = 0;
80 /* Integrated base Wiki Help URL or null if not used */
81 //$help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
82 $help_base_url = null;
84 /* per user data/cache directory */
85 $comp_path = $path_to_root.'/company';
87 /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
90 /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
91 2 = Islamic used by other arabic nations */
94 /* email stock location if order below reorder-level */
95 $loc_notification = 0;
97 /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
98 $print_invoice_no = 0;
100 $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
101 $dateseps = array("/", ".", "-", " ");
102 $thoseps = array(",", ".", " ");
103 $decseps = array(".", ",");
105 $pagesizes = array("Letter", "A4"); // default PDF pagesize
107 /* Default border and spacing for tables */
108 /* Should be moved to CSS */
110 $table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
111 $table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
113 /* Accounts Payable */
114 /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
115 If this parameter is checked the proportion by which the purchase invoice is an overcharge
116 referred to before reporting an error */
118 $check_qty_charged_vs_del_qty = true;
120 /* System check to see if price charged on purchase invoices exceeds the purchase order price.
121 If this parameter is checked the proportion by which the purchase invoice is an overcharge
122 referred to before reporting an error */
124 $check_price_charged_vs_order_price = True;
126 $config_allocation_settled_allowance = 0.005;
128 // Internal configurable variables
129 //-----------------------------------------------------------------------------------
131 /* Whether to display the demo login and password or not */
133 $allow_demo_mode = false;
135 /* for uploaded item pictures */
138 $max_image_size = 500;
140 /* skin for Business Graphics, 1, 2 or 3 */
144 Before upgrade from pre-2.2 FA you have to move here your customized
145 security roles definitions. If you have used standard roles, you
146 can simply uncomment following two arrays. After upgrade both arrays need
147 to be deleted or commented out. You may wish to change user roles to
148 new better defined in Users Setup. Old not used roles can be set inactive
151 /* Standard FA2.1 Security Group definitions
153 $security_headings = array(
156 _("System Administrator"),
159 $security_groups = array(
161 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
162 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
166 //MySQL Backup and Restore Settings
168 if(isset($_SESSION["wa_current_user"])) {
169 define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
171 // static js files path
172 $js_path = $path_to_root.'/js/';
173 // standard external js scripts included in all files
174 $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
175 // additional js source included in header
176 $js_lib = $js_userlib = array();
178 if (!defined('ICON_EDIT'))
180 define("ICON_EDIT", "edit.gif");
181 define("ICON_DELETE", "delete.gif");
182 define("ICON_ADD", "ok.gif");
183 define("ICON_UPDATE", "ok.gif");
184 define("ICON_OK", "ok.gif");
185 define("ICON_CANCEL", "cancel.png");
186 define("ICON_GL", "gl.png");
187 define("ICON_PRINT", "print.png");
188 define("ICON_PDF", "pdf.gif");
189 define("ICON_DOC", "invoice.gif");
190 define("ICON_CREDIT", "credit.gif");
191 define("ICON_RECEIVE", "receive.gif");
192 define("ICON_DOWN", "download.gif");
193 define("ICON_MONEY", "money.png");
194 define("ICON_REMOVE", "remove.png");
195 define("ICON_REPORT", "report.png");
196 define("ICON_VIEW", "view.gif");
197 define("ICON_SUBMIT", "ok.gif");
198 define("ICON_ESCAPE", "escape.png");