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

fix: consider null price

Übergeordneter 8c219542
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
3 Merge Requests!87refactor: code stability,!86refactor: code stability,!85refactor: code stability
......@@ -13,6 +13,7 @@
use function floatval;
use function is_float;
use function is_int;
use function mb_strpos;
use function mb_substr;
use function preg_replace;
......@@ -58,15 +59,19 @@ class Price
/**
* Price constructor.
*
* @param float|int $price
* @param float|int|null $price
* @param Currency $Currency
* @param User|null $User - optional, if no user, session user are used
*/
public function __construct(
float|int $price,
float|int|null $price,
QUI\ERP\Currency\Currency $Currency,
QUI\Interfaces\Users\User $User = null
) {
if (!$price) {
$price = 0;
}
$this->price = $price;
$this->Currency = $Currency;
......
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