Fix failing contingent calculation due to missing typecast
This commit is contained in:
@@ -207,11 +207,12 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
|
||||
$types = [];
|
||||
foreach ($xmlTypes->unterbringung as $xmlType)
|
||||
{
|
||||
$code = (string) $xmlType['code'];
|
||||
$types[(string) $xmlType['idbuspro']] = [
|
||||
'pax' => (int) $xmlType['pax_max'],
|
||||
'code' => (string) $xmlType['code'],
|
||||
'code' => $code,
|
||||
'label' => (string) $xmlType['zimmerbezeichnung'],
|
||||
'ctrl' => (string) $xmlType['code'] === self::ROOMCODE_STATUS,
|
||||
'ctrl' => $code === self::ROOMCODE_STATUS,
|
||||
];
|
||||
}
|
||||
return $types;
|
||||
@@ -249,7 +250,7 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
|
||||
$status = Contingent::STATUS_BLOCKED;
|
||||
}
|
||||
} else {
|
||||
$capacity = (int) $xmlRoom['kontingent'] * $roomType['pax'];
|
||||
$capacity = (int) $xmlRoom['kontingent'] * (int) $roomType['pax'];
|
||||
$availableRooms = (int) $xmlRoom['frei'] > 0 ? (int) $xmlRoom['frei'] : 0;
|
||||
$availablePax = $availableRooms * $roomType['pax'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user