X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fprefs%2Fuserprefs.inc;h=7ba4c0c7ef40b301401ab4a8e2018833621ee7f5;hb=310a0d3ae5aeacbdaa0069546cc2652ac7518e6b;hp=f8fa8915511b4e28667a73130c0d26491db57a3f;hpb=818719f38b8327cdca616d58b13913dbd174d96a;p=fa-stable.git diff --git a/includes/prefs/userprefs.inc b/includes/prefs/userprefs.inc index f8fa8915..7ba4c0c7 100644 --- a/includes/prefs/userprefs.inc +++ b/includes/prefs/userprefs.inc @@ -1,13 +1,13 @@ . + See the License here . ***********************************************************************/ class user_prefs { @@ -33,31 +33,41 @@ class user_prefs var $show_hints; var $query_size; // table pager page length var $graphic_links; // use graphic links - - function user_prefs(&$user) - { - - $this->language = $user["language"]; - language::set_language($this->language); - - $this->qty_dec = $user["qty_dec"]; - $this->price_dec = $user["prices_dec"]; - $this->exrate_dec = $user["rates_dec"]; - $this->percent_dec = $user["percent_dec"]; - - $this->show_gl_info = $user["show_gl"]; - $this->show_codes = $user["show_codes"]; - $this->date_format = $user["date_format"]; - $this->date_sep = $user["date_sep"]; - $this->tho_sep = $user["tho_sep"]; - $this->dec_sep = $user["dec_sep"]; - $this->theme = $user["theme"]; - $this->pagesize = $user["page_size"]; - $this->show_hints = $user["show_hints"]; - $this->print_profile = $user["print_profile"]; - $this->rep_popup = $user["rep_popup"]; - $this->query_size = $user["query_size"]; - $this->graphic_links = $user["graphic_links"]; + var $sticky_date; // save date on subsequent document entry + + function user_prefs($user=null) + { + if ($user == null) { + // set default values, used before login + global $dflt_lang; + + $this->language = $dflt_lang; + $this->theme = 'default'; + + } else { + $this->language = $user["language"]; + language::set_language($this->language); + + $this->qty_dec = $user["qty_dec"]; + $this->price_dec = $user["prices_dec"]; + $this->exrate_dec = $user["rates_dec"]; + $this->percent_dec = $user["percent_dec"]; + + $this->show_gl_info = $user["show_gl"]; + $this->show_codes = $user["show_codes"]; + $this->date_format = $user["date_format"]; + $this->date_sep = $user["date_sep"]; + $this->tho_sep = $user["tho_sep"]; + $this->dec_sep = $user["dec_sep"]; + $this->theme = $user["theme"]; + $this->pagesize = $user["page_size"]; + $this->show_hints = $user["show_hints"]; + $this->print_profile = $user["print_profile"]; + $this->rep_popup = $user["rep_popup"]; + $this->query_size = $user["query_size"]; + $this->graphic_links = $user["graphic_links"]; + $this->sticky_date = $user["sticky_doc_date"]; + } } function language() @@ -161,7 +171,12 @@ class user_prefs { return $this->graphic_links; } - + + function sticky_date() + { + return $this->sticky_date; + } + function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes) { $this->price_dec = $price_dec;