From d702733134dcb231dc97dc229efbe8224780d814 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Mon, 20 Jan 2025 13:23:41 +0530 Subject: [PATCH] Fixed: The same feature price is applied to same room for different dates --- .../classes/HotelCartBookingData.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelCartBookingData.php b/modules/hotelreservationsystem/classes/HotelCartBookingData.php index 0cd9c678d..5585364d8 100644 --- a/modules/hotelreservationsystem/classes/HotelCartBookingData.php +++ b/modules/hotelreservationsystem/classes/HotelCartBookingData.php @@ -1359,10 +1359,11 @@ class HotelCartBookingData extends ObjectModel $id_room = 0 ) { if ($id_cart && $id_room) { - if ($featurePrice = Db::getInstance()->getRow( - 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp + if ($featurePrice = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'htl_room_type_feature_pricing` fp WHERE fp.`id_product` = '.(int) $id_product.' AND fp.`id_cart` = '.(int) $id_cart.' - AND fp.`id_guest` = '.(int) $id_guest.' AND fp.`id_room` = '.(int) $id_room.' AND fp.`active` = 1') + AND fp.`id_guest` = '.(int) $id_guest.' AND fp.`id_room` = '.(int) $id_room.' + AND fp.`active` = 1 AND fp.`date_from` <= \''.pSQL($date).'\' + AND fp.`date_to` > \''.pSQL($date).'\'') ) { return $featurePrice; }