Merge branch 'develop' into gli-2941

This commit is contained in:
amit sharma
2026-09-08 14:22:40 +05:30
147 changed files with 10256 additions and 409 deletions

View File

@@ -950,6 +950,14 @@ class OrderOpcControllerCore extends ParentOrderController
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
$roomTypeServiceProducts = $objRoomTypeServiceProduct->getServiceProductsData($idProduct, 1, 0, true, 1);
$cartBookings = $objCartBookingData->getHotelCartRoomsInfoByRoomType($this->context->cart->id, $idProduct,$dateFrom, $dateTo);
$availableServicePricing = $objRoomTypeServiceProduct->getServiceProductsPricingForCartBookings(
$roomTypeServiceProducts,
$cartBookings,
$idProduct,
$dateFrom,
$dateTo
);
foreach($cartBookings as &$cartBookingData) {
$cartBookingData['selected_service'] = $objServiceProductCartDetail->getServiceProductsInCart(
$cartBookingData['id_cart'],
@@ -965,7 +973,22 @@ class OrderOpcControllerCore extends ParentOrderController
null,
1
);
foreach ($cartBookingData['selected_service'] as &$selectedService) {
if ($selectedService['tourism_tax'] > 0 && TaxConfiguration::isGrossedUp($selectedService['tourism_tax'])) {
$selectedService['total_price_tax_incl'] += $selectedService['tourism_tax'];
$quantity = $selectedService['quantity'] ?: 1;
$impliedNumDays = $selectedService['unit_price_tax_excl'] > 0 ? $selectedService['total_price_tax_excl'] / ($selectedService['unit_price_tax_excl'] * $quantity) : 1;
$unitDivisor = $impliedNumDays * $quantity;
$selectedService['unit_price_tax_incl'] += $unitDivisor > 0 ? ($selectedService['tourism_tax'] / $unitDivisor) : 0;
}
}
unset($selectedService);
$cartBookingData['available_service_pricing'] = isset($availableServicePricing[$cartBookingData['id']])
? $availableServicePricing[$cartBookingData['id']]
: array();
}
unset($cartBookingData);
$this->context->smarty->assign(array(
'roomTypeServiceProducts' => $roomTypeServiceProducts,
'cartRooms' => $cartBookings