Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 540f15f8 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: check vat -> wrong quantity calc check

Übergeordneter ee9b502d
No related branches found
No related tags found
2 Merge Requests!161fix: check vat -> wrong quantity calc check,!140Update 'next-4.x' with latest changes from 'main'
Pipeline #12813 mit Warnungen bestanden mit Phase
in 2 Minuten und 13 Sekunden
...@@ -597,9 +597,7 @@ public function calcArticlePrice(Article $Article, $callback = false) ...@@ -597,9 +597,7 @@ public function calcArticlePrice(Article $Article, $callback = false)
// korrektur rechnung / 1 cent problem // korrektur rechnung / 1 cent problem
$checkBrutto = $nettoPriceNotRounded * ($vat / 100 + 1); $checkBrutto = $nettoPriceNotRounded * ($vat / 100 + 1);
$checkBrutto = round($checkBrutto, $Currency->getPrecision()); $checkBrutto = round($checkBrutto, $Currency->getPrecision());
$checkVat = $checkBrutto - $nettoPriceNotRounded; $checkVat = $checkBrutto - $nettoPriceNotRounded;
$checkVat = round($checkVat * $Article->getQuantity(), $Currency->getPrecision());
if ($nettoPrice + $checkVat !== $checkBrutto) { if ($nettoPrice + $checkVat !== $checkBrutto) {
$diff = round( $diff = round(
...@@ -611,6 +609,7 @@ public function calcArticlePrice(Article $Article, $callback = false) ...@@ -611,6 +609,7 @@ public function calcArticlePrice(Article $Article, $callback = false)
} }
// sum // sum
$checkVat = round($checkVat * $Article->getQuantity(), $Currency->getPrecision());
$nettoSum = $this->round($nettoPrice * $Article->getQuantity()); $nettoSum = $this->round($nettoPrice * $Article->getQuantity());
$vatSum = $nettoSum * ($vat / 100); $vatSum = $nettoSum * ($vat / 100);
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren