From bf4abd7e32a3c8e79726f5a1a6eb6c9d87a43eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 8 Apr 2025 12:06:14 +0200 Subject: [PATCH] fix: display pickup street --- src/Form/ParticipantType.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Form/ParticipantType.php b/src/Form/ParticipantType.php index d81b151..f725431 100644 --- a/src/Form/ParticipantType.php +++ b/src/Form/ParticipantType.php @@ -281,14 +281,20 @@ class ParticipantType extends AbstractType return null; } + $pickupLabel = $pickup->city; + + if (null !== $pickup->street) { + $pickupLabel .= ' ('.$pickup->street.')'; + } + $price = $pickup->price; if (null === $price || 0.0 === $price) { - return $pickup->city; + return $pickupLabel; } - return sprintf('%s (%s €)', - $pickup->city, + return sprintf('%s %s€', + $pickupLabel, number_format($price, 2, ',', '.') ); },