Skip to content

Commit

Permalink
Merge pull request afup#1412 from afup/fix_totaux_tva_devis_factures
Browse files Browse the repository at this point in the history
correction du calcul du total de la TVA des devis/factures
  • Loading branch information
agallou authored Jan 4, 2024
2 parents 9cdbce3 + b95ad3f commit 83acb57
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 83acb57

Please sign in to comment.