Modif calcul de la tva, correction des erreurs d'arrondies

This commit is contained in:
Rodolphe Quiedeville 2003-09-15 16:04:01 +00:00
parent 5ac4796c7c
commit 9f8071b77b

View File

@ -240,7 +240,7 @@ class Propal
$totaltva=0; $totaltva=0;
$totalttc=0; $totalttc=0;
$total_remise=0; $total_remise=0;
$t = 0;
/* /*
* Remise * Remise
*/ */
@ -267,13 +267,17 @@ class Propal
if ($remise_percent > 0) if ($remise_percent > 0)
{ {
$lremise = ($lprice * $remise_percent / 100); $ligne_remise = ($lprice * $remise_percent / 100);
$total_remise = $total_remise + $lremise; $total_remise = $total_remise + $ligne_remise;
$lprice = $lprice - $lremise; $lprice = $lprice - $ligne_remise;
} }
$totalht = $totalht + $lprice; $totalht = $totalht + $lprice;
$totaltva = $totaltva + (tva(($lprice), $obj->tva_tx));
$ligne_tva = ($lprice * ($obj->tva_tx / 100));
$totaltva = $totaltva + $ligne_tva;
$i++; $i++;
} }
@ -282,6 +286,8 @@ class Propal
/* /*
* Calcul TVA * Calcul TVA
*/ */
$totaltva = round($totaltva, 2);
$totalht = round($totalht, 2);
$totalttc = $totalht + $totaltva; $totalttc = $totalht + $totaltva;
/* /*
* *