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