From fbcc463a6f913053a5b9f0c4a8cd2fecec025b6d Mon Sep 17 00:00:00 2001 From: IC-Mathieu <95343351+IC-Mathieu@users.noreply.github.com> Date: Sat, 6 Jul 2024 03:54:33 +0200 Subject: [PATCH] ADD_HOOK_IN_SITUATION (#30240) * ADD_HOOK_SITUATION * Update card.php --------- Co-authored-by: Laurent Destailleur --- htdocs/compta/facture/card.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 86b6ba5d0fd..75d74750b2b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2048,6 +2048,15 @@ if (empty($reshook)) { if ($ret > 0) { $nextSituationInvoice->insertExtraFields(); } + + // Hooks + $parameters = array('origin' => $origin); + $reshook = $hookmanager->executeHooks('createFrom', $parameters, $nextSituationInvoice, $action); // Note that $action and $object may have been + // modified by hook + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $error++; + } } } }