From 4d34a55a576b630074c26d1bfaba2a90d228df39 Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Wed, 24 Jan 2024 16:37:36 +0530 Subject: [PATCH] fix incorrect service product tax when room type wise price are not set --- .../classes/RoomTypeServiceProductPrice.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php index 7dcc50da7..b329a4e0c 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProductPrice.php @@ -68,10 +68,11 @@ class RoomTypeServiceProductPrice extends ObjectModel if ($result = Db::getInstance()->getRow(' SELECT spp.`price`, spp.`id_tax_rules_group`, p.`auto_add_to_cart`, p.`price_addition_type` FROM `'._DB_PREFIX_.'product` p + LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product` sp ON (sp.`id_product` = p.`id_product`) LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product_price` spp ON (spp.`id_product` = p.`id_product`) WHERE p.`id_product`='.(int)$idProduct. - ' AND spp.`id_element`='.(int)$idElement. - ' AND spp.`element_type`='.(int)$elementType) + ' AND sp.`id_element`='.(int)$idElement. + ' AND sp.`element_type`='.(int)$elementType) ) { if ($result['auto_add_to_cart'] && $result['price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM) { // if service is auto add to cart and added in room price, we need to find room type tax rule group