Update from usntable branch.
[fa-stable.git] / includes / prefs / sysprefs.inc
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 include_once($path_to_root . "/admin/db/company_db.inc");
13
14 class sys_prefs 
15 {
16         
17         function allow_negative_stock() 
18         {
19                 return get_company_pref('allow_negative_stock');
20         }
21         
22     /* Sherifoz 26.06.03 Proportion by which items can be received over the quantity that is specified in a purchase
23     invoice
24     The figure entered is interpreted as a percentage ie 10 means 0.1 or 10% not 10 times
25     */
26         function over_receive_allowance() 
27         {
28                 return get_company_pref('po_over_receive');
29         }
30         
31     /* Proportion by which a purchase invoice line is an overcharge for a purchase order item received
32     is an overcharge. If the overcharge is more than this percentage then an error is reported and
33     purchase invoice line cannot be entered
34     The figure entered is interpreted as a percentage ie 20 means 0.2 or 20% not 20 times
35     */  
36         function over_charge_allowance() 
37         {
38                 return get_company_pref('po_over_charge');
39         }
40         
41         function default_credit_limit() 
42         {
43                 return get_company_pref('default_credit_limit');
44         }                               
45         
46         function default_wo_required_by() 
47         {
48                 return get_company_pref('default_workorder_required');
49         }
50
51         function default_delivery_required_by() 
52         {
53                 return get_company_pref('default_delivery_required');
54         }
55
56         function default_dimension_required_by() 
57         {
58                 return get_company_pref('default_dim_required');
59         }       
60         
61         function allocation_settled_allowance()
62         {
63                 global $config_allocation_settled_allowance;
64                 return $config_allocation_settled_allowance;
65         }
66         
67 }
68
69 ?>