Skip to content

Commit

Permalink
correction du calcul du total de la TVA des devis/factures
Browse files Browse the repository at this point in the history
On ne prenait en compte que la dernière ligne pour chaque taux de TVA.
  • Loading branch information
agallou committed Jan 4, 2024
1 parent 9cdbce3 commit b95ad3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/Afup/Comptabilite/Facture.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function genererDevis($reference, $chemin = null)
$x += 20;
$pdf->SetXY($x, $y);
$pdf->MultiCell(20, 5, utf8_decode($detail['tva'] . '%'), 'T', 'C', "C");
$vatAmounts[$detail['tva']] = ($detail['tva'] / 100) * $montantTtc;
$vatAmounts[$detail['tva']] += ($detail['tva'] / 100) * $montantTtc;
$montantTtc = $montantTtc * (1 + ($detail['tva'] / 100));

$x += 20;
Expand Down Expand Up @@ -636,7 +636,7 @@ function genererFacture($reference, $chemin = null)
$x += 20;
$pdf->SetXY($x, $y);
$pdf->MultiCell(20, 5, utf8_decode($detail['tva'] . '%'), 'T', 'C', "C");
$vatAmounts[$detail['tva']] = ($detail['tva'] / 100) * $montantTtc;
$vatAmounts[$detail['tva']] += ($detail['tva'] / 100) * $montantTtc;
$montantTtc = $montantTtc * (1 + ($detail['tva'] / 100));
}

Expand Down

0 comments on commit b95ad3f

Please sign in to comment.