Fixed multiply sales document view link generation.
[fa-stable.git] / includes / current_user.inc
index 05b98800643be3190a59d21175450dd77377b5a4..4d2d208177d0af531764cf1a097c64d6acaa2f73 100644 (file)
@@ -11,6 +11,7 @@ class current_user
        var $username;
        var     $name;
        var $company;
+       var $pos;
        var $access;
 
        var $logged;
@@ -48,6 +49,7 @@ class current_user
 
                    $this->access = $myrow["full_access"];
                    $this->name = $myrow["real_name"];
+                   $this->pos = $myrow["pos"];
                    $this->loginname = $loginname;
                    $this->username = $this->loginname;
                    $this->prefs = new user_prefs($myrow);
@@ -98,11 +100,11 @@ class current_user
 
        function update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, 
                $showgl, $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep, 
-               $theme, $pagesize, $show_hints, $profile, $rep_popup) {
+               $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size) {
                update_user_display_prefs($this->username, $price_dec, 
                        $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes, 
                        $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, 
-                       $show_hints, $profile, $rep_popup);
+                       $show_hints, $profile, $rep_popup, $query_size);
 
                // re-read the prefs
                $user = get_user($this->username);
@@ -182,6 +184,11 @@ function user_company()
        return $_SESSION["wa_current_user"]->company;
 }
 
+function user_pos()
+{
+       return $_SESSION["wa_current_user"]->pos;
+}
+
 function user_language()
 {
        return $_SESSION["wa_current_user"]->prefs->language();
@@ -267,14 +274,19 @@ function user_rep_popup()
        return $_SESSION["wa_current_user"]->prefs->rep_popup();
 }
 
+function user_query_size()
+{
+       return $_SESSION["wa_current_user"]->prefs->query_size();
+}
+
 function set_user_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
        $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints,
-       $print_profile, $rep_popup)
+       $print_profile, $rep_popup, $query_size)
 {
 
        $_SESSION["wa_current_user"]->update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
                $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints,
-               $print_profile, $rep_popup);
+               $print_profile, $rep_popup, $query_size);
 }
 
 function add_user_js_data() {