X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=a1b65af1bc4472cd0f1c15fc0f40ce5277347726;hb=3dc709543cc713810811d269a8b2ce035146a559;hp=afa50ee72b623308e82315b40586ee70c51c2395;hpb=3cf01ce4d0d2b31a0931e01b12a418f57b37d0f4;p=fa-stable.git diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index afa50ee7..a1b65af1 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 = "