diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 65e1e82b9c5..8b1a3c7fbd6 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -452,6 +452,7 @@ if ($resql) { $sql .= " FROM ".MAIN_DB_PREFIX."accounting_system as a"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON a.fk_country = c.rowid AND c.active = 1"; $sql .= " WHERE a.active = 1"; + $sql .= " ORDER BY c.code, a.pcg_version"; dol_syslog("accountancy/admin/account.php sql=".$sql); @@ -463,9 +464,11 @@ if ($resql) { while ($i < $numbis) { $obj = $db->fetch_object($resqlchart); if ($obj) { - print ''; + print '>'.$labeltoshow.''; } $i++; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5414bf897d9..7f14ae81e59 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -940,7 +940,7 @@ class Form public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0, $exclude_country_code = array(), $hideflags = 0, $forcecombo = 0) { // phpcs:enable - global $conf, $langs, $mysoc; + global $langs, $mysoc; $langs->load("dict"); @@ -9472,13 +9472,13 @@ class Form * @param int<0,1> $translate Translate and encode value * @param int|string $width Force width of select box. May be used only when using jquery couch. Example: 250, '95%' * @param string $moreattrib Add more options on select component. Example: 'disabled' - * @param string $elemtype Type of element we show ('category', ...). Will execute a formatting function on it. To use in readonly mode if js component support HTML formatting. + * @param string $nu Not used * @param string $placeholder String to use as placeholder * @param int<-1,1> $addjscombo Add js combo * @return string HTML multiselect string * @see selectarray(), selectArrayAjax(), selectArrayFilter() */ - public static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $elemtype = '', $placeholder = '', $addjscombo = -1) + public static function multiselectarray($htmlname, $array, $selected = array(), $key_in_label = 0, $value_as_key = 0, $morecss = '', $translate = 0, $width = 0, $moreattrib = '', $nu = '', $placeholder = '', $addjscombo = -1) { global $conf, $langs; $out = ''; @@ -9498,6 +9498,8 @@ class Form } } + $out .= ''; + // We need a hidden field because when using the multiselect, if we unselect all, there is no // variable submitted at all, so no way to make a difference between variable not submitted and variable // submitted to nothing. @@ -9544,35 +9546,38 @@ class Form } $out .= '' . "\n"; + $out .= ''; + // Add code for jquery to use multiselect if (!empty($conf->use_javascript_ajax) && getDolGlobalString('MAIN_USE_JQUERY_MULTISELECT') || defined('REQUIRE_JQUERY_MULTISELECT')) { $out .= "\n" . ''; $out .= "\n" . ''; + } + print ""; // Supplier @@ -2767,7 +2797,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio foreach ($cats as $cat) { $arrayselected[] = $cat->id; } - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print img_picto('', 'category', 'class="pictofixedwidth"'); + print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'minwidth100 widthcentpercentminusxx', 0, 0); print ""; } }