diff --git a/app/Helpers/Numeric.php b/app/Helpers/Numeric.php index 118e8b07..e006d74f 100644 --- a/app/Helpers/Numeric.php +++ b/app/Helpers/Numeric.php @@ -13,9 +13,9 @@ class Numeric public static function trimZero($value) { if (is_numeric($value) && strpos($value, '.') !== false) { - return rtrim(rtrim($value, '0'), '.'); + $value = rtrim(trim($value, '0'), '.'); } - return $value; + return $value ?: '0'; } }