Updated: the date to is now exclusive while calulating feature price of a room in a date range

This commit is contained in:
vishalsingh.qlo325
2025-01-20 13:24:52 +05:30
parent d702733134
commit f12690c8d6

View File

@@ -1391,7 +1391,7 @@ class HotelCartBookingData extends ObjectModel
ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.')' : '').'
WHERE fp.`id_cart` = 0 AND fp.`id_product`='.(int) $id_product.'
AND fp.`is_special_days_exists`=1 AND fp.`active`=1 AND fp.`date_from` <= \''.pSQL($date).'\'
AND fp.`date_to` >= \''.pSQL($date).'\''
AND fp.`date_to` > \''.pSQL($date).'\''
)) {
foreach ($featurePrice as $fRow) {
$specialDays = json_decode($fRow['special_days']);
@@ -1407,7 +1407,7 @@ class HotelCartBookingData extends ObjectModel
ON (fp.`id_feature_price` = fpg.`id_feature_price` AND fpg.`id_group` = '.(int) $id_group.')' : '').'
WHERE fp.`id_cart` = 0 AND fp.`id_product`='.(int) $id_product.' AND fp.`date_selection_type` = '.(int) HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE.'
AND `is_special_days_exists`=0 AND `active`=1
AND fp.`date_from` <= \''.pSQL($date).'\' AND fp.`date_to` >= \''.pSQL($date).'\''
AND fp.`date_from` <= \''.pSQL($date).'\' AND fp.`date_to` > \''.pSQL($date).'\''
)) {
return $featurePrice;
}