From bf0b578e5a4f73b7535ea28da35941c6f5a36d40 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sat, 6 Sep 2014 16:24:44 +0200 Subject: [PATCH] Fix: Sort at wrong place Fix: sql syntax error (field were renamed) --- htdocs/core/class/html.form.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7dd220f25be..358c2a90304 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -595,7 +595,7 @@ class Form $sql = "SELECT c.code, c.label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees as c"; - $sql.= " ORDER BY lower(c.libelle) ASC"; + //$sql.= " ORDER BY c.label ASC"; // No sort here, sort must be done after translation dol_syslog(get_class($this).'::load_cache_types_fees', LOG_DEBUG); $resql=$this->db->query($sql); @@ -613,6 +613,9 @@ class Form $this->cache_types_fees[$obj->code] = $label; $i++; } + + asort($this->cache_types_fees); + return $num; } else -- GitLab