From a432e57b123722c64ab9b6e6068d39230fd84eea Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 11:45:40 +0200 Subject: [PATCH] [ task #1063 ] Allow edit localtaxes rate for thirds. Works with contracts --- htdocs/contrat/class/contrat.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index daf22e0af7c8f..9483c5e56dfdd 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2008 Raphael Bertrand - * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Florian Henry * @@ -1008,7 +1008,7 @@ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_pr // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); + $localtaxes_type=getLocalTaxesFromRate($txtva,0, $this->societe ,$mysoc); $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type); $total_ht = $tabprice[0]; @@ -1156,7 +1156,7 @@ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $dat // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $localtaxes_type=getLocalTaxesFromRate($tvatx,0,$mysoc); + $localtaxes_type=getLocalTaxesFromRate($tvatx,0, $this->societe ,$mysoc); $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type); $total_ht = $tabprice[0];