23 var $pagesize; // for printing
26 function user_prefs(&$user)
29 $this->language = $user["language"];
30 language::set_language($this->language);
32 $this->qty_dec = $user["qty_dec"];
33 $this->price_dec = $user["prices_dec"];
34 $this->exrate_dec = $user["rates_dec"];
35 $this->percent_dec = $user["percent_dec"];
37 $this->show_gl_info = $user["show_gl"];
38 $this->show_codes = $user["show_codes"];
39 $this->date_format = $user["date_format"];
40 $this->date_sep = $user["date_sep"];
41 $this->tho_sep = $user["tho_sep"];
42 $this->dec_sep = $user["dec_sep"];
43 $this->theme = $user["theme"];
44 $this->pagesize = $user["page_size"];
45 $this->show_hints = $user["show_hints"];
46 $this->print_profile = $user["print_profile"];
47 $this->rep_popup = $user["rep_popup"];
52 return $this->language;
57 return $this->qty_dec;
62 return $this->price_dec;
67 return $this->exrate_dec;
70 function percent_dec()
72 return $this->percent_dec;
75 function show_gl_info()
77 return $this->show_gl_info;
82 return $this->show_codes;
85 function date_format()
87 return $this->date_format;
92 return $this->date_sep;
95 function date_display()
98 $sep = $dateseps[$this->date_sep];
99 if ($this->date_format == 0)
100 return "m".$sep."d".$sep."Y";
101 elseif ($this->date_format == 1)
102 return "d".$sep."m".$sep."Y";
104 return "Y".$sep."m".$sep."d";
109 return $this->tho_sep;
114 return $this->dec_sep;
122 function get_pagesize()
124 return $this->pagesize;
127 function show_hints()
129 return $this->show_hints;
132 function print_profile()
134 return $this->print_profile;
139 return $this->rep_popup;
142 function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes)
144 $this->price_dec = $price_dec;
145 $this->qty_dec = $qty_dec;
146 $this->exrate_dec = $exrate_dec;
147 $this->percent_dec = $percent_dec;
148 $this->show_gl_info = $showgl;
149 $this->show_codes = $showcodes;
152 function set_format($date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize)
154 $this->date_format = $date_format;
155 $this->date_sep = $date_sep;
156 $this->tho_sep = $tho_sep;
157 $this->dec_sep = $dec_sep;
158 $this->theme = $theme;
159 $this->pagesize = $pagesize;