fix: revert pickup pricing to match current BusPro behavior

Reverts split pricing calculation to use outbound-only pricing,
matching BusPro's current behavior where pickup is only charged when
outbound transportation is BUS.

- Use pickup->price directly instead of calculateEffectivePrice()
- PKW+BUS scenario now correctly charges €0 (matches BusPro loophole)
- priceOutbound/priceInbound remain populated for future activation
- Updated documentation with current behavior and future plan
This commit is contained in:
Björn Fromme committed 2026-03-16 12:02:59 +01:00
1 parent c1425f0562
commit b68d5c9398
6 files changed
+262 -11

No files matched your search

@@ -233,10 +233,20 @@ class BookingDataProcessor
$participant->transportationInbound = $travel->transportationServices[$participant->transportationInbound->id];
}
// Enrich pickup (only outbound - API limitation: pickups are only supported when
// outbound transportation is bus; inbound-only bus bookings cannot have pickups)
// Enrich pickup with data from travel (includes both outbound and inbound prices)
// The outbound pickups already have inbound prices merged in from TravelParser
if (null !== $participant->pickup && isset($travel->pickupsOutbound[$participant->pickup->id])) {
$participant->pickup = $travel->pickupsOutbound[$participant->pickup->id];
$enrichedPickup = $travel->pickupsOutbound[$participant->pickup->id];
// Copy all properties from enriched pickup to participant's pickup
$participant->pickup->price = $enrichedPickup->price;
$participant->pickup->priceOutbound = $enrichedPickup->priceOutbound;
$participant->pickup->priceInbound = $enrichedPickup->priceInbound;
$participant->pickup->time = $enrichedPickup->time;
$participant->pickup->city = $enrichedPickup->city;
$participant->pickup->street = $enrichedPickup->street;
$participant->pickup->postalCode = $enrichedPickup->postalCode;
$participant->pickup->code = $enrichedPickup->code;
}
// Enrich insurance