Fixed: The same feature price is applied to same room for different dates

This commit is contained in:
vishalsingh.qlo325
2025-01-20 13:23:41 +05:30
parent 950b37ed1c
commit d702733134

View File

@@ -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;
}