Merge branch 'develop' into gli-3047

This commit is contained in:
azhar bhat
2026-08-06 16:51:34 +05:30
7 changed files with 97 additions and 144 deletions

View File

@@ -117,7 +117,7 @@
{l s='Delete'}
</button>
{else}
<div class="btn-group">
<div class="btn-group pull-right">
{* <button type="button" class="btn btn-default delete_product_line">
<i class="icon-trash"></i>
{l s='Delete'}

View File

@@ -24,30 +24,28 @@
*}
<tr class="product-line-row" data-id_htl_booking="{$data.id|escape:'html':'UTF-8'}" data-id_room="{$data.id_room}" data-id_product="{$data.id_product}" data-id_hotel="{$data.id_hotel}" data-date_from="{$data.date_from}" data-date_to="{$data.date_to}" data-product_price="{$data.unit_amt_tax_incl}" data-id_order_detail="{$data.id_order_detail}">
<td>
<p>{$data.room_num}
{if isset($data['connected_rooms'][$data.id_room])}
{include file="controllers/products/connected-rooms.tpl" htl_connected_rooms=$data['connected_rooms'][$data.id_room]}
{/if}
</p>
<td class="center">
<p>{$data.room_num}</p>
<p><a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&amp;id_product={$data.id_product}&amp;updateproduct" target="_blank"><span>{$data.room_type}</span></a></p>
{if $data.is_back_order}
<span class="overbooked_room">{l s='overbooked'}</span>
{/if}
{if isset($data['connected_rooms'][$data.id_room])}
{include file="controllers/products/connected-rooms.tpl" htl_connected_rooms=$data['connected_rooms'][$data.id_room]}
{/if}
</td>
<td><img src="{$data.image_link}" title="{l s='Room image'}"></td>
<td>
<p><a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&amp;id_product={$data.id_product}&amp;updateproduct" target="_blank"><span>{$data.room_type}</span></a></p>
</td>
<td>
<td class="center"><img width="80px" src="{$data.image_link}" title="{l s='Room image'}"></td>
<td class="center">
{assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))}
{dateFormat date=$data.date_from full=$is_full_date} - {dateFormat date=$data.date_to full=$is_full_date}
<p>{dateFormat date=$data.date_from full=$is_full_date}</p>
<p>{l s='to'}</p>
<p>{dateFormat date=$data.date_to full=$is_full_date}</p>
</td>
<td>
<td class="center">
<p>{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}</p>
{if $data['children']}
<div class="dropdown">
<a data-toggle="dropdown">
<span>{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}</span>
</a>
<a data-toggle="dropdown"><span>{$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}</span></a>
<div class="dropdown-menu well well-sm">
<label>{l s='Children Ages'}</label>
{if isset($data['child_ages']) && $data['child_ages']}
@@ -63,19 +61,41 @@
{/if}
</div>
</div>
{else}
{if $data['adults']}{$data['adults']}{/if} {if $data['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if {$data['children']}}, {$data['children']} {if $data['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if}
{/if}
</td>
<td>
<td class="center">
<p>
{if ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']) || ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status'])}
<span class="text-danger room_status">{dateFormat date=$data['check_in'] full=1}</span>
{else}
--
{/if}
</p>
<p>
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
<span class="text-success room_status">{dateFormat date=$data['check_out'] full=1}</span>
{else}
--
{/if}
</p>
</td>
<td class="center">
{if $data['booking_type'] == $ALLOTMENT_MANUAL}
{l s='Manual'} &nbsp;{if $data['comment'] != ''}<a class="manual_allotment_comment" href="#" data-id_hotel_booking_detail="{$data['id']}"><i class="icon-info-circle"></i></a>{/if}
{else}
{l s='Auto'}
{/if}
</td>
<td class="center">
<p>
<span class="room_type_current_price">
{convertPriceWithCurrency price=$data['total_price_tax_excl'] currency=$currency->id}
</span>
</p>
<p class="help-block">{l s='Per day price:'} {convertPriceWithCurrency price=$data['paid_unit_price_tax_excl'] currency=$currency->id}</p>
<p class="help-block">{convertPriceWithCurrency price=$data['paid_unit_price_tax_excl'] currency=$currency->id}/{l s='day'}</p>
</td>
<td>
<td class="center">
{convertPriceWithCurrency price=($data['extra_demands_price_te'] + $data['additional_services_price_te'] + $data['convenience_fee_te'] + $data['additional_services_price_auto_add_te']) currency=$currency->id}
{if $data['extra_demands']|count || $data['additional_services']|count}
<a class="open_room_extra_services" href="#" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" id_htl_booking="{$data['id']}">
@@ -83,37 +103,37 @@
</a>
{/if}
</td>
<td>
<td class="center">
{convertPriceWithCurrency price=($data['total_room_tax']) currency=$currency->id}
</td>
<td>
<td class="center">
{convertPriceWithCurrency price=($data['total_room_price_ti']) currency=$currency->id}
</td>
{if (isset($refundReqBookings) && $refundReqBookings)}
<td>
{if $data.id|in_array:$refundReqBookings}
{if $data.is_cancelled}
<span class="badge badge-danger">{l s='Cancelled'}</span>
{elseif isset($data.refund_info) && (!$data.refund_info.refunded || $data.refund_info.id_customization)}
<span class="badge" style="background-color:{$data.refund_info.color|escape:'html':'UTF-8'}">{$data.refund_info.name|escape:'html':'UTF-8'}</span>
{else}
<span>--</span>
{/if}
{else}
<span>--</span>
{/if}
</td>
<td>
{if $data.is_refunded && isset($data.refund_info) && $data.refund_info}
{convertPriceWithCurrency price=$data.refund_info.refunded_amount currency=$currency->id}
{else}
--
{/if}
<td class="center">
<p>
{if $data.id|in_array:$refundReqBookings}
{if $data.is_cancelled}
<span class="badge badge-danger">{l s='Cancelled'}</span>
{elseif isset($data.refund_info) && (!$data.refund_info.refunded || $data.refund_info.id_customization)}
<span class="badge" style="background-color:{$data.refund_info.color|escape:'html':'UTF-8'}">{$data.refund_info.name|escape:'html':'UTF-8'}</span>
{else}
<span>--</span>
{/if}
{else}
<span>--</span>
{/if}
</p>
{if $data.is_refunded && isset($data.refund_info) && $data.refund_info}
<p class="badge badge-success refunded_amount">
{convertPriceWithCurrency price=$data.refund_info.refunded_amount currency=$currency->id}
</p>
{/if}
</td>
{/if}
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_action">
<div class="btn-group">
<td class="product_action center">
<div class="btn-group pull-right">
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_cancelled}
<button href="#" class="btn btn-default delete_room_line">
<i class="icon-trash"></i>
@@ -128,6 +148,22 @@
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}
{else}
<li>
<a href="#" class="open_room_status_form" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}" data-check_in="{$data['check_in']}" data-check_out="{$data['check_out']}">
<i class="icon-clock-o"></i>
{l s='Room Status'}
</a>
</li>
{/if}
<li>
<a href="#" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
<i class="icon-file-text"></i>
{l s='Documents'}
<span class="badge badge-info">{if $data.num_checkin_documents > 0}{$data.num_checkin_documents}{else}0{/if}</span>
</a>
</li>
<li>
<a href="#" class="room_reallocate_swap" id="reallocate_room_{$data['id']}" data-room_type_name="{$data['room_type_name']}" data-toggle="modal" data-target="#mySwappigModal" data-id_htl_booking="{$data['id']}" data-id_order="{$data['id_order']}" data-room_num='{$data.room_num}' data-id_room_type='{$data.id_product}' data-cust_name='{$data.alloted_cust_name}' data-cust_email='{$data.alloted_cust_email}' data-avail_rm_swap='{$data.avail_rooms_to_swap|@json_encode}' data-avail_realloc_room_types='{$data.avail_room_types_to_realloc|@json_encode}' data-allotment_type='{$data.booking_type}' data-allotment_type_label='{if $data.booking_type == $ALLOTMENT_MANUAL}{l s='Manual'}{else}{l s='Auto'}{/if}' data-comment='{$data.comment}'>
<i class="icon-refresh"></i>

