From b8550bb9859507cff7131e7eaba15b2f54eb811c Mon Sep 17 00:00:00 2001
From: simnandez <jmenent@2byte.es>
Date: Tue, 7 Jan 2014 12:16:16 +0100
Subject: [PATCH] Fix: Bad get of localtaxes into contracts add lines

---
 ChangeLog                | 3 +++
 htdocs/contrat/fiche.php | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c9701182bcd..c976fe08a27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -135,6 +135,9 @@ parameter. All methods addline in this case were modified to remove this paramet
 
 
 
+***** ChangeLog for 3.4.3 compared to 3.4.2 *****
+Fix: Bad get of localtaxes into contracts add lines
+
 ***** ChangeLog for 3.4.2 compared to 3.4.1 *****
 Fix: field's problem into company's page (RIB).
 Fix: Document cerfa doesn't contained firstname & lastname from donator.
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index f045fb30cc3..06b408d4fa2 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -3,8 +3,8 @@
  * Copyright (C) 2004-2012	Laurent Destailleur		<eldy@users.sourceforge.net>
  * Copyright (C) 2005-2012	Regis Houssin			<regis.houssin@capnetworks.com>
  * Copyright (C) 2006		Andre Cianfarani		<acianfa@free.fr>
- * Copyright (C) 2010-2012	Juanjo Menent			<jmenent@2byte.es>
- * Copyright (C) 2013       Christophe Battarel   <christophe.battarel@altairis.fr>
+ * Copyright (C) 2010-2013	Juanjo Menent			<jmenent@2byte.es>
+ * Copyright (C) 2013       Christophe Battarel     <christophe.battarel@altairis.fr>
  * Copyright (C) 2013       Florian Henry		  	<florian.henry@open-concept.pro>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -448,8 +448,8 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
             $desc=$product_desc;
         }
 
-        $localtax1_tx=get_localtax($tva_tx,1,$object->societe);
-        $localtax2_tx=get_localtax($tva_tx,2,$object->societe);
+        $localtax1_tx=get_localtax($tva_tx,1,$object->thirdparty);
+        $localtax2_tx=get_localtax($tva_tx,2,$object->thirdparty);
 
 		// ajout prix achat
 		$fk_fournprice = $_POST['fournprice'];
-- 
GitLab