From 61ed6e10e1b3fe9917381094e8039a0eb990c72b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Nov 2012 18:59:03 +0100 Subject: [PATCH] Uniformize code --- htdocs/core/lib/price.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index dfca755bcac..4c06cbb2099 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -177,8 +177,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt } // if there's some localtax without vat, we calculate localtaxes (we will add them at end) - $apply_tax = false; - + //If price is 'TTC' we need to have the totals without VAT for a correct calculation if ($price_base_type=='TTC') { @@ -186,7 +185,8 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $tot_avec_remise= price2num($tot_avec_remise / (1 + ($txtva / 100)),'MU'); } - switch($localtax1_type) { + $apply_tax = false; + switch($localtax1_type) { case '1': // localtax on product or service $apply_tax = true; break;