Add ignored room types

This commit is contained in:
Björn Fromme
2021-06-08 17:44:20 +02:00
parent d9330c2a17
commit b4e7179e8d
@@ -43,6 +43,11 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
const ROOMCODE_STATUS = 'BelKal';
/**
* @var string[]
*/
protected $ignoredRoomTypes = ['PDGS', 'TEAM'];
/**
* @var ConfigurationManagerInterface
*/
@@ -240,6 +245,9 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
}
$roomType = $roomTypes[$roomTypeBusProId];
$roomCode = $roomType['code'];
if (in_array($roomCode, $this->ignoredRoomTypes, true)) {
continue;
}
$availablePax = 0;
$capacity = 0;
if ($roomType['ctrl'] === true) {
@@ -254,9 +262,6 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
$availableRooms = (int) $xmlRoom['frei'] > 0 ? (int) $xmlRoom['frei'] : 0;
$availablePax = $availableRooms * $roomType['pax'];
}
if ($availablePax === 0 && $roomType['ctrl'] === false) {
//continue;
}
$minPrice = (int) $xmlRoom['abpreis'];
$minNights = (int) $xmlRoom['abpreis_naechte'];
$additionalNightMinPrice = (int) $xmlRoom['abpreis_verlaengerung'];