Files
nutzwerte_fi4/app/Actions/Generate/Utilities/Format.php
T
2025-11-01 11:53:51 +01:00

42 lines
853 B
PHP

<?php
namespace App\Actions\Generate\Utilities;
class Format
{
public static function seite($value)
{
if ($value * 1 > 0) {
return $value;
} else {
return '';
}
}
public static function index($value)
{
if (is_numeric($value) && $value * 1 != 0) {
return number_format($value, 2, '.', '.');
} else {
return '';
}
}
public static function dezimal($value, $stellen)
{
if (is_numeric($value) && $value != 0) {
return number_format($value, $stellen, ',', '.');
} else {
return '';
}
}
public static function fix_str($str)
{
$from = ['--', 'text-align: end;'];
$to = ['', 'text-align: right;'];
return str_replace($from, $to, $str);
}
}