Fixed Quote Valid Days in System and GL Setup, Setup tab.
[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         var $prefs;
17         var $db_ok; // check whether database has been upgraded after src update.
18
19         function sys_prefs()
20         {
21 //              $this->prefs = get_company_prefs();
22         
23         }
24         
25         function allow_negative_stock() 
26         {
27                 return $this->prefs['allow_negative_stock'];
28         }
29         
30     /* Sherifoz 26.06.03 Proportion by which items can be received over the quantity that is specified in a purchase
31     invoice
32     The figure entered is interpreted as a percentage ie 10 means 0.1 or 10% not 10 times
33     */
34         function over_receive_allowance() 
35         {
36                 return $this->prefs['po_over_receive'];
37         }
38         
39     /* Proportion by which a purchase invoice line is an overcharge for a purchase order item received
40     is an overcharge. If the overcharge is more than this percentage then an error is reported and
41     purchase invoice line cannot be entered
42     The figure entered is interpreted as a percentage ie 20 means 0.2 or 20% not 20 times
43     */  
44         function over_charge_allowance() 
45         {
46                 return $this->prefs['po_over_charge'];
47         }
48         
49         function default_credit_limit() 
50         {
51                 return $this->prefs['default_credit_limit'];
52         }                               
53         
54         function default_wo_required_by() 
55         {
56                 return $this->prefs['default_workorder_required'];
57         }
58
59         function default_quote_valid_days() 
60         {
61                 return $this->prefs['default_quote_valid_days'];
62         }
63
64         function default_delivery_required_by() 
65         {
66                 return $this->prefs['default_delivery_required'];
67         }
68
69         function default_dimension_required_by() 
70         {
71                 return $this->prefs['default_dim_required'];
72         }       
73         
74         function auto_currency_revaluation() 
75         {
76                 return $this->prefs['auto_curr_reval'];
77         }       
78         
79         function allocation_settled_allowance()
80         {
81                 global $config_allocation_settled_allowance;
82                 return $config_allocation_settled_allowance;
83         }
84         
85 }
86
87 ?>