Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions lib/dolismq_function.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function dolismq_select_product_lots($productid = -1, $selected = '', $htmlname
if ( ! is_object($hookmanager)) {
include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
$hookmanager = new HookManager($db);
$hookmanager->initHooks(['globalcard']);
}

// We search third parties
Expand Down Expand Up @@ -119,19 +120,28 @@ function dolismq_select_product_lots($productid = -1, $selected = '', $htmlname
$out .= '</option>';
}

if ($htmlname != 'none' && ! $options_only) {
$out .= '</select>';
}

$parameters = array(
'socid' => $productid,
'productid' => $productid,
'htmlname' => $htmlname,
'htmlid' => $htmlid,
'moreclass' => $moreclass,
'moreparam' => $moreparam,
'selected' => $selected,
'resql' => $resql,
'out' => &$out,
'showfunction' => $showfunction,
'showsoc' => $showsoc,
);

//$reshook = $hookmanager->executeHooks('afterSelectContactOptions', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
$reshook = $hookmanager->executeHooks('modifyProductlotSelector', $parameters);

if ($htmlname != 'none' && ! $options_only) {
$out .= '</select>';
if ($reshook < 0) {
dol_print_error($db, $hookmanager->error, $hookmanager->errors);
return -1;
}

return $out;
Expand Down