21 var $pagesize; // for printing
24 function user_prefs(&$user)
27 $this->language = $user["language"];
28 language::set_language($this->language);
30 $this->qty_dec = $user["qty_dec"];
31 $this->price_dec = $user["prices_dec"];
32 $this->exrate_dec = $user["rates_dec"];
33 $this->percent_dec = $user["percent_dec"];
35 $this->show_gl_info = $user["show_gl"];
36 $this->show_codes = $user["show_codes"];
37 $this->date_format = $user["date_format"];
38 $this->date_sep = $user["date_sep"];
39 $this->tho_sep = $user["tho_sep"];
40 $this->dec_sep = $user["dec_sep"];
41 $this->theme = $user["theme"];
42 $this->pagesize = $user["page_size"];
43 $this->show_hints = $user["show_hints"];
48 return $this->language;
53 return $this->qty_dec;
58 return $this->price_dec;
63 return $this->exrate_dec;
66 function percent_dec()
68 return $this->percent_dec;
71 function show_gl_info()
73 return $this->show_gl_info;
78 return $this->show_codes;
81 function date_format()
83 return $this->date_format;
88 return $this->date_sep;
91 function date_display()
94 $sep = $dateseps[$this->date_sep];
95 if ($this->date_format == 0)
96 return "m".$sep."d".$sep."Y";
97 elseif ($this->date_format == 1)
98 return "d".$sep."m".$sep."Y";
100 return "Y".$sep."m".$sep."d";
105 return $this->tho_sep;
110 return $this->dec_sep;
118 function get_pagesize()
120 return $this->pagesize;
123 function show_hints()
125 return $this->show_hints;
128 function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes)
130 $this->price_dec = $price_dec;
131 $this->qty_dec = $qty_dec;
132 $this->exrate_dec = $exrate_dec;
133 $this->percent_dec = $percent_dec;
134 $this->show_gl_info = $showgl;
135 $this->show_codes = $showcodes;
138 function set_format($date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize)
140 $this->date_format = $date_format;
141 $this->date_sep = $date_sep;
142 $this->tho_sep = $tho_sep;
143 $this->dec_sep = $dec_sep;
144 $this->theme = $theme;
145 $this->pagesize = $pagesize;