Removed unnecesary code
This commit is contained in:
parent
10384e3856
commit
7f243d92e5
@ -43,14 +43,14 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocalta
|
||||
|
||||
$result=array();
|
||||
|
||||
// We work to define prices using the price without tax
|
||||
$tot_sans_remise = $pu * $qty;
|
||||
$tot_avec_remise_ligne = $tot_sans_remise * (1 - ($remise_percent_ligne / 100));
|
||||
$tot_avec_remise = $tot_avec_remise_ligne * (1 - ($remise_percent_global / 100));
|
||||
|
||||
//dol_syslog("price.lib::calcul_price_total $qty, $pu, $remise_percent_ligne, $txtva, $price_base_type $info_bits");
|
||||
if ($price_base_type == 'HT')
|
||||
{
|
||||
// We work to define prices using the price without tax
|
||||
$tot_sans_remise = $pu * $qty;
|
||||
$tot_avec_remise_ligne = $tot_sans_remise * (1 - ($remise_percent_ligne / 100));
|
||||
$tot_avec_remise = $tot_avec_remise_ligne * (1 - ($remise_percent_global / 100));
|
||||
|
||||
$result[6] = price2num($tot_sans_remise, 'MT');
|
||||
$result[8] = price2num($tot_sans_remise * (1 + ( (($info_bits & 1)?0:$txtva) / 100)), 'MT'); // Selon TVA NPR ou non
|
||||
$result8bis= price2num($tot_sans_remise * (1 + ( $txtva / 100)), 'MT'); // Si TVA consideree normale (non NPR)
|
||||
@ -69,11 +69,6 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocalta
|
||||
}
|
||||
else
|
||||
{
|
||||
// We work to define prices using the price with tax
|
||||
$tot_sans_remise = $pu * $qty;
|
||||
$tot_avec_remise_ligne = $tot_sans_remise * (1 - ($remise_percent_ligne / 100));
|
||||
$tot_avec_remise = $tot_avec_remise_ligne * (1 - ($remise_percent_global / 100));
|
||||
|
||||
$result[8] = price2num($tot_sans_remise, 'MT');
|
||||
$result[6] = price2num($tot_sans_remise / (1 + ((($info_bits & 1)?0:$txtva) / 100)), 'MT'); // Selon TVA NPR ou non
|
||||
$result6bis= price2num($tot_sans_remise / (1 + ($txtva / 100)), 'MT'); // Si TVA consideree normale (non NPR)
|
||||
@ -113,8 +108,8 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocalta
|
||||
|
||||
if ($txlocaltax2>0)
|
||||
{
|
||||
$result[15] = price2num(($result[6] * ( 1 + ( $txlocaltax2 / 100))) - $result[6], 'MT');
|
||||
$result[10] = price2num(($result[0] * ( 1 + ( $txlocaltax2 / 100))) - $result[0], 'MT');
|
||||
$result[15] = price2num(($result[6] * ( 1 + ( $txlocaltax2 / 100))) - $result[6], 'MT');
|
||||
$result[10] = price2num(($result[0] * ( 1 + ( $txlocaltax2 / 100))) - $result[0], 'MT');
|
||||
$result[12] = price2num(($result[3] * ( 1 + ( $txlocaltax2 / 100))) - $pu, 'MT');
|
||||
|
||||
//If Country is Spain, localtax2 (IRPF) will be subtracted
|
||||
|
||||
Loading…
Reference in New Issue
Block a user