From 6d552a2ae6931fcf8d0bff8920b302ae652f4ce4 Mon Sep 17 00:00:00 2001 From: TuxGasy Date: Mon, 23 Apr 2018 15:05:37 +0200 Subject: [PATCH] Add ordersupplierdispatch hook --- htdocs/fourn/commande/dispatch.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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 '' . $author->getNomUrl(1, '', 0, 0, 0) . ''; print ''; + $parameters=array(); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + print ""; print '';