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