feat: selectable drop-offs for inbound bus travel

This commit is contained in:
Björn Fromme committed 2026-03-16 12:03:00 +01:00
1 parent f8a56b7de2
commit f795a3ea21
31 files changed
+701 -200

No files matched your search

@@ -111,6 +111,7 @@ class ParticipantPricingCalculator
'transportationOut' => $participant->transportationOutbound?->id ?? 'none',
'transportationIn' => $participant->transportationInbound?->id ?? 'none',
'pickup' => $participant->pickup?->id ?? 'none',
'dropOff' => $participant->dropOff?->id ?? 'none',
'parking' => $participant->parkingService?->id ?? 'none',
'courses' => implode('_', array_map(fn ($s) => $s->id, $participant->courses ?? [])),
'additionalServices' => implode('_', array_map(fn ($s) => $s->id, $participant->additionalServices ?? [])),
@@ -240,6 +241,11 @@ class ParticipantPricingCalculator
$serviceTotal += $participant->pickup->price;
}
// Drop-off pricing (charged when inbound transportation is BUS and a drop-off is selected)
if (null !== $participant->dropOff && null !== $participant->dropOff->price) {
$serviceTotal += $participant->dropOff->price;
}
if (null !== $participant->parkingService && null !== $participant->parkingService->price) {
if (false === $onlyInsuranceCalculationServices || true === $participant->parkingService->includeInInsuranceCalculation) {
$serviceTotal += $participant->parkingService->price;