Changed so that average item material price is automatic updated whenever a PO Delive...
[fa-stable.git] / config.php
1 <?php
2         /*--------------------------------------------------\
3         |               |               | config.php                    |
4         |---------------------------------------------------|
5     | FrontAccounting                                                                   |
6     | http://frontaccounting.com/                                               |
7     | by FrontAccounting                                        |
8         |---------------------------------------------------|
9         |                                                   |
10         \--------------------------------------------------*/
11
12 /*
13         // Make sure this directory exists and is writable!
14     $session_save_path = dirname(__FILE__).'/tmp/';
15
16 */
17         $session_save_path = session_save_path();
18         if (strpos($session_save_path, ";") !== false)
19                 $session_save_path = substr($session_save_path, strpos($session_save_path, ";") + 1);
20
21         if (isset($session_save_path))
22         {
23                 session_save_path($session_save_path);
24                 unset($session_save_path);
25     }
26         if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
27                 die("Restricted access");
28     include_once($path_to_root . "/config_db.php");
29     include_once($path_to_root . "/includes/lang/language.php");
30
31         //--------------------------------------------------
32
33         // User configurable variables
34     //---------------------------------------------------
35
36     /*Show debug messages returned from an error on the page.
37     Debugging info level also determined by settings in PHP.ini
38     if $debug=1 show debugging info, dont show if $debug=0 */
39
40     $debug                      = 1;
41         $show_sql               = 0;
42         $go_debug               = 0;
43         if ($go_debug == 1)
44         {
45                 error_reporting(E_ALL);
46                 ini_set("display_errors", "On");
47         }
48         else
49         {
50                 // ini_alter("error_reporting","E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE");
51                 ini_set("display_errors", "Off");
52         }
53         // Main Title
54         $app_title = "FrontAccounting";
55     // application version
56     $version            = "2.0 Pre Alpha";
57
58     // Build for development purposes
59     $build_version      = "2";
60
61         // Powered by
62         $power_by               = "FrontAccounting";
63         $power_url              = "http://frontaccounting.net";
64
65     /*Stock units array*/
66         $stock_units    = array(_("ea."), _("m"), _("kgg"), _("tons"), _("l"), _("lbs"), _("dozen"), _("pack"), _("hrs"));
67
68         /* use popup windows for views */
69         $use_popup_windows = 1;
70
71         /* use date picker for all date fields */
72         $use_date_picker = 1;
73
74         /* use Audit Trails in GL */
75         $use_audit_trail = 0;
76
77         /* Integrated base Wiki Help URL or null if not used */
78         $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.';
79
80         /* allow alpha characters in accounts. 0 = numeric, 1 = alpha numeric, 2 = uppercase alpha numeric */
81         $accounts_alpha = 0;
82
83         /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
84         $def_app = "orders";
85
86         /* Date systems. 0 = traditional, 1 = Jalali used by Iran, nabour countries, Afghanistan and some other Central Asian nations,
87            2 = Islamic used by other arabic nations */
88         $date_system = 0;
89
90         /* email stock location if order below reorder-level */
91         $loc_notification = 0;
92
93         /* print_invoice_no. 0 = print reference number, 1 = print invoice number */
94         $print_invoice_no = 0;
95
96         $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
97         $dateseps               = array("/", ".", "-", " ");
98         $thoseps                = array(",", ".", " ");
99         $decseps                = array(".", ",");
100     // CSS theme
101     $themes             = array("default","aqua","cool");
102     $pagesizes          = array("Letter", "A4"); // default PDF pagesize
103
104         /* Default border and spacing for tables */
105     /* Should be moved to CSS */
106
107     $table_style        = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'";
108     $table_style2       = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'";
109
110     /* Accounts Payable */
111     /* System check to see if quantity charged on purchase invoices exceeds the quantity received.
112         If this parameter is checked the proportion by which the purchase invoice is an overcharge
113         referred to before reporting an error */
114
115         $check_qty_charged_vs_del_qty = true;
116
117     /* System check to see if price charged on purchase invoices exceeds the purchase order price.
118     If this parameter is checked the proportion by which the purchase invoice is an overcharge
119     referred to before reporting an error */
120
121     $check_price_charged_vs_order_price = True;
122
123         $config_allocation_settled_allowance = 0.005;
124
125     // Internal configurable variables
126     //-----------------------------------------------------------------------------------
127
128     /* Whether to display the demo login and password or not */
129
130     $allow_demo_mode = false;
131
132     /* for uploaded item pictures */
133     $pic_width          = 80;
134     $pic_height         = 50;
135         $max_image_size = 500;
136
137     /* skin for Business Graphics, 1, 2 or 3 */
138         $graph_skin     = 1;
139
140     /*Security Group definitions - Depending on the AccessLevel of the user defined in the user set up
141     the areas of functionality accessible can be modified.
142     Each AccessLevel is associated with an array containing the security categories that the user is entitled to access
143     Each script has a particular security category associated with it.
144     If the security setting of the page is contained in the security group as determined by the access level then the user will be allowed access.
145     Each page has a $page_security = x; variable
146     This value is compared to contents of the array applicable which is based on the access level of the user.
147     Access authorisation is checked in header.inc this is where _SESSION["AccessLevel"] is the index of the security_groups array. If you wish to add more security groups with then you must add a new SecurityHeading to the security_headings array
148     and a new array of Security categories to the Security Groups array
149     This mechanism allows more fine grained control of access
150     security_groups is an array of arrays
151     The index is the order in which the array of allowed pages is defined new ones can be defined at will
152     or by changing the numbers in each array the security access can be tailored. These numbers need to read
153     in conjunction with the Page Security index
154     */
155
156     $security_headings = array(
157                 _("Inquiries"),
158                 _("Accountant"),
159                 _("System Administrator")
160     );
161
162     $security_groups = array(
163                 array(1,2),
164                 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14),
165                 array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
166     );
167
168         /*
169         System tabs. This variable should be in future included from separate file for extended module manager
170         */
171         $applications = array (
172                 'orders' => _("Sales"),
173                 'AP'=>_("Purchases"),
174                 'stock'=> _("Items and Inventory"),
175                 'manuf'=> _("Manufacturing"),
176                 'proj'=>_("Dimensions"),
177                 'GL'=>_("Banking and General Ledger"),
178                 'system'=>_("Setup")
179         );
180
181         //MySQL Backup and Restore Settings
182
183     define("BACKUP_PATH", "/admin/backup/");
184
185 ?>