feat: force booking status 'O' for selection id 1473

addresses #869d79q0r
This commit is contained in:
Björn Fromme
2026-06-11 15:53:56 +02:00
parent bcf75ce3c3
commit d207bc74cb
9 changed files with 318 additions and 5 deletions
+5 -3
View File
@@ -41,6 +41,7 @@ class BookingConfigurator
*
* Handles three booking status types:
* - 'Frei': Regular booking with availability checks
* - 'Option': Create-flow override from specific rules
* - 'Anfrage': Inquiry booking, allows booking even with 0 availability
*/
public function startFreshBooking(Request $request, int $dateId, int $hotelId, ?int $agencyId = null): BookingDto
@@ -83,6 +84,7 @@ class BookingConfigurator
? $this->agencyLoader->loadById($agencyId)?->code
: null;
$bookingCreateDto->bookingStatus = $bookingStatus;
$this->applyCreateBookingStatusRules($bookingCreateDto);
$this->bookingSessionService->saveBookingDto($request, $bookingCreateDto, BookingDto::MODE_CREATE);
@@ -587,13 +589,13 @@ class BookingConfigurator
return $this->defaultBookingStatus;
}
// Fall back to allowed statuses in order of preference: F → O → A
// Fall back to allowed statuses in order of preference: F → O(option) → A
if ($travelData->isBookingStatusAllowed(Constants::BOOKING_STATUS_FREE)) {
return Constants::BOOKING_STATUS_FREE;
}
if ($travelData->isBookingStatusAllowed(Constants::BOOKING_STATUS_OPEN)) {
return Constants::BOOKING_STATUS_OPEN;
if ($travelData->isBookingStatusAllowed(Constants::BOOKING_STATUS_OPTION)) {
return Constants::BOOKING_STATUS_OPTION;
}
if ($travelData->isBookingStatusAllowed(Constants::BOOKING_STATUS_INQUIRY)) {