Merge pull request #895 from sumitwebkul/overbooking_issues
Fixed: Overbooking issues in QloApps and added new configurations for overbooking handling
This commit is contained in:
@@ -42,6 +42,12 @@
|
||||
right: 0
|
||||
margin: 0 auto
|
||||
|
||||
#customer_cart_details .overbooked_room
|
||||
background-color: #FF69B4
|
||||
color: #FFF
|
||||
padding: 2px 5px
|
||||
border-radius: 2px
|
||||
font-weight: 600
|
||||
|
||||
.room_status_info_form
|
||||
.room_status
|
||||
|
||||
@@ -11,7 +11,7 @@ $contrasted-lightness-threshold: 10%
|
||||
$bg-page-head-color : $secondary-color
|
||||
$bg-panel-heading-color: hsl(hue($secondary-color), 10, 90)
|
||||
|
||||
$badge-notif-color: $greenPrestashop
|
||||
$badge-notif-color: #D27C82
|
||||
$brand-addons: $pinkPrestashop
|
||||
|
||||
$font-family-mono: 'Droid Sans Mono', Helvetica, Arial, sans-serif
|
||||
|
||||
@@ -109,7 +109,11 @@ body
|
||||
.dropdown-menu
|
||||
line-height: normal
|
||||
.panel-danger .panel-heading
|
||||
background-color: $badge-notif-color!important
|
||||
background-color: #DC143C
|
||||
color: #FFF
|
||||
margin: -20px -20px 15px -20px
|
||||
padding: 0px 10px 0px 10px
|
||||
|
||||
form .alert
|
||||
clear: both
|
||||
@media (max-width: $screen-phone)
|
||||
|
||||
@@ -24,4 +24,9 @@
|
||||
*}
|
||||
{extends file="helpers/options/options.tpl"}
|
||||
|
||||
{block name="after"}<script type="text/javascript">changeCMSActivationAuthorization();</script>{/block}
|
||||
{block name="after"}
|
||||
<script type="text/javascript">
|
||||
changeCMSActivationAuthorization();
|
||||
changeOverbookingOrderAction();
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
{*
|
||||
* 2010-2023 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
{if isset($orderOverBookings) && $orderOverBookings}
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-warning"></i> {l s='Overbookings found in this order !!'}
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
<div class="table-responsive form-group">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{l s='Room No.'}</th>
|
||||
<th>{l s='Room type.'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Occupancy'}</th>
|
||||
<th>{l s='Confirmed booking order'}</th>
|
||||
<th>{l s='Reallocate/Swap'}</th>
|
||||
<th>{l s='Resolve'}</th>
|
||||
</tr>
|
||||
{foreach from=$orderOverBookings item=data}
|
||||
{if !$data.is_refunded}
|
||||
<tr>
|
||||
<td>{$data['room_num']}</td>
|
||||
<td>{$data['room_type_name']}</td>
|
||||
<td>{dateFormat date=$data['date_from']} {l s='To'} {dateFormat date=$data['date_to']}</td>
|
||||
<td>
|
||||
{if $order->with_occupancy && $data['children']}
|
||||
<div class="dropdown booking_occupancy_show">
|
||||
<button class="btn btn-default btn-left btn-block" data-toggle="dropdown" type="button">
|
||||
<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>
|
||||
</button>
|
||||
<div class="dropdown-menu well well-sm">
|
||||
<label>{l s='Children Ages'}</label>
|
||||
{if isset($data['child_ages']) && $data['child_ages']}
|
||||
{foreach $data['child_ages'] as $childAge}
|
||||
<p class="">
|
||||
{l s='Child %s : %s years' sprintf=[$childAge@iteration, $childAge]}
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<span class="booking_occupancy_show">{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>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if isset($data['booked_room_info']['id_order']) && $data['booked_room_info']['id_order']}
|
||||
<a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&vieworder&id_order={$data['booked_room_info']['id_order']}">#{$data['booked_room_info']['id_order']}</a>
|
||||
{else}
|
||||
{l s='N/A'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-default reallocate_overbooking" id_htl_booking="{$data['id']}"><i class="icon-refresh"></i> {l s='Reallocate/Swap Room'}</a>
|
||||
</td>
|
||||
<td>
|
||||
{if isset($data['booked_room_info']) && $data['booked_room_info']}
|
||||
<span class="badge badge-information">{l s='Already booked'}</span>
|
||||
{else}
|
||||
<a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&vieworder&id_order={$data['id_order']}&resolve_overbooking={$data['id']}" class="btn btn-default resolve_overbooking" id_htl_booking="{$data['id']}"><i class="icon-refresh"></i> {l s='Resolve'}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="help-block">
|
||||
<p>- {l s='You can resolve room overbooking with \'Resolve\' column only when the overbooked room is now free for booked duration.'}</p>
|
||||
<p>- {l s='You can also reallocate an overbooked room with an available room to resolve room\'s overbooking.'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -30,7 +30,10 @@
|
||||
</td>
|
||||
{/if}
|
||||
<td class="text-center">
|
||||
{$data.room_num}
|
||||
<p>{$data.room_num}</p>
|
||||
{if $data.is_back_order}
|
||||
<span class="overbooked_room">{l s='overbooked'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$data.image_link}" title="Room image" />
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
{*
|
||||
* 2010-2023 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
{if isset($resolvableOverBookings) && $resolvableOverBookings}
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-refresh"></i> {l s='Resolvable Overbookings'}
|
||||
</div>
|
||||
<div class="panel-content">
|
||||
{if isset($smarty.get.resolvable_overbooked_orders) && $smarty.get.resolvable_overbooked_orders}
|
||||
<div class="alert alert-warning">
|
||||
<b>{l s='Orders with resolvable overbookings are filtered.'} <a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}" class="btn btn-warning"><i class="icon-refresh"></i> {l s='See all orders'}</a></b>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="alert alert-info">
|
||||
<p>{l s='Some overbookings are now available to be resolved. You can directly resolve overbookings from below list as per your choice.'}</p>
|
||||
{if !isset($smarty.get.resolvable_overbooked_orders) || !$smarty.get.resolvable_overbooked_orders}
|
||||
<br>
|
||||
<p>{l s='You can also filter orders which overbookings are now available to be resolved.'} <a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&resolvable_overbooked_orders=1" class="btn btn-default"><i class="icon-search"></i> {l s='Filter orders with resolvable overbookings'}</a></p>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="table-responsive form-group">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{l s='Room No.'}</th>
|
||||
<th>{l s='Room type'}</th>
|
||||
<th>{l s='Hotel'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Order'}</th>
|
||||
<th>{l s='Resolve'}</th>
|
||||
</tr>
|
||||
{foreach from=$resolvableOverBookings item=data}
|
||||
{if !$data.is_refunded}
|
||||
<tr>
|
||||
<td>{$data['room_num']}</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminProducts')}&id_product={$data['id_product']|escape:'html':'UTF-8'}&updateproduct">{$data['room_type_name']|escape:'html':'UTF-8'}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminAddHotel')}&id={$data['id_hotel']|escape:'html':'UTF-8'}&updatehtl_branch_info" target="_blank"><span>{$data['hotel_name']}</span></a>
|
||||
</td>
|
||||
<td>{dateFormat date=$data['date_from']|escape:'html':'UTF-8'} {l s='To'} {dateFormat date=$data['date_to']|escape:'html':'UTF-8'}</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&vieworder&id_order={$data['id_order']|escape:'html':'UTF-8'}">#{$data['id_order']|escape:'html':'UTF-8'}</a>
|
||||
</td>
|
||||
<td>
|
||||
{if isset($data['booked_room_info']) && $data['booked_room_info']}
|
||||
<span class="badge badge-information">{l s='Already booked'}</span>
|
||||
{else}
|
||||
<a href="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&resolve_overbooking={$data['id']|escape:'html':'UTF-8'}" class="btn btn-default resolve_overbooking" id_htl_booking="{$data['id']|escape:'html':'UTF-8'}"><i class="icon-refresh"></i> {l s='Resolve'}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
@@ -105,6 +105,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Overbookings information of the order *}
|
||||
{include file='controllers/orders/_overbookings.tpl'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<div class="panel">
|
||||
|
||||
Reference in New Issue
Block a user