chore: remove debug statements
This commit is contained in:
@@ -75,14 +75,7 @@ class BookingFingerprintService
|
||||
];
|
||||
}
|
||||
|
||||
$fingerprint = hash('sha256', serialize($data));
|
||||
|
||||
if ($logData) {
|
||||
error_log(sprintf('[Fingerprint] Generated fingerprint: %s', $fingerprint));
|
||||
error_log(sprintf('[Fingerprint] Serialized data: %s', serialize($data)));
|
||||
}
|
||||
|
||||
return $fingerprint;
|
||||
return hash('sha256', serialize($data));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,52 +114,8 @@ class BookingFingerprintService
|
||||
}
|
||||
|
||||
$currentFingerprint = $this->generateFingerprint($bookingDto);
|
||||
$isDirty = $bookingDto->originalFingerprint !== $currentFingerprint;
|
||||
|
||||
// Debug logging to identify what changed
|
||||
if ($isDirty) {
|
||||
error_log(sprintf('[Fingerprint] DIRTY DETECTED! Original: %s, Current: %s', $bookingDto->originalFingerprint, $currentFingerprint));
|
||||
$this->logFingerprintDiff($bookingDto);
|
||||
}
|
||||
|
||||
return $isDirty;
|
||||
return $bookingDto->originalFingerprint !== $currentFingerprint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs detailed fingerprint data for debugging dirty state issues.
|
||||
*/
|
||||
private function logFingerprintDiff(BookingDto $bookingDto): void
|
||||
{
|
||||
foreach ($bookingDto->participants as $index => $participant) {
|
||||
$participantData = [
|
||||
'firstName' => $participant->firstName,
|
||||
'lastName' => $participant->lastName,
|
||||
'dateOfBirth' => $participant->dateOfBirth?->format('Y-m-d'),
|
||||
'email' => $participant->email,
|
||||
'mobile' => $participant->mobile,
|
||||
'gender' => $participant->gender,
|
||||
'nationality' => $participant->nationality,
|
||||
'address' => [
|
||||
'street' => $participant->address?->street,
|
||||
'postCode' => $participant->address?->postCode,
|
||||
'city' => $participant->address?->city,
|
||||
'country' => $participant->address?->country,
|
||||
],
|
||||
'services' => [
|
||||
'skiPass' => $participant->skiPass?->id,
|
||||
'courses' => $this->normalizeServiceArray($participant->courses),
|
||||
'board' => $this->normalizeServiceArray($participant->board),
|
||||
'rentals' => $this->normalizeServiceArray($participant->rentals),
|
||||
'rentalInsurance' => $participant->rentalInsurance?->id,
|
||||
'additionalServices' => $this->normalizeServiceArray($participant->additionalServices),
|
||||
'transportationOutbound' => $participant->transportationOutbound?->id,
|
||||
'transportationInbound' => $participant->transportationInbound?->id,
|
||||
'pickup' => $participant->pickup?->id,
|
||||
'parking' => $participant->parking,
|
||||
],
|
||||
];
|
||||
|
||||
error_log(sprintf('[Fingerprint] Participant %d data: %s', $index, json_encode($participantData)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,28 +321,8 @@ class InsuranceMatchingService
|
||||
*/
|
||||
private function calculateTravelPrice(BookingDto $booking, int $participantIndex): float
|
||||
{
|
||||
$participant = $booking->getParticipant($participantIndex);
|
||||
|
||||
// Debug logging to understand price calculation
|
||||
if (null !== $participant && null !== $participant->insurance) {
|
||||
error_log(sprintf(
|
||||
'[InsuranceMatching] Participant %d: calculating travel price WITH insurance=%d (€%.2f) currently selected',
|
||||
$participantIndex,
|
||||
$participant->insurance->id,
|
||||
$participant->insurance->price ?? 0.0
|
||||
));
|
||||
}
|
||||
|
||||
// Use the price calculator to get the participant's individual price excluding insurance
|
||||
$travelPrice = $this->priceCalculatorService->calculateIndividualParticipantPriceExcludingInsurance($booking, $participantIndex);
|
||||
|
||||
error_log(sprintf(
|
||||
'[InsuranceMatching] Participant %d: calculated travel price (excluding insurance) = €%.2f',
|
||||
$participantIndex,
|
||||
$travelPrice
|
||||
));
|
||||
|
||||
return $travelPrice;
|
||||
return $this->priceCalculatorService->calculateIndividualParticipantPriceExcludingInsurance($booking, $participantIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user