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

refactor: ignore phpstan warnings in calc.php

Updated calcArticleList method in Calc.php to ignore PHPStan warnings using the
`@phpstan-ignore-line` and `@phpstan-ignore-next-line` directives. Also, added a TODO comment
regarding net calculations.
Übergeordneter 9233e394
No related branches found
No related tags found
2 Merge Requests!170Update 'next-4.x' with latest changes from 'main',!169fix(phpstan): added exception handling for missing html2pdf module in OutputTemplate
Pipeline #15507 mit Warnungen bestanden mit Phase
in 2 Minuten und 17 Sekunden
......@@ -414,11 +414,11 @@ public function calcArticleList(ArticleList $List, callable | bool $callback = f
}
// delete 0 % vat, 0% vat is allowed to calculate more easily
if (isset($vatText[0])) {
if (isset($vatText[0])) { // @phpstan-ignore-line
unset($vatText[0]);
}
if (isset($vatArray[0])) {
if (isset($vatArray[0])) { // @phpstan-ignore-line
unset($vatArray[0]);
}
......@@ -475,6 +475,9 @@ public function calcArticleList(ArticleList $List, callable | bool $callback = f
// counterbalance - gegenrechnung
// works only for one vat entry
// @todo: check -> wegen is netto, müsste eigentlich nach dem if
// @phpstan-ignore-next-line
if (count($vatArray) === 1 && $isNetto) {
$vat = key($vatArray);
$netto = $bruttoSum / ((float)$vat / 100 + 1);
......
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