From d3794bb145d04ad954b197c5e6e5dbac959dd73e Mon Sep 17 00:00:00 2001 From: fmarcet <fmarcet@2byte.es> Date: Tue, 5 Apr 2016 16:49:50 +0200 Subject: [PATCH] FIX: Not removing code into vatrate. --- htdocs/contrat/class/contrat.class.php | 4 ++-- htdocs/fourn/class/fournisseur.facture.class.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 37eaa1db04d..74ea611dc96 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> + * Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1514,7 +1514,7 @@ class Contrat extends CommonObject // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc); - $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + $tvatx = preg_replace('/\s*\(.*\)/','',$tvatx); // Remove code into vatrate. $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 64c988e74e1..8617748d369 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -9,6 +9,7 @@ * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com> + * Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1269,7 +1270,7 @@ class FactureFournisseur extends CommonInvoice // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($vatrate,0,$mysoc, $this->thirdparty); - $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + $vatrate = preg_replace('/\s*\(.*\)/','',$vatrate); // Remove code into vatrate. $tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type); $total_ht = $tabprice[0]; -- GitLab