21 var $pagesize; // for printing
23 function user_prefs(&$user)
26 $this->language = $user["language"];
27 language::set_language($this->language);
29 $this->qty_dec = $user["qty_dec"];
30 $this->price_dec = $user["prices_dec"];
31 $this->exrate_dec = $user["rates_dec"];
32 $this->percent_dec = $user["percent_dec"];
34 $this->show_gl_info = $user["show_gl"];
35 $this->show_codes = $user["show_codes"];
36 $this->date_format = $user["date_format"];
37 $this->date_sep = $user["date_sep"];
38 $this->tho_sep = $user["tho_sep"];
39 $this->dec_sep = $user["dec_sep"];
40 $this->theme = $user["theme"];
41 $this->pagesize = $user["page_size"];
46 return $this->language;
51 return $this->qty_dec;
56 return $this->price_dec;
61 return $this->exrate_dec;
64 function percent_dec()
66 return $this->percent_dec;
69 function show_gl_info()
71 return $this->show_gl_info;
76 return $this->show_codes;
79 function date_format()
81 return $this->date_format;
86 return $this->date_sep;
89 function date_display()
92 $sep = $dateseps[$this->date_sep];
93 if ($this->date_format == 0)
94 return "m".$sep."d".$sep."Y";
95 elseif ($this->date_format == 1)
96 return "d".$sep."m".$sep."Y";
98 return "Y".$sep."m".$sep."d";
103 return $this->tho_sep;
108 return $this->dec_sep;
116 function get_pagesize()
118 return $this->pagesize;
121 function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes)
123 $this->price_dec = $price_dec;
124 $this->qty_dec = $qty_dec;
125 $this->exrate_dec = $exrate_dec;
126 $this->percent_dec = $percent_dec;
127 $this->show_gl_info = $showgl;
128 $this->show_codes = $showcodes;
131 function set_format($date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize)
133 $this->date_format = $date_format;
134 $this->date_sep = $date_sep;
135 $this->tho_sep = $tho_sep;
136 $this->dec_sep = $dec_sep;
137 $this->theme = $theme;
138 $this->pagesize = $pagesize;