function sys_prefs()
{
-// $this->prefs = get_company_prefs();
-
+ global $path_to_root;
+
+ include $path_to_root.'/config.default.php';
+ include $path_to_root.'/config.php';
+
+ // set system wide preferences
+ foreach(get_defined_vars() as $name => $value)
+ $this->$name = $value;
+
+ if (!@$this->time_zone)
+ $this->time_zone = ini_get('date.timezone');
+
+ if (!$this->time_zone)
+ $this->time_zone = 'Europe/Berlin';
+
+ ini_set('date.timezone', $this->time_zone);
}
-
+
function allow_negative_stock()
{
return $this->prefs['allow_negative_stock'];
}
-
+
/* Sherifoz 26.06.03 Proportion by which items can be received over the quantity that is specified in a purchase
invoice
The figure entered is interpreted as a percentage ie 10 means 0.1 or 10% not 10 times
return $this->prefs['default_workorder_required'];
}
+ function default_quote_valid_days()
+ {
+ return $this->prefs['default_quote_valid_days'];
+ }
+
function default_delivery_required_by()
{
return $this->prefs['default_delivery_required'];
function allocation_settled_allowance()
{
- global $config_allocation_settled_allowance;
- return $config_allocation_settled_allowance;
+ return $this->config_allocation_settled_allowance;
+ }
+
+ function no_zero_lines_amount()
+ {
+ return $this->prefs['no_zero_lines_amount'];
+ }
+
+ function show_po_item_codes()
+ {
+ return $this->prefs['show_po_item_codes'];
+ }
+
+ function accounts_alpha()
+ {
+ return $this->prefs['accounts_alpha'];
+ }
+
+ function loc_notification()
+ {
+ return $this->prefs['loc_notification'];
+ }
+
+ function print_invoice_no()
+ {
+ return $this->prefs['print_invoice_no'];
+ }
+
+ function allow_negative_prices()
+ {
+ return $this->prefs['allow_negative_prices'];
+ }
+
+ function print_item_images_on_quote()
+ {
+ return $this->prefs['print_item_images_on_quote'];
+ }
+
+ function alternative_tax_include_on_docs()
+ {
+ return $this->prefs['alternative_tax_include_on_docs'];
+ }
+
+ function suppress_tax_rates()
+ {
+ return $this->prefs['suppress_tax_rates'];
}
-
}
-?>
\ No newline at end of file