wip: transportation services with discount
This commit is contained in:
@@ -406,15 +406,14 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
{
|
||||
$label = $service->label;
|
||||
|
||||
// Transportation type indicators removed for cleaner labels
|
||||
if (null === $service->price || 0.0 === $service->price) {
|
||||
return $service->label;
|
||||
}
|
||||
|
||||
// Add pricing with discount indication
|
||||
if (null !== $service->price) {
|
||||
if ($service->price > 0) {
|
||||
$label .= sprintf(' (+€%.2f)', $service->price);
|
||||
} elseif ($service->price < 0) {
|
||||
$label .= sprintf(' (-€%.2f Discount)', abs($service->price));
|
||||
}
|
||||
if ($service->price > 0) {
|
||||
$label .= sprintf(' (€%s)', number_format($service->price, 2, ',', '.'));
|
||||
} else {
|
||||
$label .= sprintf(' (-%s€ Rabatt)', number_format(abs($service->price), 2, ',', '.'));
|
||||
}
|
||||
|
||||
// Add availability warning if limited
|
||||
|
||||
Reference in New Issue
Block a user