diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index c6a6034c684..3fb62407814 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -62,6 +62,8 @@ if (empty($conf->stock->enabled)) { accessforbidden(); } +$hookmanager->initHooks(array('ordersupplierdispatch')); + // Recuperation de l'id de projet $projectid = 0; if ($_GET["projectid"]) @@ -85,6 +87,10 @@ if ($id > 0 || ! empty($ref)) { * Actions */ +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($action == 'checkdispatchline' && ! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) { $error=0; @@ -430,6 +436,9 @@ if ($id > 0 || ! empty($ref)) { print '