feat: consistent display of included services and prices
This commit is contained in:
@@ -52,6 +52,26 @@ class AppRuntime implements RuntimeExtensionInterface
|
||||
return $this->intlExtension->formatCurrency($amount, 'EUR');
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a service price, showing "inkl." for zero-priced (included) services.
|
||||
*
|
||||
* @param float|int|null $price The price to format
|
||||
*
|
||||
* @return string The formatted price or "inkl." for zero/null prices
|
||||
*/
|
||||
public function formatServicePrice(float|int|null $price): string
|
||||
{
|
||||
if (null === $price) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (0 === $price || 0.0 === $price) {
|
||||
return 'inkl.';
|
||||
}
|
||||
|
||||
return $this->intlExtension->formatCurrency((float) $price, 'EUR');
|
||||
}
|
||||
|
||||
public function mapStatus(string $status): string
|
||||
{
|
||||
$status = strtoupper($status);
|
||||
|
||||
Reference in New Issue
Block a user