fix: exclude pickup surcharge when self-organized outbound
This commit is contained in:
@@ -230,7 +230,12 @@ class ParticipantPricingCalculator
|
||||
}
|
||||
}
|
||||
|
||||
if (null !== $participant->pickup && null !== $participant->pickup->price) {
|
||||
// Pickup pricing - only charged when outbound transportation is bus
|
||||
// BusProNet API ignores pickup surcharges for self-organized (PKW) outbound
|
||||
$hasOutboundBus = null !== $participant->transportationOutbound
|
||||
&& 'BUS' === $participant->transportationOutbound->subType;
|
||||
|
||||
if ($hasOutboundBus && null !== $participant->pickup && null !== $participant->pickup->price) {
|
||||
$serviceTotal += $participant->pickup->price;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,8 +129,12 @@ class ServicePricingCalculator
|
||||
}
|
||||
}
|
||||
|
||||
// Pickup pricing (unified for both directions)
|
||||
if (null !== $participant->pickup && null !== $participant->pickup->price) {
|
||||
// Pickup pricing - only charged when outbound transportation is bus
|
||||
// BusProNet API ignores pickup surcharges for self-organized (PKW) outbound
|
||||
$hasOutboundBus = null !== $participant->transportationOutbound
|
||||
&& 'BUS' === $participant->transportationOutbound->subType;
|
||||
|
||||
if ($hasOutboundBus && null !== $participant->pickup && null !== $participant->pickup->price) {
|
||||
if ($participant->pickup->price < 0) {
|
||||
$participantTransportationDiscountCost += $participant->pickup->price;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user