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

fix: pcsg/kunden/bow-modellhandel-template#65

Übergeordneter 5f72008e
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -449,9 +449,18 @@ public function calcArticlePrice(Article $Article, $callback = false)
$bruttoPrice = $this->round($nettoPrice + $vatSum);
// sum
$nettoSum = $this->round($nettoPrice * $Article->getQuantity());
$vatSum = $nettoSum * ($vat / 100);
$bruttoSum = $this->round($nettoSum + $vatSum);
$nettoSum = $this->round($nettoPrice * $Article->getQuantity());
$vatSum = $nettoSum * ($vat / 100);
if (!$isNetto && $Article->getQuantity() > 1) {
// if the user is brutto
// and we have a quantity
// we need to calc first the brutto product price of one product
// -> because of 1 cent rounding error
$bruttoSum = $bruttoPrice * $Article->getQuantity();
} else {
$bruttoSum = $this->round($nettoSum + $vatSum);
}
$price = $isNetto ? $nettoPrice : $bruttoPrice;
$sum = $isNetto ? $nettoSum : $bruttoSum;
......@@ -909,8 +918,8 @@ public static function calculateTotal(array $invoiceList, $Currency = null): arr
$bruttoTotal = $bruttoTotal + $invBruttoSum;
$bruttoPaid = $bruttoPaid + $invPaid;
//$bruttoToPay = $bruttoToPay + $invToPay;
$nettoToPay = $nettoToPay + $invNettoToPay;
$vatTotal = $vatTotal + $invVatSum;
$nettoToPay = $nettoToPay + $invNettoToPay;
$vatTotal = $vatTotal + $invVatSum;
$nettoTotal = $nettoTotal + $invNettoTotal;
}
......
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