Skip to content
Code-Schnipsel Gruppen Projekte
Commit 129ea23b erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next-3.x' into 'main'

fix: consider quantity at 1cent fix

See merge request !145
Übergeordnete cf67d294 d8e73830
Keine zugehörigen Branchen gefunden
Tags 1.12.6
2 Merge Requests!145fix: consider quantity at 1cent fix,!140Update 'next-4.x' with latest changes from 'main'
Pipeline-Nr. 11518 mit Warnungen bestanden
......@@ -541,6 +541,8 @@ public function calcArticlePrice(Article $Article, $callback = false)
$nettoPriceNotRounded = $Article->getUnitPriceUnRounded()->getValue();
$vat = $Article->getVat();
$quantity = $Article->getQuantity();
$basisNettoPrice = $nettoPrice;
$nettoSubSum = $this->round($nettoPrice * $Article->getQuantity());
......@@ -595,8 +597,8 @@ public function calcArticlePrice(Article $Article, $callback = false)
// Related: pcsg/buero#344
// Related: pcsg/buero#436
if ($nettoSum + $checkVat !== $bruttoPrice) {
$diff = $nettoSum + $checkVat - $bruttoPrice;
if ($nettoSum + $checkVat !== $bruttoPrice * $quantity) {
$diff = $nettoSum + $checkVat - ($bruttoPrice * $quantity);
$vatSum = $vatSum - $diff;
$vatSum = round($vatSum, $precision);
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren