Merge branch 'develop' into gli-1786
This commit is contained in:
@@ -77,3 +77,9 @@
|
||||
.room_status_info_form
|
||||
.room_status
|
||||
white-space: normal
|
||||
|
||||
#noteContent
|
||||
max-height: 200px
|
||||
|
||||
.panel-refund-request .refunded_amount
|
||||
margin-top: 2px
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// Kill the scroll on the body
|
||||
.modal-open {
|
||||
overflow-x: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// Container that the modal scrolls within
|
||||
|
||||
@@ -146,15 +146,27 @@
|
||||
<label class="control-label col-lg-3">{l s='Status'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
{if $customer->active}
|
||||
<span class="label label-success">
|
||||
<i class="icon-check"></i>
|
||||
{l s='Active'}
|
||||
{if !$customer->deleted}
|
||||
{if $customer->active}
|
||||
<span class="label label-success">
|
||||
<i class="icon-check"></i>
|
||||
{l s='Active'}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-danger">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Inactive'}
|
||||
</span>
|
||||
{/if}
|
||||
{elseif $customer->deleted == Customer::STATUS_BANNED}
|
||||
<span class="label label-warning">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Banned'}
|
||||
</span>
|
||||
{else}
|
||||
{elseif $customer->deleted == Customer::STATUS_DELETED}
|
||||
<span class="label label-danger">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Inactive'}
|
||||
{l s='Deleted'}
|
||||
</span>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
{foreach $data['child_ages'] as $childAge}
|
||||
<p class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<select class="guest_child_age room_occupancies" name="occupancy[0][child_ages][]">
|
||||
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select 1'}</option>
|
||||
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select age'}</option>
|
||||
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1'}</option>
|
||||
{for $age=1 to ($max_child_age-1)}
|
||||
<option value="{$age|escape:'htmlall':'UTF-8'}" {if $childAge == $age}selected{/if}>{$age|escape:'htmlall':'UTF-8'}</option>
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
{*
|
||||
* 2007-2017 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2017 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<tr id="new_product" style="display:none">
|
||||
<td style="display:none;" colspan="3" class="text-center">
|
||||
<input type="hidden" id="add_product_product_id" name="add_product[product_id]" value="0" />
|
||||
|
||||
<div class="form-group">
|
||||
<label>{l s='Room Type:'}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="add_product_product_name" value=""/>
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div id="add_product_product_attribute_area" class="form-group" style="display: none;">
|
||||
<label>{l s='Combinations'}</label>
|
||||
<select name="add_product[product_attribute_id]" id="add_product_product_attribute_id"></select>
|
||||
</div>
|
||||
|
||||
<div id="add_product_product_warehouse_area" class="form-group" style="display: none;">
|
||||
<label>{l s='Warehouse'}</label>
|
||||
<select id="add_product_warehouse" name="add_product_warehouse"></select>
|
||||
</div> -->
|
||||
</td>
|
||||
<td style="display:none;" class="bookingDuration text-center" colspan="2">
|
||||
<center>
|
||||
<div class="room_check_in_div">
|
||||
<div class="input-group fixed-width-xl">
|
||||
<div class="input-group-addon">{l s='Check In'}</div>
|
||||
<input type="text" class="form-control add_room_date_from" name="add_product[date_from]" readonly />
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="room_check_out_div">
|
||||
<div class="input-group fixed-width-xl">
|
||||
<div class="input-group-addon">{l s='Check Out'}</div>
|
||||
<input type="text" class="form-control add_room_date_to" name="add_product[date_to]" readonly/>
|
||||
<div class="input-group-addon"><i class="icon-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</td>
|
||||
<td style="display:none;" class="productQuantity text-center" colspan="1">
|
||||
{if $order->with_occupancy}
|
||||
<div class="booking_occupancy">
|
||||
<div class="dropdown">
|
||||
<button class="booking_guest_occupancy form-control btn btn-default btn-left btn-block input-occupancy disabled" type="button">
|
||||
<span>{l s='Select occupancy'}</span>
|
||||
</button>
|
||||
<input type="hidden" class="max_avail_type_qty" value="">
|
||||
<div class="dropdown-menu booking_occupancy_wrapper fixed-width-xxl well well-sm">
|
||||
<div class="booking_occupancy_inner">
|
||||
<div class="occupancy_info_block col-sm-12" occ_block_index="0">
|
||||
<div class="occupancy_info_head col-sm-12"><label class="room_num_wrapper">{l s='Room - 1'}</label></div>
|
||||
<div class="col-sm-12">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-6 occupancy_count_block">
|
||||
<label>{l s='Adults'}</label>
|
||||
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="1" min="1">
|
||||
</div>
|
||||
<div class="form-group col-xs-6 occupancy_count_block">
|
||||
<label>{l s='Child'} <span class="label-desc-txt"></span></label>
|
||||
<input type="number" class="form-control num_occupancy num_children" name="occupancy[0][children]" value="0" min="0">
|
||||
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
|
||||
</div>
|
||||
</div>
|
||||
<p style="display:none;"><span class="text-danger occupancy-input-errors"></span></p>
|
||||
<div class="row children_age_info_block" style="display:none">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="">{l s='All Children'}</label>
|
||||
<div class="">
|
||||
<div class="row children_ages">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="occupancy-info-separator col-sm-12">
|
||||
<div class="add_occupancy_block col-sm-12">
|
||||
<a class="add_new_occupancy_btn" href="#"><i class="icon-plus"></i> <span>{l s='Add Room'}</span></a>
|
||||
<a class="pull-right close_occupancy_link" href="#">{l s='close'} <i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<center>
|
||||
<input type="number" class="form-control fixed-width-sm" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" disabled="disabled" min="1"/>
|
||||
</center>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
<td style="display:none;" class="text-center" colspan="2">
|
||||
<center>
|
||||
<div class="row">
|
||||
<div class="input-group fixed-width-xl">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
|
||||
<input type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" />
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax excl.'}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="input-group fixed-width-xl">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
|
||||
<input type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" />
|
||||
{if !($currency->format % 2)}<div class="input-group-addon">{$currency->sign} {l s='tax incl.'}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</td>
|
||||
|
||||
|
||||
{*{if ($order->hasBeenPaid())}<td style="display:none;" class="productQuantity"></td>{/if}
|
||||
{if $display_warehouse}<td></td>{/if}
|
||||
{if ($order->hasBeenDelivered())}<td style="display:none;" class="productQuantity"></td>{/if}
|
||||
<td style="display:none;" class="productQuantity" id="add_product_product_stock">0</td>*}
|
||||
<td style="display:none;" id="add_product_product_total" class="text-center">{displayPrice price=0 currency=$currency->id}</td>
|
||||
<td style="display:none;" class="text-center">
|
||||
{if sizeof($invoices_collection)}
|
||||
<select class="form-control" name="add_product[invoice]" id="add_product_product_invoice" disabled="disabled">
|
||||
<optgroup class="existing" label="{l s='Existing'}">
|
||||
{foreach from=$invoices_collection item=invoice}
|
||||
<option value="{$invoice->id}">{$invoice->getInvoiceNumberFormatted($current_id_lang)}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<optgroup label="{l s='New'}">
|
||||
<option value="0">{l s='Create a new invoice'}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
{/if}
|
||||
</td>
|
||||
<td style="display:none;" class="text-center">
|
||||
<button type="button" class="btn btn-default" id="cancelAddProduct">
|
||||
<i class="icon-remove text-danger"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" id="submitAddProduct" disabled="disabled">
|
||||
<i class="icon-ok text-success"></i>
|
||||
{l s='Add'}
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- <tr id="new_invoice" style="display:none">
|
||||
<td colspan="10">
|
||||
<h4>{l s='New invoice information'}</h4>
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Carrier'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static"><strong>{$carrier->name}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Shipping Cost'}</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="add_invoice[free_shipping]" value="1" />
|
||||
{l s='Free shipping'}
|
||||
</label>
|
||||
<p class="help-block">{l s='If you don\'t select "Free shipping," the normal shipping cost will be applied.'}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
@@ -43,15 +43,19 @@
|
||||
<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">
|
||||
<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>
|
||||
</button>
|
||||
</a>
|
||||
<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]}
|
||||
{if $childAge == 0}
|
||||
{l s='Child %s : Under 1' sprintf=[$childAge@iteration]}
|
||||
{else}
|
||||
{l s='Child %s : %s' sprintf=[$childAge@iteration, $childAge]} {if $childAge > 1}{l s='years'}{else}{l s='year'}{/if}
|
||||
{/if}
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
@@ -70,7 +70,11 @@
|
||||
{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]}
|
||||
{if $childAge == 0}
|
||||
{l s='Child %s : Under 1' sprintf=[$childAge@iteration]}
|
||||
{else}
|
||||
{l s='Child %s : %s' sprintf=[$childAge@iteration, $childAge]} {if $childAge > 1}{l s='years'}{else}{l s='year'}{/if}
|
||||
{/if}
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
@@ -246,7 +250,7 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<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}'>
|
||||
<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>
|
||||
{l s='Reallocate/Swap Room'}
|
||||
</a>
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
{block name=pageTitle}
|
||||
<h2 class="order_page_title page-title">
|
||||
{if is_array($title)}{$title|end|strip_tags}{else}{$title|strip_tags}{/if}
|
||||
{if $currentState == Configuration::get('PS_OS_REFUND')}
|
||||
{if $currentState->id == Configuration::get('PS_OS_REFUND')}
|
||||
<span class="toolbar_order_status_badge badge badge-danger">{l s='Refunded'}</span>
|
||||
{elseif $currentState == Configuration::get('PS_OS_CANCELED')}
|
||||
{elseif $currentState->id == Configuration::get('PS_OS_CANCELED')}
|
||||
<span class="toolbar_order_status_badge badge badge-danger">{l s='Cancelled'}</span>
|
||||
{else}
|
||||
<span class="toolbar_order_status_badge badge badge-success">{l s='Booked'}</span>
|
||||
@@ -98,12 +98,12 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Room No.'}</th>
|
||||
<th>{l s='Room Type'}</th>
|
||||
<th>{l s='Room'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Documents'}</th>
|
||||
<th>{l s='Room Status'}</th>
|
||||
<th class="text-center">{l s='Action'}</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>
|
||||
@@ -111,34 +111,43 @@
|
||||
{foreach from=$htl_booking_order_data item=data}
|
||||
<tr>
|
||||
<td>
|
||||
{$data['room_num']}
|
||||
</td>
|
||||
<td>
|
||||
{$data['room_num']}<br>
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}&id_product={$data['id_product']}&updateproduct" target="_blank">{$data['room_type_name']|escape:'html':'UTF-8'}</a>
|
||||
</td>
|
||||
<td>
|
||||
{dateFormat date=$data['date_from']} - {dateFormat date=$data['date_to']}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
|
||||
{if $data.num_checkin_documents > 0}{$data.num_checkin_documents}{else}{l s='Upload'}{/if} {l s='Documents'}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_ALLOTED']['id_status']}
|
||||
{l s='Alloted'}
|
||||
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}
|
||||
<span class="text-danger room_status">{l s='Checked in on'} {dateFormat date=$data['check_in']}</span>
|
||||
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
|
||||
<span class="text-success room_status">{l s='Checked out on'} {dateFormat date=$data['check_out']}</span>
|
||||
{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 class="text-center">
|
||||
<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'} {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>
|
||||
{else}
|
||||
<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']}">
|
||||
<i class="icon-pencil"></i>
|
||||
<i class="icon-pencil"></i> {l s='Edit'}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
@@ -783,7 +792,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel panel-refund-request">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-undo"></i> {l s='Refund Requests'}
|
||||
</div>
|
||||
@@ -814,7 +823,7 @@
|
||||
<td>
|
||||
<span class="badge" style="background-color:{$return_info.state_color}">{$return_info.state_name}</span>
|
||||
{if $return_info.refunded_amount > 0}
|
||||
<span class="badge badge-success">{displayPrice price=$return_info.refunded_amount currency=$currency->id}</span>
|
||||
<span class="badge badge-success refunded_amount">{displayPrice price=$return_info.refunded_amount currency=$currency->id}</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -918,7 +927,7 @@
|
||||
{assign var=additional_service_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTI)}
|
||||
{if $room_price_tax_excl}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Total Rooms Cost (tax excl.)'}</td>
|
||||
<td class="text-right">{l s='Total Rooms Cost (Tax excl.)'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=$room_price_tax_excl currency=$currency->id}
|
||||
</td>
|
||||
@@ -927,34 +936,16 @@
|
||||
{/if}
|
||||
{if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Total Extra services (tax excl.)'}</td>
|
||||
<td class="text-right">{l s='Total Extra services (Tax excl.)'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=($additional_service_price_tax_excl - $totalConvenienceFeeTE) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* {if $room_price_tax_excl}
|
||||
<tr id="total_tax_order">
|
||||
<td class="text-right"><strong>{l s='Total Rooms Tax'}</strong></td>
|
||||
<td class="text-right nowrap">
|
||||
<strong>{displayPrice price=($room_price_tax_incl - $room_price_tax_excl) currency=$currency->id}</strong>
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0}
|
||||
<tr id="total_tax_order">
|
||||
<td class="text-right"><strong>{l s='Extra services Tax'}</strong></td>
|
||||
<td class="text-right nowrap">
|
||||
<strong>{displayPrice price=($additional_service_price_tax_incl - $additional_service_price_tax_excl) currency=$currency->id}</strong>
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if} *}
|
||||
{if $service_products_price_tax_excl}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Total service products cost (tax excl.)'}</td>
|
||||
<td class="text-right">{l s='Total service products cost (Tax excl.)'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=$service_products_price_tax_excl currency=$currency->id}
|
||||
</td>
|
||||
@@ -962,10 +953,64 @@
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if isset($totalConvenienceFeeTE) && $totalConvenienceFeeTE > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Convenience Fee (Tax excl.)'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=$totalConvenienceFeeTE currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $room_price_tax_excl}
|
||||
<tr id="total_tax_order">
|
||||
<td class="text-right">{l s='Total Rooms Tax'}</td>
|
||||
<td class="text-right nowrap">
|
||||
{displayPrice price=($room_price_tax_incl - $room_price_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0}
|
||||
<tr id="total_tax_order">
|
||||
<td class="text-right">{l s='Extra services Tax'}</td>
|
||||
<td class="text-right nowrap">
|
||||
{displayPrice price=(($additional_service_price_tax_incl - $additional_service_price_tax_excl) - ($totalConvenienceFeeTI - $totalConvenienceFeeTE)) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if isset($totalConvenienceFeeTE) && $totalConvenienceFeeTE > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Convenience Fee Tax'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=($totalConvenienceFeeTI - $totalConvenienceFeeTE) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{* {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} *}
|
||||
<tr id="total_taxes">
|
||||
<td class="text-right"><strong>{l s='Total Taxes'}</strong>
|
||||
</td>
|
||||
<td class="amount text-right nowrap" ><strong>{displayPrice price=(($order->total_paid_tax_incl + $order->total_discounts_tax_incl) - ($order->total_paid_tax_excl + $order->total_discounts_tax_excl)) currency=$currency->id}</strong>
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{* {/if} *}
|
||||
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td class="text-right">{l s='Discounts'}</td>
|
||||
<td class="text-right"><strong>{l s='Total Booking Amount'}</strong></td>
|
||||
<td class="amount text-right nowrap">
|
||||
-{displayPrice price=$order_discount_price currency=$currency->id}
|
||||
<strong>{displayPrice price=($order->total_paid_tax_incl + $order->total_discounts_tax_incl) currency=$currency->id}</strong>
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
<tr id="total_discounts" {if $order->total_discounts_tax_incl == 0}style="display: none;"{/if}>
|
||||
<td class="text-right"><strong>{l s='Discounts'}</strong></td>
|
||||
<td class="amount text-right nowrap">
|
||||
<strong>-{displayPrice price=$order->total_discounts_tax_incl currency=$currency->id}</strong>
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
@@ -976,24 +1021,6 @@
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{if isset($totalConvenienceFeeTI) && $totalConvenienceFeeTI > 0}
|
||||
<tr id="total_products">
|
||||
<td class="text-right">{l s='Convenience Fee'}</td>
|
||||
<td class="amount text-right nowrap">
|
||||
{displayPrice price=$totalConvenienceFeeTE currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} *}
|
||||
<tr id="total_taxes">
|
||||
<td class="text-right">{l s='Total Taxes'}
|
||||
</td>
|
||||
<td class="amount text-right nowrap" >{displayPrice price=($order->total_paid_tax_incl - $order->total_paid_tax_excl) currency=$currency->id}
|
||||
</td>
|
||||
<td class="partial_refund_fields current-edit" style="display:none;"></td>
|
||||
</tr>
|
||||
{* {/if} *}
|
||||
<tr id="total_order">
|
||||
<td class="text-right"><strong>{l s='Final Booking Total'}</strong></td>
|
||||
<td class="amount text-right nowrap">
|
||||
@@ -1248,14 +1275,13 @@
|
||||
{addJsDefL name='select_room_txt'}{l s='Select room' js=1}{/addJsDefL}
|
||||
{addJsDef max_child_age=$max_child_age|escape:'quotes':'UTF-8'}
|
||||
{addJsDef max_child_in_room=$max_child_in_room|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ROOM_STATUS_ALLOTED=$ROOM_STATUS_ALLOTED|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ROOM_STATUS_CHECKED_IN=$ROOM_STATUS_CHECKED_IN|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ROOM_STATUS_CHECKED_OUT=$ROOM_STATUS_CHECKED_OUT|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ALLOTMENT_MANUAL=$ALLOTMENT_MANUAL|escape:'quotes':'UTF-8'}
|
||||
{addJsDef PS_OS_CANCELED=Configuration::get('PS_OS_CANCELED')|escape:'quotes':'UTF-8'}
|
||||
{addJsDef PS_OS_REFUND=Configuration::get('PS_OS_REFUND')|escape:'quotes':'UTF-8'}
|
||||
|
||||
{addJsDefL name=txt_booking_document_upload_success}{l s='Document uploaded successfully.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_confirm}{l s='Are you sure?' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL}
|
||||
{/strip}
|
||||
{/block}
|
||||
{/block}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price (Tax excl.)'}</label>
|
||||
<label class="control-label">{l s='Price (tax excl.)'}</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input class="form-control" type="text" name="add_product[product_price_tax_excl]" id="add_product_product_price_tax_excl" value="" disabled="disabled"/>
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price (Tax incl.)'}</label>
|
||||
<label class="control-label">{l s='Price (tax incl.)'}</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input class="form-control" type="text" name="add_product[product_price_tax_incl]" id="add_product_product_price_tax_incl" value="" disabled="disabled"/>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price (Tax excl.)'}</label>
|
||||
<label class="control-label">{l s='Price (tax excl.)'}</label>
|
||||
<div class="input-group">
|
||||
{if $currency->format % 2}<div class="input-group-addon">{$currency->sign}</div>{/if}
|
||||
<input class="form-control room_unit_price" type="text" name="room_unit_price" value=""/>
|
||||
@@ -67,55 +67,55 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Occupancy'}</label>
|
||||
{if $order->with_occupancy}
|
||||
<div class="booking_occupancy_edit">
|
||||
<div class="dropdown">
|
||||
<button class="form-control booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy" 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 booking_occupancy_wrapper fixed-width-xxl well well-sm">
|
||||
<div class="booking_occupancy_inner">
|
||||
<input type="hidden" class="max_adults" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_adults']|escape:'html':'UTF-8'}{/if}">
|
||||
<input type="hidden" class="max_children" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_children']|escape:'html':'UTF-8'}{/if}">
|
||||
<input type="hidden" class="max_guests" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_guests']|escape:'html':'UTF-8'}{/if}">
|
||||
<div class="occupancy_info_block" occ_block_index="0">
|
||||
<div class="occupancy_info_head col-sm-12"><span class="room_num_wrapper">{l s='Room - 1'}</span></div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 occupancy_count_block">
|
||||
<div class="col-sm-12">
|
||||
<label>{l s='Adults'}</label>
|
||||
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="{$data['adults']}" min="1" max="{$data['room_type_info']['max_adults']|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 occupancy_count_block">
|
||||
<div class="col-sm-12">
|
||||
<label>{l s='Child'} <span class="label-desc-txt"></span></label>
|
||||
<input type="number" class="form-control num_occupancy num_children" name="occupancy[0][children]" value="{$data['children']}" min="0" max="{$data['room_type_info']['max_children']|escape:'html':'UTF-8'}">
|
||||
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
|
||||
</div>
|
||||
<div class="booking_occupancy_edit">
|
||||
<div class="dropdown">
|
||||
<button class="form-control booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy" 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 booking_occupancy_wrapper fixed-width-xxl well well-sm">
|
||||
<div class="booking_occupancy_inner">
|
||||
<input type="hidden" class="max_adults" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_adults']|escape:'html':'UTF-8'}{/if}">
|
||||
<input type="hidden" class="max_children" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_children']|escape:'html':'UTF-8'}{/if}">
|
||||
<input type="hidden" class="max_guests" value="{if isset($data['room_type_info'])}{$data['room_type_info']['max_guests']|escape:'html':'UTF-8'}{/if}">
|
||||
<div class="occupancy_info_block" occ_block_index="0">
|
||||
<div class="occupancy_info_head col-sm-12"><span class="room_num_wrapper">{l s='Room - 1'}</span></div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 occupancy_count_block">
|
||||
<div class="col-sm-12">
|
||||
<label>{l s='Adults'}</label>
|
||||
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="{$data['adults']}" min="1" max="{$data['room_type_info']['max_adults']|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row children_age_info_block" {if !isset($data['child_ages']) || !$data['child_ages']}style="display:none"{/if}>
|
||||
<div class="col-xs-6 occupancy_count_block">
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-12">{l s='All Children'}</label>
|
||||
<div class="col-sm-12">
|
||||
<div class="row children_ages">
|
||||
{if isset($data['child_ages']) && $data['child_ages']}
|
||||
{foreach $data['child_ages'] as $childAge}
|
||||
<p class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<select class="guest_child_age room_occupancies" name="occupancy[0][child_ages][]">
|
||||
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select 1'}</option>
|
||||
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1'}</option>
|
||||
{for $age=1 to ($max_child_age-1)}
|
||||
<option value="{$age|escape:'htmlall':'UTF-8'}" {if $childAge == $age}selected{/if}>{$age|escape:'htmlall':'UTF-8'}</option>
|
||||
{/for}
|
||||
</select>
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
<label>{l s='Child'} <span class="label-desc-txt"></span></label>
|
||||
<input type="number" class="form-control num_occupancy num_children" name="occupancy[0][children]" value="{$data['children']}" min="0" max="{$data['room_type_info']['max_children']|escape:'html':'UTF-8'}">
|
||||
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p style="display:none;"><span class="text-danger occupancy-input-errors"></span></p>
|
||||
<div class="row children_age_info_block" {if !isset($data['child_ages']) || !$data['child_ages']}style="display:none"{/if}>
|
||||
<div class="col-sm-12">
|
||||
<label class="col-sm-12">{l s='All Children'}</label>
|
||||
<div class="col-sm-12">
|
||||
<div class="row children_ages">
|
||||
{if isset($data['child_ages']) && $data['child_ages']}
|
||||
{foreach $data['child_ages'] as $childAge}
|
||||
<p class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
||||
<select class="guest_child_age room_occupancies" name="occupancy[0][child_ages][]">
|
||||
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select age'}</option>
|
||||
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1'}</option>
|
||||
{for $age=1 to ($max_child_age-1)}
|
||||
<option value="{$age|escape:'htmlall':'UTF-8'}" {if $childAge == $age}selected{/if}>{$age|escape:'htmlall':'UTF-8'}</option>
|
||||
{/for}
|
||||
</select>
|
||||
</p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,9 +124,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<span class="booking_occupancy_edit" style="display:none;">{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}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th>{l s='Total Price'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
<th>{l s='Total Price (tax excl.)'}</th>
|
||||
<th class="text-right">{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -77,7 +77,7 @@
|
||||
<th></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Option'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"></th>
|
||||
<th class="fixed-width-sm text-center">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th>{l s='Total Price'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
<th>{l s='Total Price (tax excl.)'}</th>
|
||||
<th class="text-right">{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -101,7 +101,7 @@
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"> </th>
|
||||
<th class="fixed-width-sm text-center">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{*
|
||||
* Since 2010 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 Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="modal-body">
|
||||
<div><b>{l s='Allotment remark'}</b>: {$comment}</div>
|
||||
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -28,15 +28,25 @@
|
||||
</ul>
|
||||
<div class="tab-content active">
|
||||
<div role="tabpanel" class="tab-pane active" id="reallocate_room_tab">
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Allotment type'}</label>
|
||||
<dd><span class="modal_curr_allotent_type"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Currently Alloted Customer'}</label>
|
||||
<dd><i class="icon-user"></i> <span class="cust_name"></span></dd>
|
||||
<dd><i class="icon-envelope"></i> <span class="cust_email"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
<dl class="list-detail col-sm-6 allotment_comment_block">
|
||||
<label class="label-title">{l s='Allotment Comment'}</label>
|
||||
<dd><span class="modal_curr_allotment_comment"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -90,15 +100,25 @@
|
||||
</form>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="swap_room_tab">
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Allotment type'}</label>
|
||||
<dd><span class="modal_curr_allotent_type"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Currently Alloted Customer'}</label>
|
||||
<dd><i class="icon-user"></i> <span class="cust_name"></span></dd>
|
||||
<dd><i class="icon-envelope"></i> <span class="cust_email"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
<dl class="list-detail col-sm-6 allotment_comment_block">
|
||||
<label class="label-title">{l s='Allotment Comment'}</label>
|
||||
<dd><span class="modal_curr_allotment_comment"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -517,5 +517,4 @@ class AddressCore extends ObjectModel
|
||||
)
|
||||
');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -135,6 +135,9 @@ class CustomerCore extends ObjectModel
|
||||
|
||||
public $groupBox;
|
||||
|
||||
const STATUS_BANNED = 1;
|
||||
const STATUS_DELETED = 2;
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
'id_default_group' => array('xlink_resource' => 'groups'),
|
||||
@@ -179,7 +182,7 @@ class CustomerCore extends ObjectModel
|
||||
'id_risk' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false),
|
||||
'max_payment_days' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false),
|
||||
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
|
||||
'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
|
||||
'deleted' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false),
|
||||
'note' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 65000, 'copy_post' => false),
|
||||
'is_guest' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false),
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false),
|
||||
|
||||
@@ -233,7 +233,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isPrice($price)
|
||||
{
|
||||
return preg_match('/^[0-9]{1,10}(\.[0-9]{1,9})?$/', $price);
|
||||
return preg_match('/^[0-9]{1,10}(\.[0-9]{1,})?$/', $price);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,7 +244,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isNegativePrice($price)
|
||||
{
|
||||
return preg_match('/^[-]?[0-9]{1,10}(\.[0-9]{1,9})?$/', $price);
|
||||
return preg_match('/^[-]?[0-9]{1,10}(\.[0-9]{1,})?$/', $price);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1805,7 +1805,7 @@ class OrderCore extends ObjectModel
|
||||
SELECT opd.`amount` as `real_paid_amount`, opd.*, op.*
|
||||
FROM `'._DB_PREFIX_.'order_payment_detail` opd
|
||||
INNER JOIN `'._DB_PREFIX_.'order_payment` op ON (opd.`id_order_payment` = op.`id_order_payment`)
|
||||
WHERE `id_order` = '.$this->id
|
||||
WHERE `id_order` = '.(int) $this->id
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ class AdminCmsContentControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->loadObject(true);
|
||||
$this->initTabModuleList();
|
||||
$this->renderPageHeaderToolbar();
|
||||
|
||||
@@ -151,8 +152,9 @@ class AdminCmsContentControllerCore extends AdminController
|
||||
|
||||
if (Tools::getValue('addcms') !== false) {
|
||||
$this->toolbar_title[] = $this->l('Add new');
|
||||
} elseif ($id_cms_page) {
|
||||
$cms_page = new CMS($id_cms_page);
|
||||
} elseif ($id_cms_page
|
||||
&& Validate::isLoadedObject($cms_page = new CMS($id_cms_page))
|
||||
) {
|
||||
$this->toolbar_title[] = sprintf($this->l('Edit: %s'), $cms_page->meta_title[$this->context->employee->id_lang]);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -170,6 +170,11 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'type' => 'datetime',
|
||||
'search' => false,
|
||||
'havingFilter' => true
|
||||
),
|
||||
'deleted' => array(
|
||||
'title' => $this->l('Banned'),
|
||||
'type' => 'bool',
|
||||
'displayed' => false,
|
||||
)
|
||||
));
|
||||
|
||||
@@ -218,6 +223,12 @@ class AdminCustomersControllerCore extends AdminController
|
||||
}
|
||||
|
||||
parent::postProcess();
|
||||
// Added this to check if the filter for the banned(deleted) is used, since $this->delete = true will not display the deleted customers.
|
||||
$prefix = $this->getCookieFilterPrefix();
|
||||
$filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_');
|
||||
if (isset($filters[$prefix.$this->table.'Filter_deleted']) && $filters[$prefix.$this->table.'Filter_deleted'] == 1) {
|
||||
$this->deleted = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
@@ -753,6 +764,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$helper->color = 'color2';
|
||||
$helper->title = $this->l('Banned Customers', null, null, false);
|
||||
$helper->subtitle = $this->l('All Time', null, null, false);
|
||||
$helper->href = $this->context->link->getAdminLink('AdminCustomers').'&customerFilter_deleted=1';
|
||||
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=total_banned_customers';
|
||||
$helper->tooltip = $this->l('The total number of banned customers.', null, null, false);
|
||||
$kpis[] = $helper;
|
||||
@@ -962,7 +974,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
if (Validate::isLoadedObject($objCustomer = $this->loadObject())) {
|
||||
if ($this->delete_mode == 'real' && Order::getCustomerOrders($objCustomer->id, true)) {
|
||||
$objCustomer->email = 'anonymous'.'-'.$objCustomer->id.'@'.Tools::link_rewrite(Configuration::get('PS_SHOP_NAME')).'_anonymous.com';
|
||||
$objCustomer->deleted = 1;
|
||||
$objCustomer->deleted = Customer::STATUS_DELETED;
|
||||
if (!$objCustomer->update()) {
|
||||
$this->errors[] = Tools::displayError('Some error ocurred while deleting the Customer');
|
||||
return;
|
||||
@@ -1003,7 +1015,7 @@ class AdminCustomersControllerCore extends AdminController
|
||||
// check if customer has orders for email change else customer will be deleted
|
||||
if (Order::getCustomerOrders($objCustomer->id, true)) {
|
||||
$objCustomer->email = 'anonymous'.'-'.$objCustomer->id.'@'.Tools::getShopDomain();
|
||||
$objCustomer->deleted = 1;
|
||||
$objCustomer->deleted = Customer::STATUS_DELETED;
|
||||
if ($objCustomer->update()) {
|
||||
// unset the customer which is processed
|
||||
// not processed customers will be deleted with default process if no errors are there
|
||||
|
||||
@@ -452,10 +452,9 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add') {
|
||||
if (!$this->loadObject(true)) {
|
||||
return;
|
||||
if ($this->loadObject(true)) {
|
||||
$this->content .= $this->renderForm();
|
||||
}
|
||||
$this->content .= $this->renderForm();
|
||||
} elseif ($this->display == 'view') {
|
||||
// Some controllers use the view action without an object
|
||||
if ($this->className) {
|
||||
|
||||
@@ -208,7 +208,6 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
// show the list of the product according to the booking or service products
|
||||
$this->_where .= ' AND a.`booking_product` = 0';
|
||||
|
||||
$this->_use_found_rows = false;
|
||||
$this->_group = 'GROUP BY a.`id_product`';
|
||||
|
||||
$this->fields_list = array();
|
||||
@@ -1393,7 +1392,10 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
if ($this->display == 'edit' || $this->display == 'add') {
|
||||
if (in_array($this->display, array('add', 'edit'))
|
||||
&& $this->tabAccess[$this->display] == '1'
|
||||
&& $this->loadObject(true)
|
||||
) {
|
||||
$this->addJqueryUI(array(
|
||||
'ui.core',
|
||||
'ui.widget'
|
||||
@@ -2815,9 +2817,7 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
// let's calculate this once for all
|
||||
if (!Validate::isLoadedObject($this->object) && Tools::getValue('id_product')) {
|
||||
$this->errors[] = 'Unable to load object';
|
||||
} else {
|
||||
if ($this->loadObject(true)) {
|
||||
$this->_displayDraftWarning($this->object->active);
|
||||
|
||||
// if there was an error while saving, we don't want to lose posted data
|
||||
|
||||
@@ -617,11 +617,23 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$payment_methods[] = $module->displayName;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the order currency at first element of currencies
|
||||
if ($currencies = Currency::getCurrenciesByIdShop($objOrder->id_shop)) {
|
||||
foreach ($currencies as $key => $currency) {
|
||||
if ($currency['id_currency'] == $objOrder->id_currency) {
|
||||
unset($currencies[$key]);
|
||||
array_unshift($currencies, $currency);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'current_index' => self::$currentIndex,
|
||||
'order' => $objOrder,
|
||||
'currencies' => Currency::getCurrenciesByIdShop($objOrder->id_shop),
|
||||
'currencies' => $currencies,
|
||||
'payment_methods' => $payment_methods,
|
||||
'payment_types' => $this->getPaymentsTypes(),
|
||||
'invoices_collection' => $objOrder->getInvoicesCollection(),
|
||||
@@ -754,6 +766,33 @@ class AdminOrdersControllerCore extends AdminController
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitRoomAllotmentCommentModal()
|
||||
{
|
||||
$response['hasError'] = 1;
|
||||
if (Validate::isLoadedObject($objBookingDetail = new HotelBookingDetail(Tools::getValue('id_hotel_booking')))) {
|
||||
if ($objBookingDetail->booking_type == HotelBookingDetail::ALLOTMENT_MANUAL) {
|
||||
// get booking information by order
|
||||
$this->context->smarty->assign('comment', $objBookingDetail->comment);
|
||||
|
||||
$title = $objBookingDetail->room_num.' - '.$objBookingDetail->room_type_name.' ('.
|
||||
Tools::displayDate($objBookingDetail->date_from).' - '.Tools::displayDate($objBookingDetail->date_to).')';
|
||||
$modal = array(
|
||||
'modal_id' => 'room-allotment-comment-modal',
|
||||
'modal_class' => 'modal-md order_detail_modal',
|
||||
'modal_title' => '<i class="icon icon-comment"></i>  '.$title,
|
||||
'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_room_allotment_comment.tpl'),
|
||||
'modal_actions' => array(),
|
||||
);
|
||||
|
||||
$this->context->smarty->assign($modal);
|
||||
$response['hasError'] = 0;
|
||||
$response['modalHtml'] = $this->context->smarty->fetch('modal.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
die(Tools::jsonEncode($response));
|
||||
}
|
||||
|
||||
public function ajaxProcessInitRoomReallocationModal()
|
||||
{
|
||||
// set modal details
|
||||
@@ -980,7 +1019,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->addJS(_PS_JS_DIR_.'vendor/d3.v3.min.js');
|
||||
|
||||
if ($this->tabAccess['edit'] == 1 && $this->display == 'view') {
|
||||
$this->addJS(_PS_JS_DIR_.'admin/orders.js');
|
||||
if ($this->loadObject()) {
|
||||
$this->addJS(_PS_JS_DIR_.'admin/orders.js');
|
||||
}
|
||||
// add js for reallocation process
|
||||
$this->addJS(_PS_JS_DIR_.'admin/reallocation.js');
|
||||
// $this->addJS(_PS_JS_DIR_.'admin/orders-product-event.js');
|
||||
@@ -2845,6 +2886,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$this->tpl_view_vars = array(
|
||||
'totalRefundedRooms' => $totalRefundedRooms,
|
||||
'orderOverBookings' => $orderOverBookings,
|
||||
// refund info
|
||||
'refund_allowed' => (int) $order->isReturnable(),
|
||||
'applicable_refund_policies' => $applicableRefundPolicies,
|
||||
'returns' => OrderReturn::getOrdersReturn($order->id_customer, $order->id),
|
||||
@@ -2937,9 +2979,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'customer' => $customer)
|
||||
),
|
||||
'orderDocuments' => $order->getDocuments(),
|
||||
'ROOM_STATUS_ALLOTED' => HotelBookingDetail::STATUS_ALLOTED,
|
||||
'ROOM_STATUS_CHECKED_IN' => HotelBookingDetail::STATUS_CHECKED_IN,
|
||||
'ROOM_STATUS_CHECKED_OUT' => HotelBookingDetail::STATUS_CHECKED_OUT,
|
||||
'ALLOTMENT_MANUAL' => HotelBookingDetail::ALLOTMENT_MANUAL,
|
||||
);
|
||||
|
||||
return parent::renderView();
|
||||
@@ -4809,6 +4851,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'tax_excl' => $totalRoomPriceAfterTE,
|
||||
'tax_incl' => $totalRoomPriceAfterTI,
|
||||
);
|
||||
|
||||
if ($update_htl_tables = $obj_booking_detail->UpdateHotelCartHotelOrderOnOrderEdit(
|
||||
$id_order,
|
||||
$id_room,
|
||||
@@ -6912,4 +6955,4 @@ class AdminOrdersControllerCore extends AdminController
|
||||
|
||||
$this->ajaxDie(json_encode($result));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1486,6 +1486,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
if (in_array($this->display, array('add', 'edit'))
|
||||
&& $this->tabAccess[$this->display] == '1'
|
||||
&& $this->loadObject(true)
|
||||
) {
|
||||
$this->addJqueryUI(array(
|
||||
'ui.core',
|
||||
@@ -2862,9 +2863,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
// let's calculate this once for all
|
||||
if (!Validate::isLoadedObject($this->object) && Tools::getValue('id_product')) {
|
||||
$this->errors[] = 'Unable to load object';
|
||||
} else {
|
||||
if ($this->loadObject(true)) {
|
||||
$this->_displayDraftWarning($this->object->active);
|
||||
|
||||
// if there was an error while saving, we don't want to lose posted data
|
||||
|
||||
@@ -283,11 +283,9 @@ class AdminRequestSqlControllerCore extends AdminController
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add') {
|
||||
if (!$this->loadObject(true)) {
|
||||
return;
|
||||
if ($this->loadObject(true)) {
|
||||
$this->content .= $this->renderForm();
|
||||
}
|
||||
|
||||
$this->content .= $this->renderForm();
|
||||
} elseif ($this->display == 'view') {
|
||||
// Some controllers use the view action without an object
|
||||
if ($this->className) {
|
||||
|
||||
@@ -186,8 +186,8 @@ class AdminThemesControllerCore extends AdminController
|
||||
'thumb' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_FAVICON').(Tools::getValue('conf') ? sprintf('?%04d', rand(0, 9999)) : ''))
|
||||
),
|
||||
'PS_STORES_ICON' => array(
|
||||
'title' => $this->l('Store icon'),
|
||||
'hint' => $this->l('Will appear on the store locator (inside Google Maps).').'<br />'.$this->l('Suggested size: 30x30, transparent GIF.'),
|
||||
'title' => $this->l('Map icon'),
|
||||
'hint' => $this->l('This icon will be displayed at hotel locations on Google Maps.').'<br />'.$this->l('Suggested size: 30x30, transparent GIF.'),
|
||||
'type' => 'file',
|
||||
'name' => 'PS_STORES_ICON',
|
||||
'tab' => 'icons',
|
||||
|
||||
@@ -954,7 +954,7 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
*
|
||||
* @throws PrestaShopException
|
||||
*/
|
||||
protected function findAndWriteTranslationsIntoFile($file_name, $files, $theme_name, $module_name, $dir = false)
|
||||
protected function findAndWriteTranslationsIntoFile($file_name, $files, $theme_name, $module_name, $dir = false, $copyExistingTranslations = false)
|
||||
{
|
||||
// These static vars allow to use file to write just one time.
|
||||
static $cache_file = array();
|
||||
@@ -964,7 +964,12 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
|
||||
// Set file_name in static var, this allow to open and wright the file just one time
|
||||
if (!isset($cache_file[$theme_name.'-'.$file_name])) {
|
||||
require $file_name;
|
||||
if (file_exists($file_name)) {
|
||||
require $file_name;
|
||||
} else {
|
||||
$_MODULE = array();
|
||||
}
|
||||
|
||||
$module_existing_translations = $_MODULE;
|
||||
$str_write = '';
|
||||
$cache_file[$theme_name.'-'.$file_name] = true;
|
||||
@@ -1010,25 +1015,26 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if (array_key_exists($post_key, $_POST) && !in_array($pattern, $array_check_duplicate)) {
|
||||
$array_check_duplicate[] = $pattern;
|
||||
if ($_POST[$post_key] == '') {
|
||||
continue;
|
||||
}
|
||||
$array_check_duplicate[] = $pattern;
|
||||
$str_write .= '$_MODULE['.$pattern.'] = \''.pSQL(str_replace(array("\r\n", "\r", "\n"), ' ', $_POST[$post_key])).'\';'."\n";
|
||||
$this->total_expression++;
|
||||
}
|
||||
}
|
||||
foreach ($module_existing_translations as $key => $value) {
|
||||
if (!in_array('\''.$key.'\'', $array_check_duplicate)) {
|
||||
$str_write .= '$_MODULE[\''.$key.'\'] = \''.pSQL(str_replace(array("\r\n", "\r", "\n"), ' ', $value)).'\';'."\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($cache_file[$theme_name.'-'.$file_name]) && $str_write != "<?php\n\nglobal \$_MODULE;\n\$_MODULE = array();\n") {
|
||||
if ($copyExistingTranslations) {
|
||||
foreach ($module_existing_translations as $key => $value) {
|
||||
if (!in_array('\''.$key.'\'', $array_check_duplicate)) {
|
||||
$str_write .= '$_MODULE[\''.$key.'\'] = \''.pSQL(str_replace(array("\r\n", "\r", "\n"), ' ', $value)).'\';'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($cache_file[$theme_name.'-'.$file_name])) {
|
||||
file_put_contents($file_name, $str_write);
|
||||
}
|
||||
}
|
||||
@@ -1056,6 +1062,8 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
unset($files[$key]);
|
||||
} elseif ($type_clear === 'directory' && (!is_dir($path.$file) || in_array($file, $arr_exclude))) {
|
||||
unset($files[$key]);
|
||||
} else if ($file == 'index.php') {
|
||||
unset($files[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1468,8 +1476,15 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
$arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true);
|
||||
|
||||
// Find and write all translation modules files
|
||||
foreach ($arr_files as $value) {
|
||||
$this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir']);
|
||||
foreach ($arr_files as $key => $value) {
|
||||
$copyExistingTranslations = false;
|
||||
if (!isset($arr_files[$key + 1])
|
||||
|| ($arr_files[$key + 1]['module'] != $value['module'])
|
||||
) {
|
||||
$copyExistingTranslations = true;
|
||||
}
|
||||
|
||||
$this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir'], $copyExistingTranslations);
|
||||
}
|
||||
|
||||
// Clear modules cache
|
||||
|
||||
@@ -59,7 +59,6 @@ class CategoryControllerCore extends FrontController
|
||||
|
||||
$this->addCSS(_THEME_CSS_DIR_.'occupancy.css');
|
||||
$this->addJS(_THEME_JS_DIR_.'occupancy.js');
|
||||
|
||||
$scenes = Scene::getScenes($this->category->id, $this->context->language->id, true, false);
|
||||
if ($scenes && count($scenes)) {
|
||||
$this->addJS(_THEME_JS_DIR_.'scenes.js');
|
||||
|
||||
@@ -235,6 +235,11 @@ class ContactControllerCore extends FrontController
|
||||
|
||||
// GOOGLE MAP
|
||||
if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
Media::addJsDef(
|
||||
array(
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')),
|
||||
)
|
||||
);
|
||||
$this->addJS(
|
||||
'https://maps.googleapis.com/maps/api/js?key='.$PS_API_KEY.
|
||||
'&libraries=places&language='.$this->context->language->iso_code.'®ion='.$this->context->country->iso_code
|
||||
|
||||
@@ -811,6 +811,7 @@ class OrderDetailControllerCore extends FrontController
|
||||
'map_input_text' => $objHotelBranchInformation->map_input_text,
|
||||
),
|
||||
'hotel_name' => $objHotelBranchInformation->hotel_name,
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON'))
|
||||
));
|
||||
|
||||
$this->addJS(
|
||||
|
||||
@@ -78,7 +78,8 @@ class ProductControllerCore extends FrontController
|
||||
'hotel_location' => array(
|
||||
'latitude' => $objHotelBranchInformation->latitude,
|
||||
'longitude' => $objHotelBranchInformation->longitude,
|
||||
)
|
||||
),
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON'))
|
||||
));
|
||||
|
||||
$this->addJS(
|
||||
|
||||
@@ -208,8 +208,12 @@ class StoresControllerCore extends FrontController
|
||||
*/
|
||||
protected function assignStores()
|
||||
{
|
||||
$this->context->smarty->assign('hasStoreIcon', Tools::file_get_contents($this->context->link->getMediaLink(_PS_IMG_DIR_.Configuration::get('PS_STORES_ICON')))); // by webkul to get media link.
|
||||
$hasStoreIcon = false;
|
||||
if (Tools::file_get_contents($this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')))) { // by webkul to get media link.
|
||||
$hasStoreIcon = true;
|
||||
}
|
||||
|
||||
$this->context->smarty->assign('hasStoreIcon', $hasStoreIcon);
|
||||
$distance_unit = Configuration::get('PS_DISTANCE_UNIT');
|
||||
if (!in_array($distance_unit, array('km', 'mi'))) {
|
||||
$distance_unit = 'km';
|
||||
|
||||
@@ -306,11 +306,17 @@ function init()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// voucher modal show and close
|
||||
$('#add_voucher').unbind('click').click(function(e) {
|
||||
e.preventDefault();
|
||||
VoucherModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#voucher-modal', function(){
|
||||
$('#voucher-modal').remove();
|
||||
});
|
||||
// End: voucher modal show and close
|
||||
|
||||
$(document).on('change','#discount_type', function(e) {
|
||||
// Percent type
|
||||
if ($(this).val() == 1)
|
||||
@@ -342,11 +348,18 @@ function init()
|
||||
$('select[name=discount_invoice]').attr('disabled', false);
|
||||
});
|
||||
|
||||
// payment information modal show and close
|
||||
$('.open_payment_information').unbind('click').click(function(e) {
|
||||
e.preventDefault();
|
||||
OrderPaymentDetailModal.show($(this));
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#payment-detail-modal', function(){
|
||||
$('#payment-detail-modal').remove();
|
||||
});
|
||||
// End: payment information modal show and close
|
||||
|
||||
|
||||
initRoomEvents();
|
||||
initProductEvents();
|
||||
}
|
||||
@@ -523,15 +536,12 @@ function initProductEvents()
|
||||
$(this).val(max_child_in_room);
|
||||
if (elementVal == 1) {
|
||||
showOccupancyError(no_children_allowed_txt, $(this).closest(".occupancy_info_block"));
|
||||
haserror = true;
|
||||
} else {
|
||||
showOccupancyError(max_children_txt, $(this).closest(".occupancy_info_block"));
|
||||
haserror = true;
|
||||
}
|
||||
} else if (elementVal > max_allowed_for_current) {
|
||||
$(this).val(max_allowed_for_current);
|
||||
showOccupancyError(max_occupancy_reached_txt, $(this).closest(".occupancy_info_block"));
|
||||
haserror = true;
|
||||
}
|
||||
} else {
|
||||
max_adults_in_room = $(this).closest(".booking_occupancy_wrapper").find('.max_adults').val();
|
||||
@@ -1171,15 +1181,21 @@ function initRoomEvents()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// order-payment-modal hide and show
|
||||
$('#add_new_payment').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
OrderPaymentModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#order-payment-modal', function(){
|
||||
$('#order-payment-modal').remove();
|
||||
});
|
||||
|
||||
$('#cancle_add_payment').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
OrderPaymentModal.hide();
|
||||
});
|
||||
// end order-payment-modal hide and show
|
||||
}
|
||||
function addRoomRefreshTotal() {
|
||||
var quantity = parseInt($('#add_product_product_quantity').val());
|
||||
@@ -1655,6 +1671,10 @@ $(document).ready(function() {
|
||||
DocumentNoteModal.show($(this));
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#document-note-modal', function(){
|
||||
$('#document-note-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitDocumentNote', function(e) {
|
||||
e.preventDefault();
|
||||
DocumentNoteModal.submit();
|
||||
@@ -1669,6 +1689,10 @@ $(document).ready(function() {
|
||||
TravellerModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#traveller-modal', function(){
|
||||
$('#traveller-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitTravellerInfo', function(e) {
|
||||
e.preventDefault();
|
||||
TravellerModal.submit();
|
||||
@@ -1709,6 +1733,10 @@ $(document).ready(function() {
|
||||
RoomStatusModal.show($(this));
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#room-status-modal', function(){
|
||||
$('#room-status-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitRoomStatus', function(e) {
|
||||
e.preventDefault();
|
||||
RoomStatusModal.submit();
|
||||
@@ -1716,6 +1744,19 @@ $(document).ready(function() {
|
||||
// End: RoomStatusModal: Processes
|
||||
// ======================================
|
||||
|
||||
// Start: RoomAllotmentCommentModal: Processes
|
||||
$(document).on('click', '.manual_allotment_comment', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
RoomAllotmentCommentModal.show(this);
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#room-allotment-comment-modal', function(){
|
||||
$('#room-allotment-comment-modal').remove();
|
||||
});
|
||||
// End: RoomAllotmentCommentModal: Processes
|
||||
// ======================================
|
||||
|
||||
// Start: AddRoomBookingModal: Processes
|
||||
/*For adding rooms to the order*/
|
||||
$(document).on('click', '#add_room', function(e){
|
||||
@@ -1736,6 +1777,10 @@ $(document).ready(function() {
|
||||
$('.submitAddRoom').attr('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#add-room-booking-modal', function(){
|
||||
$('#add-room-booking-modal').remove();
|
||||
});
|
||||
// End: AddRoomBookingModal: Processes
|
||||
// ======================================
|
||||
|
||||
@@ -1789,6 +1834,10 @@ $(document).ready(function() {
|
||||
CancelRoomBookingModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#cancel-room-booking-modal', function(){
|
||||
$('#cancel-room-booking-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitCancelBooking', function(e) {
|
||||
e.preventDefault();
|
||||
CancelRoomBookingModal.submit();
|
||||
@@ -2337,6 +2386,10 @@ const AddRoomBookingModal = {
|
||||
$('#add_product_product_price_tax_incl').val(data.price_tax_incl);
|
||||
$('#add_product_product_price_tax_excl').val(data.price_tax_excl);
|
||||
|
||||
$("#new_product .max_adults").val(data.room_type_info.max_adults);
|
||||
$("#new_product .max_children").val(data.room_type_info.max_children);
|
||||
$("#new_product .max_guests").val(data.room_type_info.max_guests);
|
||||
|
||||
//Added by webkul to set curent date in the date fields by default
|
||||
var date_in = $.datepicker.formatDate('dd-mm-yy', new Date());
|
||||
var date_out = $.datepicker.formatDate('dd-mm-yy', new Date(new Date().getTime()+24*60*60*1000));
|
||||
@@ -2528,6 +2581,40 @@ const CancelRoomBookingModal = {
|
||||
}
|
||||
};
|
||||
|
||||
// Modal object to handle comment on rooms for manual cancellation
|
||||
const RoomAllotmentCommentModal = {
|
||||
show: function(element) {
|
||||
$(".loading_overlay").show();
|
||||
let idHtlBooking = parseInt($(element).attr('data-id_hotel_booking_detail'));
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: admin_order_tab_link,
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: 'ajax=true&id_hotel_booking='+idHtlBooking+'&action=initRoomAllotmentCommentModal',
|
||||
success: function(result) {
|
||||
if (result.hasError == 0 && result.modalHtml) {
|
||||
$('#footer').next('.bootstrap').append(result.modalHtml);
|
||||
|
||||
$('#room-allotment-comment-modal').modal('show');
|
||||
|
||||
} else {
|
||||
showErrorMessage(txtSomeErr);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
close: function() {
|
||||
$('#room-allotment-comment-modal').modal('hide');
|
||||
}
|
||||
};
|
||||
|
||||
function updateAdditionalServices(element)
|
||||
{
|
||||
var id_room_type_service_product_order_detail = $(element).data('id_room_type_service_product_order_detail');
|
||||
|
||||
@@ -84,12 +84,23 @@ class Blocknewsletter extends Module
|
||||
'actionCustomerAccountAdd',
|
||||
'registerGDPRConsent',
|
||||
'actionExportGDPRData',
|
||||
'actionObjectCustomerUpdateBefore',
|
||||
'actionDeleteGDPRCustomer',
|
||||
'actionObjectCustomerDeleteAfter',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function hookActionObjectCustomerUpdateBefore($params)
|
||||
{
|
||||
$objCustomer = new Customer ($params['object']->id);
|
||||
if ($params['object']->deleted == Customer::STATUS_DELETED
|
||||
&& ($register_status = $this->isNewsletterRegistered($objCustomer->email))
|
||||
) {
|
||||
$this->unregister($objCustomer->email, $register_status);
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionObjectCustomerDeleteAfter($params)
|
||||
{
|
||||
$objCustomer = $params['object'];
|
||||
|
||||
@@ -2098,6 +2098,14 @@ class HotelBookingDetail extends ObjectModel
|
||||
// Reinject quantity in stock
|
||||
$objOldOrderDetail->reinjectQuantity($objOldOrderDetail, $objOldOrderDetail->product_quantity, $deleteQty);
|
||||
|
||||
// retrieve and delete HotelCartBookingData row
|
||||
$idHotelCartBookingData = Db::getInstance()->getValue('SELECT `id` FROM `'._DB_PREFIX_.'htl_cart_booking_data`
|
||||
WHERE date_from = "'.pSQL($objOldHotelBooking->date_from).'" AND date_to = "'.pSQL($objOldHotelBooking->date_to).'"
|
||||
AND id_room = '.(int) $objOldHotelBooking->id_room.' AND `id_order` = '.(int) $objOldHotelBooking->id_order
|
||||
);
|
||||
$objCartBookingData = new HotelCartBookingData($idHotelCartBookingData);
|
||||
$objCartBookingData->delete();
|
||||
|
||||
// delete the booking detail
|
||||
$objOldHotelBooking = new HotelBookingDetail($idHotelBooking);
|
||||
$objOldHotelBooking->delete();
|
||||
@@ -2107,6 +2115,19 @@ class HotelBookingDetail extends ObjectModel
|
||||
// ===============================================================
|
||||
} else {
|
||||
// If we are reallocating to the same room type then we need to update only the room details
|
||||
// update in the cart booking data
|
||||
// retrieve HotelCartBookingData row
|
||||
$idHotelCartBookingData = Db::getInstance()->getValue('SELECT `id` FROM `'._DB_PREFIX_.'htl_cart_booking_data`
|
||||
WHERE date_from = "'.pSQL($objOldHotelBooking->date_from).'" AND date_to = "'.pSQL($objOldHotelBooking->date_to).'"
|
||||
AND id_room = '.(int) $objOldHotelBooking->id_room.' AND `id_order` = '.(int) $objOldHotelBooking->id_order
|
||||
);
|
||||
$objCartBookingData = new HotelCartBookingData($idHotelCartBookingData);
|
||||
$objCartBookingData->id_room = $idRoom;
|
||||
// set backorder to 0 as available reallocate rooms will always be free
|
||||
$objOldHotelBooking->is_back_order = 0;
|
||||
$objCartBookingData->save();
|
||||
|
||||
// update in the hotel booking detail table
|
||||
$objOldHotelBooking->id_room = $idRoom;
|
||||
$objOldHotelBooking->room_num = $objHotelRoomInfo->room_num;
|
||||
// set backorder to 0 as available reallocate rooms will always be free
|
||||
@@ -3362,15 +3383,19 @@ class HotelBookingDetail extends ObjectModel
|
||||
}
|
||||
}
|
||||
|
||||
if ($bookedRoomInfoFlag && !$roomCount && $result) {
|
||||
if (!$roomCount && $result) {
|
||||
$link = new Link();
|
||||
foreach ($result as $key => $bookingInfo) {
|
||||
$result[$key]['booked_room_info'] = $this->chechRoomBooked($bookingInfo['id_room'], $bookingInfo['date_from'], $bookingInfo['date_to']);
|
||||
$result[$key]['orders_filter_link'] = $link->getAdminLink('AdminOrders');
|
||||
$result[$key]['child_ages'] = json_decode($bookingInfo['child_ages'], true);
|
||||
|
||||
// if need only rooms which are available to resolve overbooking the unset booked rooms
|
||||
if ($bookedRoomInfoFlag == 2 && $result[$key]['booked_room_info']) {
|
||||
unset($result[$key]);
|
||||
if ($bookedRoomInfoFlag) {
|
||||
$result[$key]['booked_room_info'] = $this->chechRoomBooked($bookingInfo['id_room'], $bookingInfo['date_from'], $bookingInfo['date_to']);
|
||||
$result[$key]['orders_filter_link'] = $link->getAdminLink('AdminOrders');
|
||||
|
||||
// if need only rooms which are available to resolve overbooking the unset booked rooms
|
||||
if ($bookedRoomInfoFlag == 2 && $result[$key]['booked_room_info']) {
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,9 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
|
||||
public function renderForm()
|
||||
{
|
||||
if (!$this->loadObject(true)) {
|
||||
return;
|
||||
}
|
||||
$smartyVars = array();
|
||||
//tinymce setup
|
||||
$smartyVars['path_css'] = _THEME_CSS_DIR_;
|
||||
@@ -125,7 +128,7 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
$smartyVars['defaultCountry'] = $country->name[Configuration::get('PS_LANG_DEFAULT')];
|
||||
|
||||
$idCountry = null;
|
||||
if ($this->display == 'edit') {
|
||||
if ($this->object->id) {
|
||||
$idHotel = Tools::getValue('id');
|
||||
$hotelBranchInfo = new HotelBranchInformation($idHotel);
|
||||
$objCategory = new Category($hotelBranchInfo->id_category);
|
||||
@@ -168,13 +171,11 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
}
|
||||
}
|
||||
$smartyVars['order_restrict_date_info'] = $restrictDateInfo;
|
||||
}
|
||||
|
||||
// manage state option
|
||||
if ($this->display == 'add') {
|
||||
} else {
|
||||
$idCountry = Tools::getValue('hotel_country');
|
||||
}
|
||||
|
||||
// manage state option
|
||||
$stateOptions = null;
|
||||
if ($idCountry) {
|
||||
$stateOptions = State::getStatesByIdCountry($idCountry);
|
||||
@@ -778,6 +779,7 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
'sortRowsUrl' => $this->context->link->getAdminLink('AdminAddHotel'),
|
||||
'primaryHotelId' => Configuration::get('WK_PRIMARY_HOTEL'),
|
||||
'disableHotelMsg' => $this->l('Primary hotel for website will be updated to first available active hotel.', null, true),
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')),
|
||||
)
|
||||
);
|
||||
// GOOGLE MAP
|
||||
|
||||
@@ -58,6 +58,10 @@ class AdminHotelFeaturesController extends ModuleAdminController
|
||||
|
||||
public function renderForm()
|
||||
{
|
||||
if (!$this->loadObject(true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$smartyVars = array();
|
||||
//lang vars
|
||||
$languages = Language::getLanguages(false);
|
||||
@@ -66,7 +70,7 @@ class AdminHotelFeaturesController extends ModuleAdminController
|
||||
$smartyVars['languages'] = $languages;
|
||||
$smartyVars['currentLang'] = $currentLang;
|
||||
$smartyVars['ps_img_dir'] = _PS_IMG_.'l/';
|
||||
if ($id = Tools::getValue('id')) {
|
||||
if ($id = $this->object->id) {
|
||||
$smartyVars['edit'] = 1;
|
||||
if (Validate::isLoadedObject($objFeatures = new HotelFeatures($id))) {
|
||||
$featureInfo = (array) $objFeatures;
|
||||
|
||||
@@ -195,7 +195,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
|
||||
|
||||
public function renderView()
|
||||
{
|
||||
if (!($objOrderReturn = $this->loadObject(true))) {
|
||||
if (!($objOrderReturn = $this->loadObject())) {
|
||||
return;
|
||||
}
|
||||
$refundStatuses = OrderReturnStateCore::getOrderReturnStates($this->context->language->id);
|
||||
|
||||
@@ -141,14 +141,13 @@ class AdminOrderRefundRulesController extends ModuleAdminController
|
||||
$smartyVars = array();
|
||||
$objCurrency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$smartyVars['objCurrency'] = $objCurrency;
|
||||
|
||||
if ($this->display == 'edit'
|
||||
&& $refundRuleInfo = $this->loadObject(true)
|
||||
if (($refundRuleInfo = $this->loadObject(true))
|
||||
&& $this->object->id
|
||||
) {
|
||||
$smartyVars['edit'] = 1;
|
||||
$idRefundRule = Tools::getValue('id_refund_rule');
|
||||
$objRefundRule = new HotelOrderRefundRules();
|
||||
$smartyVars['refund_rules_info'] = (array)$refundRuleInfo;
|
||||
$smartyVars['refund_rules_info'] = (array) $refundRuleInfo;
|
||||
}
|
||||
|
||||
//lang vars
|
||||
|
||||
@@ -310,6 +310,7 @@ class HotelReservationSystem extends Module
|
||||
'map_input_text' => $objHotel->map_input_text,
|
||||
),
|
||||
'hotel_name' => $objHotel->hotel_name,
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')),
|
||||
));
|
||||
|
||||
$this->context->controller->addJS(
|
||||
|
||||
@@ -217,6 +217,7 @@ var GoogleMapsManager = {
|
||||
position: latLng,
|
||||
map: that.map,
|
||||
draggable: true,
|
||||
icon: PS_STORES_ICON
|
||||
});
|
||||
that.markers.push(marker);
|
||||
marker.addListener('dragend', function(e) {
|
||||
|
||||
@@ -34,6 +34,7 @@ function initMap() {
|
||||
position: hotelLocation,
|
||||
map: map,
|
||||
title: hotel_name,
|
||||
icon: PS_STORES_ICON
|
||||
});
|
||||
|
||||
marker.addListener('click', function() {
|
||||
|
||||
@@ -93,6 +93,7 @@ function initMap() {
|
||||
map: map,
|
||||
title: location.hotel_name,
|
||||
animation: google.maps.Animation.DROP,
|
||||
icon: PS_STORES_ICON
|
||||
});
|
||||
|
||||
// Allow each marker to have an info window
|
||||
|
||||
@@ -151,6 +151,7 @@ function initMap() {
|
||||
position: hotelLocation,
|
||||
map: map,
|
||||
title: hotel_name,
|
||||
icon: PS_STORES_ICON
|
||||
});
|
||||
|
||||
marker.addListener('click', function() {
|
||||
|
||||
@@ -1275,6 +1275,7 @@ function initMap() {
|
||||
const marker = new google.maps.Marker({
|
||||
position: hotelLatLng,
|
||||
map: map,
|
||||
icon: PS_STORES_ICON
|
||||
});
|
||||
|
||||
const uiContent = $('#room-info-map-ui-content .hotel-info-wrap').get(0);
|
||||
|
||||
Reference in New Issue
Block a user