Fixed: correction of the variable declaration

This commit is contained in:
Amit sharma
2025-12-26 16:32:27 +05:30
parent 3df30a2ecc
commit 3dc4100851

View File

@@ -2578,15 +2578,10 @@ class OrderCore extends ObjectModel
$totals = array_reduce($serviceProductDetail, function ($carry, $item) use ($order_detail) {
$objHotelBookingDetail = new HotelBookingDetail((int) $item['id_htl_booking_detail']);
$numDays = 1;
if (Product::PRICE_CALCULATION_METHOD_PER_DAY == $order_detail['product_price_calculation_method']) {
$calculatedDays = HotelHelper::getNumberOfDays(
$objHotelBookingDetail->date_from,
$objHotelBookingDetail->date_to
);
if ($calculatedDays) {
$numDays = $calculatedDays;
}
if ((Product::PRICE_CALCULATION_METHOD_PER_DAY == $order_detail['product_price_calculation_method'])
&& (!$numDays = HotelHelper::getNumberOfDays($objHotelBookingDetail->date_from, $objHotelBookingDetail->date_to))
) {
$numDays = 1;
}
if (!empty($item['id_tax_rules_group'])) {