feat: force booking status 'O' for selection id 1473
addresses #869d79q0r
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user