Fix: Use country code

This commit is contained in:
Laurent Destailleur 2010-08-05 20:16:57 +00:00
parent fe87b7b482
commit a59d380c99

View File

@ -40,7 +40,7 @@
*/ */
function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocaltax1=0, $txlocaltax2=0, $remise_percent_global=0, $price_base_type='HT', $info_bits=0) function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocaltax1=0, $txlocaltax2=0, $remise_percent_global=0, $price_base_type='HT', $info_bits=0)
{ {
global $conf; global $conf,$mysoc;
$result=array(); $result=array();
@ -118,7 +118,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocalta
$result[12] = price2num(($pu * ( 1 + ( $txlocaltax2 / 100))) - $pu, 'MT'); $result[12] = price2num(($pu * ( 1 + ( $txlocaltax2 / 100))) - $pu, 'MT');
//If Country is Spain, localtax2 (IRPF) will be subtracted //If Country is Spain, localtax2 (IRPF) will be subtracted
if ($conf->global->MAIN_INFO_SOCIETE_PAYS='4') if ($mysoc->pays_code=='ES')
{ {
$result[8] = $result[8] - $result[15]; $result[8] = $result[8] - $result[15];
$result[2] = $result[2] - $result[10]; $result[2] = $result[2] - $result[10];