From 1f29d4f5e8c47144db678abd0bf835e513f3964a Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 16 Dec 2020 16:25:30 +0100 Subject: [PATCH] Add missing hooks --- htdocs/projet/element.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index c513123c9bf..975b8fcdbed 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -652,9 +652,29 @@ print ''.$langs->trans("AmountTTC").''; print ''; $total_revenue_ht = 0; +$balance_ht = 0; +$balance_ttc = 0; foreach ($listofreferent as $key => $value) { + $parameters = array( + 'total_revenue_ht' =>& $total_revenue_ht, + 'balance_ht' =>& $balance_ht, + 'balance_ttc' =>& $balance_ttc, + 'key' => $key, + 'value' =>& $value, + 'dates' => $dates, + 'datee' => $datee + ); + $reshook = $hookmanager->executeHooks('printOverviewProfit', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } + elseif ($reshook > 0){ + print $hookmanager->resPrint; + continue; + } + $name = $langs->trans($value['name']); $title = $value['title']; $classname = $value['class']; @@ -849,6 +869,22 @@ print '
'; // Detail foreach ($listofreferent as $key => $value) { + + $parameters = array( + 'key' => $key, + 'value' =>& $value, + 'dates' => $dates, + 'datee' => $datee + ); + $reshook = $hookmanager->executeHooks('printOverviewDetail', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } + elseif ($reshook > 0){ + print $hookmanager->resPrint; + continue; + } + $title = $value['title']; $classname = $value['class']; $tablename = $value['table'];