Fix: DEFAULT_WAREHOUSE to define default in warehouse selections
This commit is contained in:
parent
8dbc0ff040
commit
5873d41f64
@ -70,7 +70,9 @@ if ($object->element == 'product')
|
|||||||
{
|
{
|
||||||
print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
|
print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100');
|
$ident=(GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone')));
|
||||||
|
if(empty($ident)&&!empty($conf->global->DEFAULT_WAREHOUSE))$ident=$conf->global->DEFAULT_WAREHOUSE;
|
||||||
|
print $formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100');
|
||||||
print ' <select name="mouvement" id="mouvement">';
|
print ' <select name="mouvement" id="mouvement">';
|
||||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user