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++; + } } } }