Merged changes from mai trunk up to 2.3.1
[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         /* Save Report selections (a value > 0 means days to save. 0 = no save) */
72         $save_report_selections = 0;
73
74         /* use popup windows for views */
75         $use_popup_windows = 1;
76
77         /* use date picker for all date fields */
78         $use_date_picker = 1;
79
80         /* use Audit Trails in GL */
81         $use_audit_trail = 0;
82
83         /* use old style convert (income and expense in BS, PL) */
84         $use_oldstyle_convert = 0;
85
86         /* show users online discretely in the footer */
87         $show_users_online = 0;
88
89         /* default print destination. 0 = PDF/Printer, 1 = Excel */
90         $def_print_destination = 0;
91
92         // Wiki context help configuration
93         // If your help wiki use translated page titles uncomment next line
94         // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions
95         //      locally installed wiki module
96         // $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
97         //      context help feed from frontaccounting.com
98         // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.';
99         //      not used
100         $help_base_url = null;
101
102         /* per user data/cache directory */
103         $comp_path = $path_to_root.'/company';
104
105         /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
106         $accounts_alpha = 0;
107
108         /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
109         2 = Islamic used by other arabic nations. 3 = traditional, but where non-workday is Friday and start of week is Saturday */
110         $date_system = 0;
111
112         /* email stock location if order below reorder-level */
113         $loc_notification = 0;
114
115         /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
116         $print_invoice_no = 0;
117
118         /* 1 = print Subtotal tax excluded, tax and Total tax included */
119         $alternative_tax_include_on_docs = 0;
120
121         /* suppress tax rates on documents. 0 = no, 1 = yes. */
122         $suppress_tax_rates = 0;
123         
124         $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
125         $dateseps               = array("/", ".", "-", " ");
126         $thoseps                = array(",", ".", " ");
127         $decseps                = array(".", ",");
128         // defalt dateformats and dateseps indexes used before user login
129         $dflt_date_fmt = 0;
130         $dflt_date_sep = 0;
131
132         $pagesizes              = array("Letter", "A4"); // default PDF pagesize
133
134         /* Accounts Payable */
135         /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
136         If this parameter is checked the proportion by which the purchase invoice is an overcharge
137         referred to before reporting an error */
138
139         $check_qty_charged_vs_del_qty = true;
140
141         /* System check to see if price charged on purchase invoices exceeds the purchase order price.
142         If this parameter is checked the proportion by which the purchase invoice is an overcharge
143         referred to before reporting an error */
144
145         $check_price_charged_vs_order_price = True;
146
147         $config_allocation_settled_allowance = 0.005;
148
149         /* Allow negative prices for dummy/service items. To be moved to GL db settings */
150         $allow_negative_prices = 1;
151
152         /* Show menu category icons in core themes */
153         $show_menu_category_icons = 0;
154         
155         // Internal configurable variables
156         //-----------------------------------------------------------------------------------
157
158         /* Whether to display the demo login and password or not */
159
160         $allow_demo_mode = false;
161
162         /* for uploaded item pictures */
163         $pic_width              = 80;
164         $pic_height     = 50;
165         $max_image_size = 500;
166
167         /* skin for Business Graphics, 1, 2 or 3 */
168         $graph_skin     = 1;
169
170 /*      
171         Before upgrade from pre-2.2 FA you have to move here your customized
172         security roles definitions. If you have used standard roles, you
173         can simply uncomment following two arrays. After upgrade both arrays need 
174         to be deleted or commented out. You may wish to change user roles to
175         new better defined in Users Setup. Old not used roles can be set inactive 
176         or deleted.
177 */
178 /* Standard FA2.1 Security Group definitions
179
180         $security_headings = array(
181                         _("Inquiries"),
182                         _("Accountant"),
183                         _("System Administrator"),
184         );
185
186         $security_groups = array(
187                         array(1,2),
188                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,16),
189                         array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,20),
190         );
191 */
192
193         //MySQL Backup and Restore Settings
194
195 if(isset($_SESSION["wa_current_user"])) {
196         define("BACKUP_PATH", $comp_path.'/'.user_company()."/backup/");
197 }
198         // static js files path
199         $js_path = $path_to_root.'/js/';
200         // standard external js scripts included in all files
201         $js_static = array('JsHttpRequest.js', 'behaviour.js', 'utils.js', 'inserts.js');
202         // additional js source included in header
203         $js_lib = $js_userlib = array();
204
205 if (!defined('ICON_EDIT'))
206 {
207         define("ICON_EDIT", "edit.gif");        
208         define("ICON_DELETE", "delete.gif");    
209         define("ICON_ADD", "ok.gif");   
210         define("ICON_UPDATE", "ok.gif");        
211         define("ICON_OK", "ok.gif");    
212         define("ICON_CANCEL", "cancel.png");    
213         define("ICON_GL", "gl.png");    
214         define("ICON_PRINT", "print.png");      
215         define("ICON_PDF", "pdf.gif");  
216         define("ICON_DOC", "invoice.gif");      
217         define("ICON_CREDIT", "credit.gif");    
218         define("ICON_RECEIVE", "receive.gif");  
219         define("ICON_DOWN", "download.gif");    
220         define("ICON_MONEY", "money.png");      
221         define("ICON_REMOVE", "remove.png");    
222         define("ICON_REPORT", "report.png");    
223         define("ICON_VIEW", "view.gif");        
224         define("ICON_SUBMIT", "ok.gif");
225         define("ICON_ESCAPE", "escape.png");    
226 }
227
228 ?>