From 884ba3a0ba5ba26ae1a63d450a7aaff36470d461 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Fri, 25 Mar 2016 16:23:09 +0100 Subject: [PATCH] Fix bad hook function name --- htdocs/compta/localtax/index.php | 4 +++- htdocs/compta/resultat/clientfourn.php | 2 +- htdocs/compta/resultat/index.php | 2 +- htdocs/compta/tva/quadri_detail.php | 4 +++- htdocs/compta/tva/quarter_report.php | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 3bed627402e..98ebe63f3b7 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -170,9 +170,11 @@ for ($m = 1 ; $m < 13 ; $m++ ) { $parameters["mode"] = $modetax; $parameters["year"] = $y; $parameters["month"] = $m; + $parameters["type"] = 'localtax'.$localTaxType; + // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); - $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if (! is_array($coll_listbuy) && $coll_listbuy == -1) { $langs->load("errors"); diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index c881b263dff..85c4bec7c11 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -897,7 +897,7 @@ $parameters["date_end"] = $date_end; $parameters["bc"] = $bc; // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); -$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +$reshook=$hookmanager->executeHooks('addBalanceLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks print $hookmanager->resPrint; if ($mysoc->tva_assuj != 'franchise') // Assujeti diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 96400da23c1..7777b650f3d 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -472,7 +472,7 @@ $object = array(&$encaiss, &$encaiss_ttc, &$decaiss, &$decaiss_ttc); $parameters["mode"] = $modecompta; // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); -$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +$reshook=$hookmanager->executeHooks('addReportInfo',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks /* * Salaries diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 8175744a75d..f243722c7fc 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -325,10 +325,12 @@ else $parameters["mode"] = $modetax; $parameters["start"] = $date_start; $parameters["end"] = $date_end; + $parameters["type"] = 'vat'; + $object = array(&$x_coll, &$x_paye, &$x_both); // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); - $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks foreach(array_keys($x_coll) as $rate) { diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index 61d019894e8..626a0fd6c34 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -378,10 +378,12 @@ if (!is_array($x_coll) || !is_array($x_paye)) { $parameters["mode"] = $modetax; $parameters["start"] = $date_start; $parameters["end"] = $date_end; + $parameters["type"] = 'vat'; + $object = array(&$x_coll, &$x_paye, &$x_both); // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); - $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks foreach (array_keys($x_coll) as $rate) { $subtot_coll_total_ht = 0; -- GitLab