From 1631985d1150d08620bd950fb6d9ff9ea1ecf7ff Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 11:38:08 +0200 Subject: [PATCH] [ task #1063 ] Allow edit localtaxes rate for thirds. Works with orders --- htdocs/commande/class/commande.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f9626d6d3c8..a41b3f4ac5b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2011 Jean Heimburger * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2013 Florian Henry @@ -1122,7 +1122,7 @@ class Commande extends CommonOrder // 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->thirdparty,$mysoc); $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'', $localtaxes_type); $total_ht = $tabprice[0]; @@ -2343,7 +2343,7 @@ class Commande extends CommonOrder // 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->thirdparty, $mysoc); $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type); $total_ht = $tabprice[0];