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

fix: consider paid status at erp sum calculation

Übergeordneter bb93b71e
No related branches found
Tags 3.7.2
2 Merge Requests!77Next,!76fix: consider paid status at erp sum calculation
Pipeline #6447 bestanden mit Phase
in 10 Sekunden
......@@ -1096,11 +1096,21 @@ public static function calculateTotal(array $invoiceList, QUI\ERP\Currency\Curre
$invNettoTotal = floatval($invoice['calculated_nettosum']);
$invVatSumPC = QUI\Utils\Math::percent($invVatSum, $invBruttoSum);
$invBruttoSum = round($invBruttoSum, $Currency->getPrecision());
$invVatSum = round($invVatSum, $Currency->getPrecision());
$invPaid = round($invPaid, $Currency->getPrecision());
$invToPay = round($invToPay, $Currency->getPrecision());
$invNettoTotal = round($invNettoTotal, $Currency->getPrecision());
if ($invoice['paid_status'] === QUI\ERP\Constants::PAYMENT_STATUS_PAID) {
$invPaid = $invBruttoSum;
}
if ($invVatSumPC) {
if ($invToPay === 0.0) {
$invVatPaid = $invVatSum;
} else {
$invVatPaid = $invPaid * $invVatSumPC / 100;
$invVatPaid = round($invPaid * $invVatSumPC / 100, $Currency->getPrecision());
}
} else {
$invVatPaid = 0;
......
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