If a new order was created and no fund selected, a db error was thrown due to the
'bookfundid' field being set to NULL. This patch sets the first fund retrieved from
available funds as the default selection in the scrolling list.
A further enhancement might be to allow the library to choose which fund is the
default fund.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
-name => 'bookfund',
-id => 'bookfund',
-values => \@select_bookfund,
- -default => $data->{'bookfundid'},
+ -default => ($data->{'bookfundid'} ? $data->{'bookfundid'} : $select_bookfund[0]),
-labels => \%select_bookfunds,
#-size => 1,
-tabindex =>'',