Skip to content
Code-Schnipsel Gruppen Projekte

fix: check vat -> wrong quantity calc check

Zusammengeführt Henning Leutz schlägt vor, next-3.x in main zu mergen.
1 Datei
+ 1
2
Änderungen vergleichen
  • Nebeneinander
  • In der Reihe
@@ -597,9 +597,7 @@ public function calcArticlePrice(Article $Article, $callback = false)
// korrektur rechnung / 1 cent problem
$checkBrutto = $nettoPriceNotRounded * ($vat / 100 + 1);
$checkBrutto = round($checkBrutto, $Currency->getPrecision());
$checkVat = $checkBrutto - $nettoPriceNotRounded;
$checkVat = round($checkVat * $Article->getQuantity(), $Currency->getPrecision());
if ($nettoPrice + $checkVat !== $checkBrutto) {
$diff = round(
@@ -611,6 +609,7 @@ public function calcArticlePrice(Article $Article, $callback = false)
}
// sum
$checkVat = round($checkVat * $Article->getQuantity(), $Currency->getPrecision());
$nettoSum = $this->round($nettoPrice * $Article->getQuantity());
$vatSum = $nettoSum * ($vat / 100);