From cea7fd68943707d822b9d2bd4d34fdd572e64156 Mon Sep 17 00:00:00 2001 From: Laurent De Coninck Date: Sat, 17 Oct 2020 20:45:37 +0200 Subject: [PATCH 1/6] select the only bank account When there is only one bank account in the dropdown of the bank account, select it by default. [see: #11878] --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index be7fde5d874..1fee8da7b47 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3880,7 +3880,7 @@ class Form while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($selected == $obj->rowid) + if ($selected == $obj->rowid || ($num === 1 && empty($selected))) { print '