View File

@@ -27,21 +27,21 @@
<table class="table" id="customer_cart_details">
<thead>
<tr>
<th><span class="title_box">{l s='Room No.'}</span></th>
<th><span class="title_box">{l s='Image'}</th>
<th><span class="title_box">{l s='Room Type'}</span></th>
<th><span class="title_box">{l s='Duration'}</span></th>
<th class="fixed-width-lg"><span class="title_box">{l s='Occupancy'}</span></th>
<th><span class="title_box">{l s='Room Price (Tax excl.)'}</span></th>
<th><span class="title_box">{l s='Extra Services/Fee (Tax excl.)'}</span></th>
<th><span class="title_box">{l s='Total Tax'}</span></th>
<th><span class="title_box">{l s='Total Price (Tax incl.)'}</span></th>
<th class="center"><span ><p>{l s='Room'}</p></span></th>
<th class="center"><span >{l s='Image'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Booking check-in and check-out dates'}">{l s='Duration'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Number of adults and children'}">{l s='Occupancy'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Guest check-in and check-out date/time'}">{l s='Check-in/Check-out'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Whether the room was auto-allotted or manually assigned with a remark.'}">{l s='Allotment'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Base room price for the stay duration, excluding tax'}"><div>{l s='Room Price'}</div><div>{l s='(Tax excl.)'}</div></span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Total cost of extra services, auto added services and convenience fee for this room, excluding tax'}"><div>{l s='Extra Services'}</div><div>{l s='(Tax excl.)'}</div></span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Total tax applied on this room booking'}">{l s='Total Tax'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Total price of the room including extra services/fees, tax included'}"><div>{l s='Total Price'}</div><div>{l s='(Tax incl.)'}</div></span></th>
{if (isset($refundReqBookings) && $refundReqBookings)}
<th><span class="title_box">{l s='Refund/Cancel Status'}</span></th>
<th><span class="title_box">{l s='Refunded amount'}</span></th>
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Refund or cancellation status and refunded amount for this room booking'}">{l s='Refund'}</span></th>
{/if}
{if ($can_edit && !$order->hasBeenDelivered())}
<th class="fixed-width-md"><span class="title_box">{l s='Actions'}</th>
<th class="fixed-width-md center"><span >{l s='Actions'}</span></th>
{/if}
</tr>
</thead>

View File

@@ -117,7 +117,7 @@
{l s='Delete'}
</button>
{else}
<div class="btn-group">
<div class="btn-group pull-right">
{* <button type="button" class="btn btn-default delete_product_line">
<i class="icon-trash"></i>
{l s='Delete'}

View File

@@ -88,90 +88,6 @@
<div class="row">
<div class="col-lg-7">
{if isset($htl_booking_order_data) && $htl_booking_order_data}
<div class="panel">
<div class="panel-heading order_status_heading">
<i class="icon-bed"></i> &nbsp;{l s='Rooms Status'}
</div>
<div class="panel-content">
<div class="row">
<div class="col-lg-12 table-responsive" id="room_status_info_wrapper">
<table class="table">
<thead>
<tr>
<th>{l s='Room'}</th>
<th>{l s='Duration'}</th>
<th>{l s='Check-In'}</th>
<th>{l s='Check-Out'}</th>
<th>{l s='Allotment'}</th>
<th>{l s='Action'}</th>
</tr>
</thead>
<tbody>
{if isset($htl_booking_order_data) && $htl_booking_order_data}
{foreach from=$htl_booking_order_data item=data}
<tr>
<td>
{$data['room_num']}<br>
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&amp;id_product={$data['id_product']}&amp;updateproduct" target="_blank">{$data['room_type_name']|escape:'html':'UTF-8'}</a>
</td>
<td>
{assign var="is_full_date" value=($show_full_date && ($data['date_from']|date_format:'%D' == $data['date_to']|date_format:'%D'))}
{dateFormat date=$data['date_from'] full=$is_full_date} - {dateFormat date=$data['date_to'] full=$is_full_date}
</td>
<td>
{if ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']) || ($data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status'])}
<span class="text-danger room_status">{l s='Checked in on'}<br>{dateFormat date=$data['check_in'] full=1}</span>
{else}
--
{/if}
</td>
<td>
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
<span class="text-success room_status">{l s='Checked out on'}<br>{dateFormat date=$data['check_out'] full=1}</span>
{else}
--
{/if}
</td>
<td>
{if $data['booking_type'] == $ALLOTMENT_MANUAL}
{l s='Manual'} &nbsp;{if $data['comment'] != ''}<a class="manual_allotment_comment" href="#" data-id_hotel_booking_detail="{$data['id']}"><i class="icon-info-circle"></i></a>{/if}
{else}
{l s='Auto'}
{/if}
</td>
<td>
<a title="{l s='Upload/Check guest documents'}" class="btn btn-default" href="#" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
<span class="badge badge-info">{if $data.num_checkin_documents > 0}{$data.num_checkin_documents}{else}0{/if}</span> <i class="icon-file-text"></i>
</a>
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}
<span class="badge badge-danger">{if $data.is_cancelled}{l s='Cancelled'}{else}{l s='Refunded'}{/if}</span>
{elseif $can_edit}
<a class="open_room_status_form btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}" data-check_in="{$data['check_in']}" data-check_out="{$data['check_out']}">
<i class="icon-pencil"></i> {l s='Edit'}
</a>
{/if}
</td>
</tr>
{/foreach}
{else}
<tr>
<td class="list-empty hidden-print" colspan="6">
<div class="list-empty-msg">
<i class="icon-warning-sign list-empty-icon"></i>
{l s='No rooms found'}
</div>
</td>
</tr>
{/if}
</tbody>
</table>
</div>
</div>
</div>
</div>
{/if}
<div class="panel">
<div class="panel-heading">
<i class="icon-file"></i> &nbsp;{l s='Order'}

View File

@@ -43,7 +43,7 @@
<div class="edit_room_fields">
<div class="row form-group">
<div class="col-sm-6 room_check_in_div">
<label class="control-label">{l s='Check-In'}</label>
<label class="control-label">{l s='Date From'}</label>
<div class="input-group">
<input type="hidden" class="edit_product_date_from_actual" name="edit_product[date_from]"/>
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}
@@ -55,7 +55,7 @@
</div>
</div>
<div class="col-sm-6 room_check_out_div">
<label class="control-label">{l s='Check-Out'}</label>
<label class="control-label">{l s='Date To'}</label>
<div class="input-group">
<input type="hidden" class="edit_product_date_to_actual" name="edit_product[date_to]"/>
{if isset($refundReqBookings) && $refundReqBookings && $data.id|in_array:$refundReqBookings && $data.is_refunded}

View File

@@ -3583,6 +3583,7 @@ class AdminOrdersControllerCore extends AdminController
$order_detail_data[$key]['amt_with_qty_tax_incl'] = $value['total_price_tax_incl'];
$order_detail_data[$key]['room_type_info'] = $objHotelRoomType->getRoomTypeInfoByIdProduct($value['id_product']);
$order_detail_data[$key]['total_room_tax'] = $order_detail_data[$key]['total_room_price_ti'] - $order_detail_data[$key]['total_room_price_te'];
$order_detail_data[$key]['num_checkin_documents'] = HotelBookingDocument::getCountByIdHtlBooking($value['id']);
$order_detail_data[$key]['connected_rooms'] = HotelConnectedRoom::getConnectedRooms($value['id_room'], null, null, (int) Context::getContext()->language->id);
if (isset($value['refund_info'])