34 lines
672 B
PHP
34 lines
672 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 = 2)
|
|
{
|
|
if (is_numeric($value) && $value * 1 > 0) {
|
|
return number_format($value, $stellen, ',', '.');
|
|
} else {
|
|
return '';
|
|
}
|
|
}
|
|
}
|