Update html.formproduct.class.php

DEFAULT_WAREHOUSE is not select in sherch
This commit is contained in:
Anthony Berton 2020-05-03 17:16:25 +02:00
parent d27ccb0233
commit f42492764d

View File

@ -253,10 +253,12 @@ class FormProduct
$comboenhancement = ajax_combobox($htmlname, $events);
$out .= $comboenhancement;
}
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
if ($htmlname != 'search_warehouse'){
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE;
if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse;
}
$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled' : '').' id="'.$htmlname.'" name="'.($htmlname.($disabled ? '_disabled' : '')).'">';
if ($empty) $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>';
foreach ($this->cache_warehouses as $id => $arraytypes)