fix: correctly determine room status on date import
This commit is contained in:
@@ -634,9 +634,12 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
$minPriceOverall = $price;
|
$minPriceOverall = $price;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($roomXml->attributes()['status'] === static::STATUS_STOP && $price) {
|
// Determine status
|
||||||
|
$statusXml = (string) $roomXml->attributes()['status'];
|
||||||
|
|
||||||
|
if (static::STATUS_STOP === $statusXml && $price) {
|
||||||
$status = Room::ROOM_STATUS_FULLY_BOOKED;
|
$status = Room::ROOM_STATUS_FULLY_BOOKED;
|
||||||
} elseif ($roomXml->attributes()['status'] === static::STATUS_ON_REQUEST) {
|
} elseif (static::STATUS_ON_REQUEST === $statusXml) {
|
||||||
$status = Room::ROOM_STATUS_ON_REQUEST;
|
$status = Room::ROOM_STATUS_ON_REQUEST;
|
||||||
} else {
|
} else {
|
||||||
$status = Room::ROOM_STATUS_AVAILABLE;
|
$status = Room::ROOM_STATUS_AVAILABLE;
|
||||||
|
|||||||
Reference in New Issue
Block a user