From ef75383885334f375a1d7b3846eeccd2e04e8b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 17 Dec 2025 16:04:19 +0100 Subject: [PATCH] fix: don't show bulk insurance labels in summary --- src/Service/ServicePricingCalculator.php | 3 ++- templates/booking/_participant_form.html.twig | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Service/ServicePricingCalculator.php b/src/Service/ServicePricingCalculator.php index be19dfa..d367f4f 100644 --- a/src/Service/ServicePricingCalculator.php +++ b/src/Service/ServicePricingCalculator.php @@ -295,9 +295,10 @@ class ServicePricingCalculator } // Resolve insurance: use price-tier-adjusted insurance for bulk assignment + // Skip synthetic "no insurance" option - it's a UI construct that shouldn't appear in summary $insuranceToAggregate = $this->resolveInsuranceForAggregation($participant, $bookingDto); - if (null !== $insuranceToAggregate && null !== $insuranceToAggregate->price) { + if (null !== $insuranceToAggregate && null !== $insuranceToAggregate->price && false === $insuranceToAggregate->isNoInsurance()) { $this->addInsuranceToServiceAggregation($serviceAggregation, $insuranceToAggregate, 1); } diff --git a/templates/booking/_participant_form.html.twig b/templates/booking/_participant_form.html.twig index d76f44f..3e7aa85 100644 --- a/templates/booking/_participant_form.html.twig +++ b/templates/booking/_participant_form.html.twig @@ -65,7 +65,7 @@ {% endmacro %} {# Macro to render a checkbox table row (for trailing checkboxes like rental insurance, parking, bulk insurance) #} -{% macro checkbox_row(checkboxField, label, price, tooltipText, tooltipLabel, widgetAttr = {}) %} +{% macro checkbox_row(checkboxField, label, price, tooltipText, tooltipLabel, widgetAttr = {}, showPrice = true) %} {% set isReadonly = checkboxField.vars.attr.readonly is defined %} @@ -82,7 +82,7 @@ {%- endif -%} - {{ price | format_service_price }} + {{ price | format_service_price(showPrice) }} {% set fieldTooltip = checkboxField.vars.attr['data-tooltip']|default(null) %} @@ -503,7 +503,8 @@ null, form.bulkInsuranceBooking.vars.attr['data-description']|default(null), 'Info', - htmxAttr + htmxAttr, + false ) }} {% endif %} {% for child in form.insurance %}