wip: bulk insurance refactoring

This commit is contained in:
Björn Fromme
2025-10-18 16:39:57 +02:00
parent 08210b8e52
commit 479b177e90
9 changed files with 359 additions and 51 deletions
@@ -774,9 +774,8 @@ class BookingPriceCalculatorService
// This mirrors the logic in BookingDataProcessor::applyBulkInsuranceIfActive()
$availableInsurances = $bookingDto->travel->insurances;
// Exclude complementary insurances
$availableInsurances = array_filter($availableInsurances, fn ($insurance) => false === $insurance->complementary);
$availableInsurances = array_values($availableInsurances);
// Exclude complementary insurances (only available as part of packages)
$availableInsurances = $this->insuranceTypeFilterService->filterNonComplementary($availableInsurances);
// Get insurances of the same type as applicant's selection
$sameTypeInsurances = $this->insuranceTypeFilterService->filterByType(