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

fix(ArticleDiscount): check possible undefined methods

Übergeordneter 01863ff4
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!140Update 'next-4.x' with latest changes from 'main',!135Next 3.x
......@@ -15,6 +15,7 @@
use function is_numeric;
use function json_decode;
use function json_encode;
use function method_exists;
use function str_replace;
use function strpos;
......@@ -225,11 +226,11 @@ public function formatted(): string
}
if ($this->type === Calc::CALCULATION_COMPLEMENT) {
if ($this->Article && $this->Article->getUser()) {
if ($this->Article && method_exists($this->Article, 'getUser') && $this->Article->getUser()) {
$User = $this->Article->getUser();
$isNetto = QUI\ERP\Utils\User::isNettoUser($User);
if (!$isNetto) {
if (!$isNetto && method_exists($this->Article, 'getVat')) {
$value = $value * ($this->Article->getVat() / 100 + 1);
}
}
......
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