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