Movement of hook "selectwarehouse"
This commit is contained in:
parent
e042807b32
commit
99b4bfc91e
@ -245,27 +245,6 @@ class FormProduct
|
||||
if (empty($conf->global->ENTREPOT_EXTRA_STATUS)) $filterstatus = '';
|
||||
if (!empty($fk_product)) $this->cache_warehouses = array();
|
||||
|
||||
$parameters = array(
|
||||
'selected' => & $selected,
|
||||
'htmlname' =>& $htmlname,
|
||||
'filterstatus' =>& $filterstatus,
|
||||
'empty' =>& $empty,
|
||||
'disabled ' =>& $disabled,
|
||||
'fk_product' =>& $fk_product,
|
||||
'empty_label' =>& $empty_label,
|
||||
'showstock' =>& $showstock,
|
||||
'forcecombo' =>& $forcecombo,
|
||||
'events' =>& $events,
|
||||
'morecss' =>& $morecss,
|
||||
'exclude' =>& $exclude,
|
||||
'showfullpath' =>& $showfullpath,
|
||||
'stockMin' =>& $stockMin,
|
||||
'orderBy' =>& $orderBy
|
||||
);
|
||||
|
||||
$reshook = $hookmanager->executeHooks('selectWarehouses', $parameters, $this);
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
$this->loadWarehouses($fk_product, '', $filterstatus, true, $exclude, $stockMin, $orderBy);
|
||||
$nbofwarehouses=count($this->cache_warehouses);
|
||||
|
||||
@ -304,6 +283,27 @@ class FormProduct
|
||||
$out.='</select>';
|
||||
if ($disabled) $out.='<input type="hidden" name="'.$htmlname.'" value="'.(($selected>0)?$selected:'').'">';
|
||||
|
||||
$parameters = array(
|
||||
'selected' => $selected,
|
||||
'htmlname' => $htmlname,
|
||||
'filterstatus' => $filterstatus,
|
||||
'empty' => $empty,
|
||||
'disabled ' => $disabled,
|
||||
'fk_product' => $fk_product,
|
||||
'empty_label' => $empty_label,
|
||||
'showstock' => $showstock,
|
||||
'forcecombo' => $forcecombo,
|
||||
'events' => $events,
|
||||
'morecss' => $morecss,
|
||||
'exclude' => $exclude,
|
||||
'showfullpath' => $showfullpath,
|
||||
'stockMin' => $stockMin,
|
||||
'orderBy' => $orderBy
|
||||
);
|
||||
|
||||
$reshook = $hookmanager->executeHooks('selectWarehouses', $parameters, $this);
|
||||
if ($reshook > 0) $out = $hookmanager->resPrint;
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user