diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6349bb56d99..9e70fa20944 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3585,7 +3585,7 @@ class Form * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @param string $moreattrib To add more attribute on select * @param int $showcurrency Show currency in label - * @return void + * @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...) */ function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0) { @@ -3593,6 +3593,7 @@ class Form global $langs, $conf; $langs->load("admin"); + $num = 0; $sql = "SELECT rowid, label, bank, clos as status, currency_code"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; @@ -3643,6 +3644,8 @@ class Form else { dol_print_error($this->db); } + + return $num; } /** @@ -3661,8 +3664,8 @@ class Form print '
'; } else {