feat: always show all available ski passes but readonly if age doesn't match
This commit is contained in:
@@ -55,14 +55,15 @@ class AppRuntime implements RuntimeExtensionInterface
|
||||
/**
|
||||
* Formats a service price, showing "inkl." for zero-priced (included) services.
|
||||
*
|
||||
* @param float|int|null $price The price to format
|
||||
* @param float|int|null $price The price to format
|
||||
* @param bool $showIncludedLabel Whether to show "inkl." for zero prices (default: true)
|
||||
*
|
||||
* @return string The formatted price or "inkl." for zero/null prices
|
||||
* @return string The formatted price, "inkl." for zero/null prices (if enabled), or empty string
|
||||
*/
|
||||
public function formatServicePrice(float|int|null $price): string
|
||||
public function formatServicePrice(float|int|null $price, bool $showIncludedLabel = true): string
|
||||
{
|
||||
if (null === $price || 0 === $price || 0.0 === $price) {
|
||||
return 'inkl.';
|
||||
return $showIncludedLabel ? 'inkl.' : '';
|
||||
}
|
||||
|
||||
return $this->intlExtension->formatCurrency((float) $price, 'EUR');
|
||||
|
||||
Reference in New Issue
Block a user