Merged changes up to 2.3.16 into unstable
[fa-stable.git] / includes / prefs / userprefs.inc
index e14c08b5cf06bea77bb93e0578507d73e93cb23f..422c741bfa9f96470e34d640d83c582030eda120 100644 (file)
@@ -35,7 +35,8 @@ class user_prefs
        var $graphic_links; // use graphic links
        var $sticky_date;       // save date on subsequent document entry
        var $startup_tab;  // default start-up menu tab
-       
+       var $transaction_days; // transaction days in inquiries.
+
        function user_prefs($user=null)
        {
                if ($user == null) { 
@@ -49,7 +50,8 @@ class user_prefs
                        $this->price_dec = 2;
                        $this->language = $dflt_lang;
                        $this->theme = 'default';
-                       
+                       $this->transaction_days = -30;
+
                } else {
                        global $path_to_root;
                        $this->language = $user["language"];
@@ -83,6 +85,7 @@ class user_prefs
                                $this->sticky_date = 0;
                                $this->startup_tab = "orders";
                        }
+                       $this->transaction_days = $user['transaction_days'];
                        if (!file_exists("$path_to_root/themes/$this->theme"))
                                $this->theme = "default";
                }
@@ -231,6 +234,11 @@ class user_prefs
                return $this->startup_tab;
        }
 
+    function transaction_days() 
+    {
+        return $this->transaction_days;
+    }
+
        function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes) 
        {
                $this->price_dec = $price_dec;