updated isOccupancy function

This commit is contained in:
Shreesh Arora
2023-04-05 17:40:02 +05:30
parent 48ab004e55
commit 278f20dbd5
5 changed files with 32 additions and 37 deletions

View File

@@ -123,7 +123,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
}
$occupancy = Tools::getValue('occupancy');
if (!Validate::isOccupancies($occupancy)) {
if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
}
@@ -615,7 +615,7 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$date_from = Tools::getValue('date_from');
$date_to = Tools::getValue('date_to');
$occupancy = Tools::getValue('occupancy');
if (!Validate::isOccupancies($occupancy)) {
if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
}

View File

@@ -184,7 +184,7 @@ class WkRoomSearchHelper
if ($occupancyEnabled) {
// send occupancy information searched by the user
if ($occupancies = Tools::getvalue('occupancy')) {
if (Validate::isOccupancies($occupancies)) {
if (Validate::isOccupancy($occupancies)) {
if ($searchedData['occupancies'] = $occupancies) {
$searchedData['occupancy_adults'] = array_sum(
array_column($searchedData['occupancies'], 'adults')