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

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

diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php
index 7c135ef8bf7..b4cea5b4982 100644
--- a/htdocs/compta/localtax/clients.php
+++ b/htdocs/compta/localtax/clients.php
@@ -168,7 +168,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2)
 	$parameters["start"] = $date_start;
 	$parameters["end"] = $date_end;
 	$parameters["direction"] = 'sell';
-	$parameters["type"] = 'localtax'.$$local;
+	$parameters["type"] = 'localtax'.$local;
 	
 	// Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array
 	$hookmanager->initHooks(array('externalbalance'));
@@ -246,7 +246,9 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
 
 	$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy');
 	$parameters["direction"] = 'buy';
-	$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action);    // Note that $action and $object may have been modified by some hooks
+	$parameters["type"] = 'localtax'.$local;
+	
+	$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