show service cost seprate from room cost

This commit is contained in:
Shreesh Arora
2023-03-13 11:13:20 +05:30
parent b7be11d515
commit 1bfa256d1e
2 changed files with 35 additions and 1 deletions

View File

@@ -1331,12 +1331,26 @@ class HotelCartBookingData extends ObjectModel
$data_v['date_from'],
$data_v['date_to']
);
$roomTypeDateRangePriceWithoutAutoAdd = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
$product['id_product'],
$data_v['date_from'],
$data_v['date_to'],
0,
0,
0,
0,
0,
0
);
if (!$price_tax) {
$amount = $roomTypeDateRangePrice['total_price_tax_excl'];
$amountWithoutAutoAdd = $roomTypeDateRangePriceWithoutAutoAdd['total_price_tax_excl'];
} else {
$amount = $roomTypeDateRangePrice['total_price_tax_incl'];
$amountWithoutAutoAdd = $roomTypeDateRangePriceWithoutAutoAdd['total_price_tax_incl'];
}
$cartHotelData[$prodKey]['date_diff'][$dateJoin]['amount'] = $amount * $varQty;
$cartHotelData[$prodKey]['date_diff'][$dateJoin]['amount_without_auto_add'] = $amountWithoutAutoAdd * $varQty;
} else {
$cartHotelData[$prodKey]['date_diff'][$dateJoin]['demand_price'] = $totalAdditionalServicePrice;
$numDays = $objBookingDetail->getNumberOfDays($data_v['date_from'], $data_v['date_to']);
@@ -1359,12 +1373,26 @@ class HotelCartBookingData extends ObjectModel
$data_v['date_from'],
$data_v['date_to']
);
$roomTypeDateRangePriceWithoutAutoAdd = HotelRoomTypeFeaturePricing::getRoomTypeTotalPrice(
$product['id_product'],
$data_v['date_from'],
$data_v['date_to'],
0,
0,
0,
0,
0,
0
);
if (!$price_tax) {
$amount = $roomTypeDateRangePrice['total_price_tax_excl'];
$amountWithoutAutoAdd = $roomTypeDateRangePriceWithoutAutoAdd['total_price_tax_excl'];
} else {
$amount = $roomTypeDateRangePrice['total_price_tax_incl'];
$amountWithoutAutoAdd = $roomTypeDateRangePriceWithoutAutoAdd['total_price_tax_incl'];
}
$cartHotelData[$prodKey]['date_diff'][$dateJoin]['amount'] = $amount;
$cartHotelData[$prodKey]['date_diff'][$dateJoin]['amount_without_auto_add'] = $amountWithoutAutoAdd;
$cartHotelData[$prodKey]['date_diff'][$dateJoin]['link'] = $context->link->getPageLink(
'order-opc',
null,

View File

@@ -148,8 +148,14 @@
<div class="price_block">
<p class="total_price">
<span>
{displayPrice price=($rm_v['amount'])}
{displayPrice price=($rm_v['amount_without_auto_add'])}
</span>
<br>
{if ($rm_v['amount'] - $rm_v['amount_without_auto_add']) > 0}
<span class="total_price_detial">
+ {displayPrice price=($rm_v['amount'] - $rm_v['amount_without_auto_add'])}
</span>
{/if}
{if (isset($data_v['extra_demands']) && $data_v['extra_demands']) || (isset($data_v['service_products']) && $data_v['service_products'])}
<span class="plus-sign pull-right">
+