X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=f136c38229cccdced7113d1c99ee5d869689a716;hb=8c893a568ed275b1695b2f4df8cfda131a997a64;hp=afa50ee72b623308e82315b40586ee70c51c2395;hpb=3cf01ce4d0d2b31a0931e01b12a418f57b37d0f4;p=fa-stable.git diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index afa50ee7..f136c382 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -297,7 +297,7 @@ $opts = array( // default options //if($name=='SelectStockFromList') display_error($sql); foreach($items as $value=>$descr) { $sel = ''; - if ($selected_id == $value) { + if ((string)$selected_id === (string)$value) { $sel = 'selected'; $found = $value; } @@ -318,8 +318,9 @@ $opts = array( // default options } if ($found === false) { - $_POST[$name] = $first_id; + $selected_id = $first_id; } + $_POST[$name] = $selected_id; $aspect = $opts['edit_submit'] ? " aspect='editable'" : ''; $selector = "