Sort array

This commit is contained in:
Laurent Destailleur 2021-01-15 17:47:14 +01:00
parent 4b66f6bcd3
commit 32bd194f8e
2 changed files with 5 additions and 2 deletions

View File

@ -685,7 +685,7 @@ if ($action == 'create')
// It does not use the setup of "key pressed" to select a thirdparty and this hang browser on large databases.
// Also, it is not possible to use a value that is not in the list.
// Also, the label is not automatically filled when a value is selected.
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
if (empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
print $formaccounting->select_auxaccount('', 'subledger_account', 1);
} else {
print '<input type="text" class="maxwidth150" name="subledger_account" value="">';

View File

@ -435,7 +435,7 @@ class FormAccounting extends Form
* @param string $morecss More css
* @return string String with HTML select
*/
public function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'maxwidth200')
public function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'maxwidth250')
{
// phpcs:enable
@ -463,6 +463,9 @@ class FormAccounting extends Form
dol_syslog(get_class($this)."::select_auxaccount ".$this->error, LOG_ERR);
return -1;
}
ksort($aux_account);
$this->db->free($resql);
// Auxiliary user account