Skip to content
Code-Schnipsel Gruppen Projekte
Commit 0c18d5a1 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

fix: adoption from v1 - price object fix

Übergeordneter 158ecbbc
No related branches found
No related tags found
2 Merge Requests!150Next 3.x,!140Update 'next-4.x' with latest changes from 'main'
Pipeline #12075 mit Warnungen bestanden mit Phase
in 3 Minuten und 7 Sekunden
......@@ -200,10 +200,14 @@ public function getCurrency(): QUI\ERP\Currency\Currency
*/
public static function validatePrice(mixed $value, QUI\Locale $Locale = null): float|int|null
{
if (is_float($value)) {
if (is_float($value) || is_int($value)) {
return round($value, QUI\ERP\Defaults::getPrecision());
}
if ($value instanceof Price) {
$value = $value->getPrice();
}
$value = (string)$value;
$isNegative = str_starts_with($value, '-');
......
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