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]
This commit is contained in:
parent
e3552e7e02
commit
cea7fd6894
@ -3880,7 +3880,7 @@ class Form
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
if ($selected == $obj->rowid)
|
if ($selected == $obj->rowid || ($num === 1 && empty($selected)))
|
||||||
{
|
{
|
||||||
print '<option value="'.$obj->rowid.'" selected>';
|
print '<option value="'.$obj->rowid.'" selected>';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user