22 var $pagesize; // for printing
25 function user_prefs(&$user)
28 $this->language = $user["language"];
29 language::set_language($this->language);
31 $this->qty_dec = $user["qty_dec"];
32 $this->price_dec = $user["prices_dec"];
33 $this->exrate_dec = $user["rates_dec"];
34 $this->percent_dec = $user["percent_dec"];
36 $this->show_gl_info = $user["show_gl"];
37 $this->show_codes = $user["show_codes"];
38 $this->date_format = $user["date_format"];
39 $this->date_sep = $user["date_sep"];
40 $this->tho_sep = $user["tho_sep"];
41 $this->dec_sep = $user["dec_sep"];
42 $this->theme = $user["theme"];
43 $this->pagesize = $user["page_size"];
44 $this->show_hints = $user["show_hints"];
45 $this->print_profile = $user["print_profile"];
50 return $this->language;
55 return $this->qty_dec;
60 return $this->price_dec;
65 return $this->exrate_dec;
68 function percent_dec()
70 return $this->percent_dec;
73 function show_gl_info()
75 return $this->show_gl_info;
80 return $this->show_codes;
83 function date_format()
85 return $this->date_format;
90 return $this->date_sep;
93 function date_display()
96 $sep = $dateseps[$this->date_sep];
97 if ($this->date_format == 0)
98 return "m".$sep."d".$sep."Y";
99 elseif ($this->date_format == 1)
100 return "d".$sep."m".$sep."Y";
102 return "Y".$sep."m".$sep."d";
107 return $this->tho_sep;
112 return $this->dec_sep;
120 function get_pagesize()
122 return $this->pagesize;
125 function show_hints()
127 return $this->show_hints;
130 function print_profile()
132 return $this->print_profile;
135 function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes)
137 $this->price_dec = $price_dec;
138 $this->qty_dec = $qty_dec;
139 $this->exrate_dec = $exrate_dec;
140 $this->percent_dec = $percent_dec;
141 $this->show_gl_info = $showgl;
142 $this->show_codes = $showcodes;
145 function set_format($date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize)
147 $this->date_format = $date_format;
148 $this->date_sep = $date_sep;
149 $this->tho_sep = $tho_sep;
150 $this->dec_sep = $dec_sep;
151 $this->theme = $theme;
152 $this->pagesize = $pagesize;