From 7430d097395b7a658a10de3c48b893e46c7bcec4 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 25 Mar 2016 16:13:22 +0100
Subject: [PATCH] Fix bad hook function name

---
 htdocs/compta/localtax/clients.php | 4 +++-
 htdocs/compta/tva/clients.php      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php
index ac30e529839..7c135ef8bf7 100644
--- a/htdocs/compta/localtax/clients.php
+++ b/htdocs/compta/localtax/clients.php
@@ -168,9 +168,11 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2)
 	$parameters["start"] = $date_start;
 	$parameters["end"] = $date_end;
 	$parameters["direction"] = 'sell';
+	$parameters["type"] = 'localtax'.$$local;
+	
 	// 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_list))
 	{
diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php
index b57b0d050d7..d455fc46f58 100644
--- a/htdocs/compta/tva/clients.php
+++ b/htdocs/compta/tva/clients.php
@@ -250,9 +250,11 @@ $parameters["mode"] = $modetax;
 $parameters["start"] = $date_start;
 $parameters["end"] = $date_end;
 $parameters["direction"] = 'sell';
+$parameters["type"] = 'vat';
+
 // 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_list)) {
 	$var=true;
-- 
GitLab