Fixed incorrect price in admin book now page

This commit is contained in:
Shreesh Arora
2024-11-11 13:09:58 +05:30
parent f861e10115
commit cd18dd90af

View File

@@ -1114,7 +1114,13 @@ class HotelCartBookingData extends ObjectModel
$cart_detail_data[$key]['date_to'] = $value['date_to'];
$cart_detail_data[$key]['child_ages'] = json_decode($value['child_ages']);
$occupancy = array(
array(
'adults' => $value['adults'],
'children' => $value['children'],
'child_ages' => json_decode($value['child_ages'])
)
);
$unit_price = Product::getPriceStatic($value['id_product'], true);
$unit_price_tax_excl = Product::getPriceStatic($value['id_product'], false);
$productPriceWithoutReduction = $productObj->getPriceWithoutReduct(false);
@@ -1127,7 +1133,9 @@ class HotelCartBookingData extends ObjectModel
$id_cart,
$value['id_guest'],
$value['id_room'],
0
0,
1,
$occupancy
);
$feature_price_tax_excl = HotelRoomTypeFeaturePricing::getRoomTypeFeaturePricesPerDay(
$value['id_product'],
@@ -1138,7 +1146,9 @@ class HotelCartBookingData extends ObjectModel
$id_cart,
$value['id_guest'],
$value['id_room'],
0
0,
1,
$occupancy
);
$feature_price_diff = (float)($productPriceWithoutReduction - $feature_price);
$cart_detail_data[$key]['product_price'] = $unit_price;
@@ -1240,7 +1250,7 @@ class HotelCartBookingData extends ObjectModel
$value['id_product'],
$value['date_from'],
$value['date_to'],
0,
$occupancy,
0,
$id_cart,
$value['id_guest'],