From f43fdd84f396c368860eb2606a719a4188c91c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Fri, 13 Mar 2020 14:11:24 +0100 Subject: [PATCH] Skip all unavailable rooms when importing for the time being --- .../ep_products/Classes/Service/DateImportService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php index 7aed681a..df51f84f 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php @@ -552,12 +552,14 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface $available = (int) $roomXml->attributes()['verfuegbar']; $price = (int) $roomXml->attributes()['preis']; - // Skip rooms with zero price and zero availability. - // Hint: Rooms with price, zero availability AND status stop will be - // marked 'fully booked' by convention - if (!$available && !$price) { + // Skip all unavailable rooms + if (!$available) { continue; } + // Skip rooms with zero price and zero availability. + //if (!$available && !$price) { + // continue; + //} $pax = (int) $roomXml->attributes()['MaxPax']; $availableTotal += $available * $pax;