Fix refund rules on Guest detail page

This commit is contained in:
Abhishek Kumar
2024-03-17 12:05:22 +05:30
parent dc254cf8fa
commit 23cf1f353c
3 changed files with 13 additions and 0 deletions

View File

@@ -557,6 +557,9 @@ class GuestTrackingControllerCore extends FrontController
$objHotelBranchInformation = new HotelBranchInformation($idHotel, $this->context->language->id);
$hotelAddressInfo = HotelBranchInformation::getAddress($idHotel);
$objHotelBranchRefundRules = new HotelBranchRefundRules();
$hotelRefundRules = $objHotelBranchRefundRules->getHotelRefundRules($idHotel, 0, 1);
// set order specific values
$order->total_convenience_fee_ti = $total_convenience_fee_ti;
$order->total_convenience_fee_te = $total_convenience_fee_te;
@@ -571,6 +574,7 @@ class GuestTrackingControllerCore extends FrontController
$order->customerGuestDetail = $customerGuestDetail;
$order->obj_hotel_branch_information = $objHotelBranchInformation;
$order->hotel_address_info = $hotelAddressInfo;
$order->hotel_refund_rules = $hotelRefundRules;
//end
Hook::exec('actionOrderDetail', array('carrier' => $order->carrier, 'order' => $order));

View File

@@ -59,6 +59,7 @@
{assign var=customerGuestDetail value=$order->customerGuestDetail}
{assign var=obj_hotel_branch_information value=$order->obj_hotel_branch_information}
{assign var=hotel_address_info value=$order->hotel_address_info}
{assign var=hotel_refund_rules value=$order->hotel_refund_rules}
{if isset($order->total_old)}
{assign var=total_old value=$order->total_old}

View File

@@ -599,6 +599,14 @@
</div>
</div>
{if $is_guest}
<div class="row">
<div class="col-sm-12">
<p class="alert alert-info"><i class="icon-info-sign"></i> {l s='You cannot request refund with a guest account.'}</p>
</div>
</div>
{/if}
{if isset($refund_allowed) && $refund_allowed}
<div style="display: none;">
<div id="create-new-refund-popup">