Merge branch 'develop' into gli-1466
This commit is contained in:
@@ -58,6 +58,8 @@ if ($excludeIds && $excludeIds != 'NaN') {
|
||||
$excludeVirtuals = (bool)Tools::getValue('excludeVirtuals', true);
|
||||
$exclude_packs = (bool)Tools::getValue('exclude_packs', true);
|
||||
|
||||
$bookingProduct = (int) Tools::getValue('booking_product');
|
||||
|
||||
$context = Context::getContext();
|
||||
|
||||
$sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, p.`cache_default_attribute`
|
||||
@@ -72,6 +74,7 @@ $sql = 'SELECT p.`id_product`, pl.`link_rewrite`, p.`reference`, pl.`name`, imag
|
||||
(!empty($excludePackItself) ? ' AND p.id_product <> '.$excludePackItself.' ' : ' ').
|
||||
($excludeVirtuals ? 'AND NOT EXISTS (SELECT 1 FROM `'._DB_PREFIX_.'product_download` pd WHERE (pd.id_product = p.id_product))' : '').
|
||||
($exclude_packs ? 'AND (p.cache_is_pack IS NULL OR p.cache_is_pack = 0)' : '').
|
||||
($bookingProduct ? 'AND p.`booking_product` = '.(int) $bookingProduct : '').
|
||||
' GROUP BY p.id_product';
|
||||
|
||||
$items = Db::getInstance()->executeS($sql);
|
||||
|
||||
29
admin/themes/default/css/partials/index.php
Normal file
29
admin/themes/default/css/partials/index.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
1
admin/themes/default/css/partials/ndv3.css
Normal file
1
admin/themes/default/css/partials/ndv3.css
Normal file
@@ -0,0 +1 @@
|
||||
.dashboard-chart-tooltip{background-color:#333;padding:0px 10px 10px 10px;color:#fff;min-width:100px}.dashboard-chart-tooltip label{display:flex;align-items:baseline;gap:5px;font-weight:bold;padding-top:10px}.dashboard-chart-tooltip .tooltip-content{margin-top:5px}.dashboard-chart-tooltip .tooltip-content p{display:flex;align-items:baseline;gap:5px;text-align:left;padding-left:5px}.dashboard-chart-tooltip .tooltip-data-color{display:flex;flex-direction:column;align-items:baseline;padding:5px;max-width:2px}.dashboard-chart-tooltip .text-danger{color:#FF655C}.dashboard-chart-tooltip .text-success{color:#56CE56}
|
||||
1396
admin/themes/default/css/vendor/nv.d3.css
vendored
1396
admin/themes/default/css/vendor/nv.d3.css
vendored
File diff suppressed because it is too large
Load Diff
17
admin/themes/default/js/vendor/nv.d3.min.js
vendored
17
admin/themes/default/js/vendor/nv.d3.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -106,6 +106,7 @@
|
||||
@import "partials/ladda"
|
||||
@import "partials/date-picker"
|
||||
@import "partials/select2"
|
||||
@import "partials/ndv3"
|
||||
|
||||
//Backward compatibility
|
||||
@import "partials/backward"
|
||||
|
||||
@@ -132,6 +132,12 @@
|
||||
.data_value
|
||||
display: block
|
||||
text-align: center
|
||||
.nv-axis.nv-x .tick line, .nv-axis.nv-y .tick line, .nv-interactive .nv-interactiveGuideLine line
|
||||
display: none
|
||||
.nvd3.nv-pie path
|
||||
fill-opacity: 1
|
||||
.nv-label text
|
||||
fill: #FFF!important
|
||||
|
||||
#dashgoals
|
||||
svg
|
||||
|
||||
@@ -4,10 +4,20 @@
|
||||
#customization_list
|
||||
border: 0px
|
||||
|
||||
.booking_occupancy_edit, .booking_occupancy
|
||||
.occupancy-info-separator
|
||||
margin-top: 0px
|
||||
margin-bottom: 10px
|
||||
.close_occupancy
|
||||
text-decoration: underline
|
||||
|
||||
.booking_occupancy
|
||||
.booking_occupancy_wrapper
|
||||
max-height: 250px
|
||||
overflow-x: auto
|
||||
label.room_num_wrapper
|
||||
text-decoration: underline
|
||||
margin-bottom: 10px
|
||||
|
||||
#booking-documents-modal
|
||||
.documents-list
|
||||
@@ -16,3 +26,23 @@
|
||||
img
|
||||
max-height: 55px
|
||||
max-width: 55px
|
||||
.loading_overlay
|
||||
display: none
|
||||
position: fixed
|
||||
left: 0
|
||||
top: 0
|
||||
height: 100%
|
||||
width: 100%
|
||||
background-color: rgba(0, 0, 0, 0.5)
|
||||
z-index: 100000
|
||||
.loading-img
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 0
|
||||
right: 0
|
||||
margin: 0 auto
|
||||
|
||||
|
||||
.room_status_info_form
|
||||
.room_status
|
||||
white-space: normal
|
||||
|
||||
@@ -64,7 +64,7 @@ $sidebar-menu-hover-color: white !default
|
||||
$sidebar-menu-bg-hover-color: #282b30
|
||||
|
||||
// Toolbar
|
||||
$toolbar-buttons-color: #2eacce
|
||||
$toolbar-buttons-color: #00aff0
|
||||
$toolbar-buttons-hover-color: #40c9ed
|
||||
|
||||
// Scaffolding
|
||||
|
||||
@@ -200,6 +200,8 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
input
|
||||
position: absolute
|
||||
@include left(-9000px)
|
||||
&:before
|
||||
visibility: hidden
|
||||
|
||||
.chosen-container-multi
|
||||
.chosen-choices
|
||||
@@ -227,6 +229,7 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
border: 0 !important
|
||||
color: $gray
|
||||
height: $chosen-multi-height - 8px
|
||||
width: 100% !important
|
||||
margin: 0
|
||||
padding: 4px
|
||||
outline: 0
|
||||
@@ -295,6 +298,15 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
.search-field input
|
||||
color: #111 !important
|
||||
|
||||
.chosen-container-multi.chosen-options-horizontal .chosen-choices
|
||||
max-height: 55px !important
|
||||
white-space: nowrap
|
||||
overflow-x: auto
|
||||
|
||||
.chosen-container-multi.chosen-options-horizontal .chosen-choices li
|
||||
float: none
|
||||
display: inline-block
|
||||
|
||||
.chosen-disabled
|
||||
cursor: default
|
||||
opacity: 0.5 !important
|
||||
@@ -341,4 +353,7 @@ $chosen-sprite-path: '../img/chosen-sprite.png'
|
||||
.chosen-search input
|
||||
background: url($chosen-sprite-path) no-repeat -28px -20px, $chosen-background
|
||||
direction: rtl
|
||||
padding: 4px 5px 4px 20px
|
||||
padding: 4px 5px 4px 20px
|
||||
|
||||
#list_filters_panel .chosen-container
|
||||
width: 100% !important
|
||||
@@ -16,7 +16,7 @@ body
|
||||
@include float(left)
|
||||
|
||||
#content.bootstrap
|
||||
padding: 120px 10px 0
|
||||
padding: 90px 10px 0
|
||||
@include transition-property(margin)
|
||||
@include transition-duration(0.4s)
|
||||
@include transition-timing-function(ease-out)
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
@extend .icon-cogs
|
||||
.icon-AdminAdmin
|
||||
@extend .icon-cog
|
||||
.icon-AdminParentStats
|
||||
.icon-AdminStats
|
||||
@extend .icon-bar-chart
|
||||
.icon-AdminStock
|
||||
@extend .icon-archive
|
||||
@@ -362,7 +362,7 @@
|
||||
@extend .icon-edit
|
||||
.process-icon-newAttributes, .process-icon-new, .process-icon-new-url
|
||||
@extend .icon-plus-sign
|
||||
.process-icon-modules-list
|
||||
.process-icon-modules-list, .process-icon-puzzle-piece
|
||||
@extend .icon-puzzle-piece
|
||||
.process-icon-save-date
|
||||
@extend .icon-download
|
||||
|
||||
@@ -268,6 +268,11 @@ $min-height: 850px
|
||||
width: 200px
|
||||
@include margin-right(5px)
|
||||
@include float(right)
|
||||
.clear_search
|
||||
position: absolute
|
||||
top: 6px
|
||||
z-index: 10
|
||||
@include right(8px)
|
||||
li.maintab, li.subtab
|
||||
height: 28px
|
||||
padding: 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.page-head
|
||||
width: 100%
|
||||
height: 100px
|
||||
height: 78px
|
||||
padding: 0
|
||||
margin: 0
|
||||
position: fixed
|
||||
@@ -14,10 +14,11 @@
|
||||
@include float(left)
|
||||
position: relative
|
||||
margin: 0
|
||||
font: 20pt $font-family-sans-serif
|
||||
font: 14pt $font-family-sans-serif
|
||||
font-weight: bold
|
||||
color: #363A41
|
||||
white-space: nowrap
|
||||
@include padding(26px, 0, 0, ($widthSidebarNav+20px))
|
||||
@include padding(31px, 0, 0, ($widthSidebarNav+20px))
|
||||
@media (max-width: $screen-tablet)
|
||||
@include padding(26px, 0, 0, 70px)
|
||||
a
|
||||
@@ -40,6 +41,7 @@
|
||||
position: absolute
|
||||
background-color: transparent!important
|
||||
@include right(0)
|
||||
top: 18px
|
||||
@media (max-width: $screen-sm)
|
||||
#toolbar-nav
|
||||
border: none
|
||||
@@ -48,37 +50,54 @@
|
||||
@include padding(3px, 0, 0, 0)
|
||||
.toolbar_btn
|
||||
position: relative
|
||||
padding: 20px 5px !important
|
||||
padding: 10px 10px !important
|
||||
font-size: 12px
|
||||
line-height: 8px
|
||||
color: $main-color
|
||||
color: $toolbar-buttons-color
|
||||
text-align: center
|
||||
text-shadow: none
|
||||
white-space: nowrap
|
||||
overflow: hidden
|
||||
text-overflow: ellipsis
|
||||
border: 1px solid $toolbar-buttons-color
|
||||
border-radius: 2px
|
||||
@include margin(0, 3px, 2px, 0)
|
||||
@media (max-width: $screen-desktop)
|
||||
width: 46px
|
||||
font-size: 11px
|
||||
div
|
||||
color: #363A41
|
||||
i
|
||||
color: $toolbar-buttons-color
|
||||
display: inline
|
||||
font-size: 18px
|
||||
&:hover
|
||||
color: $toolbar-buttons-hover-color
|
||||
div
|
||||
padding-top: 10px
|
||||
span
|
||||
position: relative
|
||||
top: -2px
|
||||
left: 2px
|
||||
color: #363A41
|
||||
font-weight: 400
|
||||
.dropdown-toolbar
|
||||
display: none
|
||||
@include float(right)
|
||||
@include border-radius(3px)
|
||||
@media (max-width: $screen-sm)
|
||||
display: block
|
||||
padding: 6px 10px !important
|
||||
margin-right: 10px
|
||||
@media (max-width: $screen-xs)
|
||||
margin-right: 5px
|
||||
|
||||
#toolbar-nav
|
||||
li + li
|
||||
margin-left: 8px
|
||||
ul.page-breadcrumb
|
||||
position: absolute
|
||||
list-style: none
|
||||
margin: 0
|
||||
padding: 0
|
||||
top: 4px
|
||||
top: 9px
|
||||
height: 20px
|
||||
line-height: 20px
|
||||
color: black
|
||||
|
||||
29
admin/themes/default/sass/partials/ndv3.sass
Normal file
29
admin/themes/default/sass/partials/ndv3.sass
Normal file
@@ -0,0 +1,29 @@
|
||||
.dashboard-chart-tooltip
|
||||
background-color: #333
|
||||
padding: 0px 10px 10px 10px
|
||||
color: #fff
|
||||
min-width: 100px
|
||||
label
|
||||
display: flex
|
||||
align-items: baseline
|
||||
gap: 5px
|
||||
font-weight: bold
|
||||
padding-top: 10px
|
||||
.tooltip-content
|
||||
margin-top: 5px
|
||||
.tooltip-content p
|
||||
display: flex
|
||||
align-items: baseline
|
||||
gap: 5px
|
||||
text-align: left
|
||||
padding-left: 5px
|
||||
.tooltip-data-color
|
||||
display: flex
|
||||
flex-direction: column
|
||||
align-items: baseline
|
||||
padding: 5px
|
||||
max-width: 2px
|
||||
.text-danger
|
||||
color: #FF655C
|
||||
.text-success
|
||||
color: #56CE56
|
||||
@@ -84,7 +84,7 @@
|
||||
<i class="icon-info"></i>
|
||||
{l s='Server information'}
|
||||
</h3>
|
||||
{if count($uname)}
|
||||
{if Tools::strlen($uname) > 0}
|
||||
<p>
|
||||
<strong>{l s='Server information:'}</strong> {$uname|escape:'html':'UTF-8'}
|
||||
</p>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="panel">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-4 col-sm-12 col-xs-12">
|
||||
<img class="img-responsive" alt="PrestaShop Addons" src="themes/default/img/prestashop-addons-logo.png">
|
||||
<img class="img-responsive" alt="QloApps Addons" src="themes/default/img/prestashop-addons-logo.png">
|
||||
</div>
|
||||
<div class="col-lg-4 col-lg-offset-1 col-md-4 col-sm-7 col-xs-12 addons-style-search-bar">
|
||||
<form id="addons-search-form" method="get" action="http://addons.prestashop.com/{$iso_code}/search" class="float">
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<div class="form-wrapper">
|
||||
<div class="form-group">
|
||||
<p>{l s='To add a new module, simply connect to your PrestaShop Addons account and all your purchases will be automatically imported.'}</p>
|
||||
<p>{l s='To add a new module, simply connect to your QloApps Addons account and all your purchases will be automatically imported.'}</p>
|
||||
</div>
|
||||
</div><!-- /.form-wrapper -->
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<div class="alert alert-info">
|
||||
<h4>{l s='Can I add my own modules?'}</h4>
|
||||
<p>{l s='Please note that for security reasons, you can only add modules that are being distributed on PrestaShop Addons, the official marketplace.'}</p>
|
||||
<p>{l s='Please note that for security reasons, you can only add modules that are being distributed on QloApps Addons, the official marketplace.'}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<li>
|
||||
<a id="desc-module-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&token={$token|escape:'html':'UTF-8'}&updateAll=1" title="{l s='Update all'}">
|
||||
<i class="process-icon-refresh"></i>
|
||||
<div>{l s='Update all'}</div>
|
||||
<span>{l s='Update all'}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
@@ -57,30 +57,32 @@
|
||||
<li>
|
||||
<a id="desc-module-check-and-update-all" class="toolbar_btn" href="{$currentIndex|escape:'html':'UTF-8'}&token={$token|escape:'html':'UTF-8'}&check=1" title="{l s='Check for update'}">
|
||||
<i class="process-icon-refresh"></i>
|
||||
<div>{l s='Check for update'}</div>
|
||||
<span>{l s='Check for update'}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a id="desc-module-catalog" class="toolbar_btn anchor" href="{$link->getAdminLink('AdminModulesCatalog')}" title="{l s='Recommended Modules and Services'}">
|
||||
<i class="process-icon-modules-list"></i>
|
||||
<div>{l s='Recommended Modules and Services'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{if $add_permission eq '1' && ($context_mode != Context::MODE_HOST)}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn anchor" href="#" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="{$link->getAdminLink('AdminModules')}&addnewmodule" title="{l s='Add a new module'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<div>{l s='Add a new module'}</div>
|
||||
<span>{l s='Recommended Modules and Services'}</span>
|
||||
</a>
|
||||
</li>
|
||||
{if $add_permission eq '1'}
|
||||
{if $context_mode != Context::MODE_HOST}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn anchor" href="#" onclick="$('#module_install').slideToggle();" title="{l s='Add a new module'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<span>{l s='Add a new module'}</span>
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a id="desc-module-new" class="toolbar_btn" href="{$link->getAdminLink('AdminModules')}&addnewmodule" title="{l s='Add a new module'}">
|
||||
<i class="process-icon-new"></i>
|
||||
<span>{l s='Add a new module'}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
{if isset($help_link)}
|
||||
{* <li>
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="allow_multiple_quantity_container" {if (!$product->available_for_order && $product->isAssociatedToShop()) || $product->auto_add_to_cart}style="display:none;"{/if}>
|
||||
<div id="allow_multiple_quantity_container" {if $product->auto_add_to_cart && $product->isAssociatedToShop()}style="display:none;"{/if}>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='When enabled, customer can order multiple quantity of product otherwise only one quantity can be purchased by customer per room/hotel'}">
|
||||
@@ -412,7 +412,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="max_quantity_container" class="form-group" {if (!$product->available_for_order && $product->isAssociatedToShop()) || $product->auto_add_to_cart || !$product->allow_multiple_quantity}style="display:none;"{/if}>
|
||||
<div id="max_quantity_container" class="form-group" {if ($product->auto_add_to_cart && $product->isAssociatedToShop()) || !$product->allow_multiple_quantity}style="display:none;"{/if}>
|
||||
<label class="control-label col-lg-3" for="max_quantity">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Enter max allowed quantity per room, enter 0 for unlimited.'}">
|
||||
|
||||
@@ -395,7 +395,7 @@ $(document).ready(function () {
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{if !$multi_shop}
|
||||
<input type="hidden" name="sp_id_shop" value="0" />
|
||||
<input type="hidden" name="sp_id_shop" value="1" />
|
||||
{else}
|
||||
<div class="col-lg-3">
|
||||
<select name="sp_id_shop" id="sp_id_shop">
|
||||
|
||||
@@ -134,7 +134,10 @@
|
||||
<p>{$product['name']|escape:'html':'UTF-8'}</p>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control room_type_service_product_qty qty" id="qty_{$product.id_product}" name="service_product_qty_{$product.id_product}" data-id-product="{$product.id_product}" min="1" value="{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}{$selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity']}{else}1{/if}">
|
||||
<input type="number" class="form-control room_type_service_product_qty qty" id="qty_{$product.id_product}" name="service_product_qty_{$product.id_product}" data-id-product="{$product.id_product}" min="1" data-max-quantity="{$product.max_quantity}" value="{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}{$selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity']}{else}1{/if}">
|
||||
<p style="display:{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity'] > $product.max_quantity}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$product.max_quantity}</span>
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{assign var=curr_id value=$cart->id_currency|intval}
|
||||
{foreach from=$cart_detail_data item=data}
|
||||
<tr data-id-booking-data="{$data.id}" data-id-product="{$data.id_product}" data-id-room="{$data.id_room}" data-date-from="{$data.date_from}" data-date-to="{$data.date_to}" >
|
||||
<td>{$data.room_num|escape:'html':'UTF-8'}</td>
|
||||
<td>{$data.room_num|escape:'html':'UTF-8'} {hook h='displayRoomNumAfter' data=$data type='adminOrder'}</td>
|
||||
<td><img src="{$data.image_link|escape:'html':'UTF-8'}" title="Room image" /></td>
|
||||
<td>
|
||||
<p>{$data.room_type|escape:'html':'UTF-8'}</p>
|
||||
|
||||
@@ -43,97 +43,70 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getDocuments() item=document}
|
||||
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
<tr id="delivery_{$document->id}">
|
||||
{else}
|
||||
<tr id="invoice_{$document->id}">
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<tr id="orderslip_{$document->id}">
|
||||
{/if}
|
||||
|
||||
<td>{dateFormat date=$document->date_add}</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
{l s='Delivery slip'}
|
||||
{else}
|
||||
{l s='Invoice'}
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{l s='Credit Slip'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order_invoice={$document->id}">
|
||||
{else}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
||||
{/if}
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
{Configuration::get('PS_DELIVERY_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$document->delivery_number}
|
||||
{else}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
|
||||
{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<td>{dateFormat date=$document->date_add}</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if isset($document->is_delivery)}
|
||||
--
|
||||
{else}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getTotalPaid()}
|
||||
<span>
|
||||
{if $document->getRestPaid() > 0}
|
||||
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
|
||||
{elseif $document->getRestPaid() < 0}
|
||||
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{l s='Invoice'}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{displayPrice price=$document->total_products_tax_incl+$document->total_shipping_tax_incl currency=$currency->id}
|
||||
{l s='Credit Slip'}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right document_action">
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if !isset($document->is_delivery)}
|
||||
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#form_add_payment_panel" class="js-set-payment btn btn-default anchor" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}">
|
||||
<i class="icon-money"></i>
|
||||
{l s='Enter payment'}
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<a href="#" class="btn btn-default" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}">
|
||||
{if $document->note eq ''}
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add note'}
|
||||
{else}
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit note'}
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{/if}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateInvoicePDF&id_order_invoice={$document->id}">
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
<a class="_blank" title="{l s='See the document'}" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$document->id}">
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{$document->getInvoiceNumberFormatted($current_id_lang, $order->id_shop)}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{Configuration::get('PS_CREDIT_SLIP_PREFIX', $current_id_lang)}{'%06d'|sprintf:$document->id}
|
||||
{/if}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{displayPrice price=$document->total_paid_tax_incl currency=$currency->id}
|
||||
{if $document->getTotalPaid()}
|
||||
<span>
|
||||
{if $document->getRestPaid() > 0}
|
||||
({displayPrice price=$document->getRestPaid() currency=$currency->id} {l s='not paid'})
|
||||
{elseif $document->getRestPaid() < 0}
|
||||
({displayPrice price=-$document->getRestPaid() currency=$currency->id} {l s='overpaid'})
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{elseif get_class($document) eq 'OrderSlip'}
|
||||
{displayPrice price=$document->total_products_tax_incl+$document->total_shipping_tax_incl currency=$currency->id}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right document_action">
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if $document->getRestPaid()}
|
||||
<a href="#form_add_payment_panel" class="js-set-payment btn btn-default anchor" data-amount="{$document->getRestPaid()}" data-id-invoice="{$document->id}" title="{l s='Set payment form'}">
|
||||
<i class="icon-money"></i>
|
||||
{l s='Enter payment'}
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<a href="#" class="btn btn-default" onclick="$('#invoiceNote{$document->id}').show(); return false;" title="{if $document->note eq ''}{l s='Add note'}{else}{l s='Edit note'}{/if}">
|
||||
{if $document->note eq ''}
|
||||
<i class="icon-plus-sign-alt"></i>
|
||||
{l s='Add note'}
|
||||
{else}
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit note'}
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{if get_class($document) eq 'OrderInvoice'}
|
||||
{if !isset($document->is_delivery)}
|
||||
<tr id="invoiceNote{$document->id}" style="display:none">
|
||||
<td colspan="5">
|
||||
<form action="{$current_index}&viewOrder&id_order={$order->id}{if isset($smarty.get.token)}&token={$smarty.get.token|escape:'html':'UTF-8'}{/if}" method="post">
|
||||
@@ -155,7 +128,6 @@
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{foreachelse}
|
||||
<tr>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{**
|
||||
* 2010-2024 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through LICENSE.txt file inside our module
|
||||
*
|
||||
* 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 CustomizationPolicy.txt file inside our module for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright 2010-2024 Webkul IN
|
||||
* @license LICENSE.txt
|
||||
*}
|
||||
|
||||
{if is_array($hotel_rooms_info) && count($hotel_rooms_info)}
|
||||
<option value="" selected="selected">-</option>
|
||||
{foreach from=$hotel_rooms_info item=hotel_room}
|
||||
<option value="{$hotel_room.id}">{$hotel_room.room_num}, {$hotel_room.room_type_name}, {$hotel_room.hotel_name}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
@@ -0,0 +1,25 @@
|
||||
{**
|
||||
* 2010-2024 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through LICENSE.txt file inside our module
|
||||
*
|
||||
* 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 CustomizationPolicy.txt file inside our module for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright 2010-2024 Webkul IN
|
||||
* @license LICENSE.txt
|
||||
*}
|
||||
|
||||
{if is_array($room_types_info) && count($room_types_info)}
|
||||
<option value="" selected="selected">-</option>
|
||||
{foreach from=$room_types_info item=room_type}
|
||||
<option value="{$room_type.id_product}">{$room_type.room_type}, {$room_type.hotel_name}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
@@ -74,9 +74,6 @@
|
||||
<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">
|
||||
<input type="hidden" class="max_adults" value="">
|
||||
<input type="hidden" class="max_children" value="">
|
||||
<input type="hidden" class="max_guests" value="">
|
||||
<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">
|
||||
@@ -87,7 +84,7 @@
|
||||
</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" {if $max_child_in_room}max="{$max_child_in_room}"{/if}>
|
||||
<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>
|
||||
@@ -101,12 +98,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="occupancy-info-separator col-sm-12">
|
||||
</div>
|
||||
</div>
|
||||
<div class="add_occupancy_block">
|
||||
<a class="add_new_occupancy_btn" href="#"><i class="icon-plus"></i> <span>{l s='Add Room'}</span></a>
|
||||
</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>
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
</a>
|
||||
{/if}
|
||||
{* Generate HTML code for printing Delivery Icon with link *}
|
||||
{if $order->delivery_number}
|
||||
{* {if $order->delivery_number}
|
||||
<a class="btn btn-default _blank" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}">
|
||||
<i class="icon-truck"></i>
|
||||
</a>
|
||||
{/if}
|
||||
{/if} *}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<tr class="product-line-row" 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}">
|
||||
<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}">
|
||||
{if $refund_allowed}
|
||||
<td class="standard_refund_fields" style="display:none">
|
||||
<input type="checkbox" name="id_htl_booking[]" value="{$data.id|escape:'html':'UTF-8'}" {if isset($refundReqBookings) && ($data.id|in_array:$refundReqBookings)}disabled{/if}/>
|
||||
<input type="checkbox" name="id_htl_booking[]" value="{$data.id|escape:'html':'UTF-8'}" {if (isset($refundReqBookings) && ($data.id|in_array:$refundReqBookings)) || $data.is_refunded}disabled{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
<td class="text-center">
|
||||
@@ -79,7 +79,7 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $order->with_occupancy && $data['children']}
|
||||
{if $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>
|
||||
@@ -98,67 +98,63 @@
|
||||
{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}
|
||||
{if $order->with_occupancy}
|
||||
<div class="booking_occupancy_edit" style="display:none;">
|
||||
<div class="dropdown">
|
||||
<button class="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>
|
||||
</div>
|
||||
<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 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="occupancy-info-separator">
|
||||
</div>
|
||||
</div>
|
||||
</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 class="booking_occupancy_edit" style="display:none;">
|
||||
<div class="dropdown">
|
||||
<button class="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 row">
|
||||
<div class="occupancy_info_block col-sm-12" occ_block_index="0">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 form-group 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">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 form-group 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">
|
||||
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row children_age_info_block" {if !isset($data['child_ages']) || !$data['child_ages']}style="display:none"{/if}>
|
||||
<div class="col-sm-12 form-group">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="occupancy-info-separator col-sm-12">
|
||||
<div class="col-sm-12">
|
||||
<a class="pull-right close_occupancy_link" href="#">{l s='close'} <i class="icon-remove"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="room_unit_price_show">
|
||||
@@ -182,7 +178,7 @@
|
||||
<td class="text-center">
|
||||
<span class="extra_service_show">
|
||||
{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_price_te'] + $data['additional_services_price_te'] + $data['convenience_fee_te'] + $data['additional_services_price_auto_add_te']) > 0}
|
||||
{if $data['extra_demands']|count || $data['additional_services']|count}
|
||||
<a href="#" data-toggle="modal" data-target="#rooms_type_extra_demands" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" class="open_room_extra_services" id_htl_booking="{$data['id']}">
|
||||
<i class="icon icon-lg icon-info-circle"></i>
|
||||
</a>
|
||||
@@ -263,9 +259,9 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#mySwappigModal" data-id_order="{$order->id}" data-room_num='{$data.room_num}' data-date_from='{$data.date_from}' data-date_to='{$data.date_to}' data-id_room='{$data.id_room}' 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_rm_realloc='{$data.avail_rooms_to_realloc|@json_encode}'>
|
||||
<a href="#" 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-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}'>
|
||||
<i class="icon-refresh"></i>
|
||||
{l s='Reallocate Room'}
|
||||
{l s='Reallocate/Swap Room'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -287,4 +283,4 @@
|
||||
</button>
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
@@ -53,10 +53,13 @@
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<td class="col-sm-4">
|
||||
{if $service['allow_multiple_quantity']}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control qty" min="1" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}" data-id_product="{$service['id_product']|escape:'html':'UTF-8'}" value="{$service['quantity']|escape:'html':'UTF-8'}">
|
||||
<input type="number" class="form-control qty" min="1" data-max-quantity="{$service['max_quantity']}" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}" data-id_product="{$service['id_product']|escape:'html':'UTF-8'}" value="{$service['quantity']|escape:'html':'UTF-8'}">
|
||||
<p style="display:{if $service['quantity'] > $service['max_quantity']}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']}</span>
|
||||
</p>
|
||||
</div>
|
||||
{else}
|
||||
--
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<th class="text-center"><span class="title_box">{l s='Refunded amount'}</span></th>
|
||||
{/if}
|
||||
{if ($can_edit && !$order->hasBeenDelivered())}
|
||||
<th class="text-center fixed-width-lg"><span class="title_box">{l s='Edit Order'}</th>
|
||||
<th class="text-center fixed-width-lg"><span class="title_box">{l s='Edit Order'}</th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -32,9 +32,14 @@
|
||||
{include file='controllers/orders/_product_line.tpl'}
|
||||
{/foreach}
|
||||
{else}
|
||||
{* <tr>
|
||||
<td>{l s='No Data Found.'}</td>
|
||||
</tr> *}
|
||||
<tr>
|
||||
<td class="list-empty" colspan="14">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No rooms found'}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{* Include product line partial *}
|
||||
{include file='controllers/orders/_new_product.tpl'}
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
selectFirst: false,
|
||||
scroll: false,
|
||||
dataType: "json",
|
||||
cacheLength: 0,
|
||||
formatItem: function(data, i, max, value, term) {
|
||||
return value;
|
||||
},
|
||||
@@ -115,7 +116,8 @@
|
||||
ajax: "1",
|
||||
token: "{getAdminToken tab='AdminCartRules'}",
|
||||
tab: "AdminCartRules",
|
||||
action: "searchCartRuleVouchers"
|
||||
action: "searchCartRuleVouchers",
|
||||
id_customer: function () { return window.id_customer },
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -808,7 +810,9 @@
|
||||
ajax: "1",
|
||||
tab: "AdminCustomers",
|
||||
action: "searchCustomers",
|
||||
customer_search: $('#customer').val()},
|
||||
customer_search: $('#customer').val(),
|
||||
skip_deleted: "1",
|
||||
},
|
||||
success : function(res)
|
||||
{
|
||||
if(res.found)
|
||||
@@ -1579,6 +1583,17 @@
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '.room_type_service_product_qty', function(e) {
|
||||
let quantityInputField = this;
|
||||
let maximumQuantity = parseInt($(quantityInputField).attr('data-max-quantity'));
|
||||
let currentQuantity = parseInt($(quantityInputField).val());
|
||||
if (currentQuantity > maximumQuantity) {
|
||||
$(quantityInputField).siblings('p').show();
|
||||
} else {
|
||||
$(quantityInputField).siblings('p').hide();
|
||||
}
|
||||
});
|
||||
|
||||
function updateServiceProducts(element)
|
||||
{
|
||||
var operator = $(element).is(':checked') ? 'up' : 'down';
|
||||
|
||||
@@ -122,25 +122,37 @@
|
||||
{if ($params.type == 'date' || $params.type == 'datetime' || $params.type == 'range') && $params.value|is_array}
|
||||
{assign var="filter_value" value=''}
|
||||
{foreach $params.value as $value}
|
||||
{if ($value|is_string && !empty($value))}
|
||||
{if empty($filter_value)}
|
||||
{if (isset($value) && ($value !== '' || $value === 0))}
|
||||
{if !(isset($filter_value) && ($filter_value !== '' || $filter_value === 0))}
|
||||
{assign var="filter_value" value=$value}
|
||||
{else}
|
||||
{assign var="filter_value" value="`$filter_value` - `$value`"}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if !empty($filter_value)}
|
||||
{if (isset($filter_value) && ($filter_value !== '' || $filter_value === 0))}
|
||||
<span data-filter_key="{if isset($params.name_date)}{$params.name_date}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$filter_value|escape:'html':'UTF-8'}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{/if}
|
||||
{else if $params.type == 'select'}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$params['list'][$params['value']]|escape:'html':'UTF-8'}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}" data-multiple="{$params.multiple|intval}" data-operator="{$params.operator}">
|
||||
{$params['title']|escape:'html':'UTF-8'}:
|
||||
<span class="filter_value">
|
||||
{foreach from=$params.value item=option name=foreachInfo}
|
||||
{$params.list[$option]}{if !$smarty.foreach.foreachInfo.last}{if $params.operator == 'or'} | {else}, {/if}{/if}
|
||||
{/foreach}
|
||||
</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{else}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$params['list'][$params['value']]|replace: ' ' : ''}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{/if}
|
||||
{else}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$params['value']|escape:'html':'UTF-8'}</span>
|
||||
@@ -166,7 +178,7 @@
|
||||
<input type="text" class="filter form-control" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}[0]" placeholder="{l s='From'}" value="{if isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}[1]" placeholder="{l s='To'}" value="{if isset($params.value.1)}{$params.value.1}{/if}">
|
||||
</div>
|
||||
{else if $params.type == 'bool'}
|
||||
{elseif $params.type == 'bool'}
|
||||
<select id="filter_input_{$key}" class="filter fixed-width-sm center" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}">
|
||||
<option value="">-</option>
|
||||
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
||||
@@ -205,21 +217,13 @@
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
beforeShow: function() {
|
||||
let dateTo = $('#local_{$params.id_date}_1').val().trim();
|
||||
if (typeof dateTo != 'undefined' && dateTo != '') {
|
||||
let objDateToMax = $.datepicker.parseDate('yy-mm-dd', dateTo);
|
||||
objDateToMax.setDate(objDateToMax.getDate() - 1);
|
||||
$('#local_{$params.id_date}_0').datepicker('option', 'maxDate', objDateToMax);
|
||||
}
|
||||
},
|
||||
onClose: function() {
|
||||
let dateFrom = $('#local_{$params.id_date}_0').val().trim();
|
||||
let dateTo = $('#local_{$params.id_date}_1').val().trim();
|
||||
|
||||
if (dateFrom >= dateTo) {
|
||||
if ((dateFrom && dateTo) && (dateFrom >= dateTo)) {
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
objDateToMin.setDate(objDateToMin.getDate());
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', 'minDate', objDateToMin);
|
||||
}
|
||||
@@ -235,7 +239,7 @@
|
||||
|
||||
if (typeof dateFrom != 'undefined' && dateFrom != '') {
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
objDateToMin.setDate(objDateToMin.getDate());
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', 'minDate', objDateToMin);
|
||||
}
|
||||
@@ -245,18 +249,28 @@
|
||||
</script>
|
||||
</div>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.filter_key)}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if}" onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen chosen-options-horizontal" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if (string)$option_display === (string)$params.value || (string)$option_value === (string)$params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
<option value="{$option_value}" {if isset($params.value) && $params.value}{if in_array($option_value, $params.value)} selected="selected"{/if}{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{else}
|
||||
{if isset($params.filter_key)}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} {if isset($params.class)}{$params.class}{/if}" {if !isset($params.remove_onchange) || !$params.remove_onchange}onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();"{/if} name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if (string)$option_display === (string)$params.value || (string)$option_value === (string)$params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
<input type="text" class="filter" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'html':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
<input type="text" id="filter_input_{$key}" class="filter" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'html':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -297,12 +311,112 @@
|
||||
} else if (type == 'range') {
|
||||
$('#list_filters_panel').find('[name*="orderFilter_'+$(this).parent().data('filter_key')+'"]').val('');
|
||||
} else if (type == 'select') {
|
||||
$('#list_filters_panel').find('select[name="orderFilter_'+$(this).parent().data('filter_key')+'"] option:selected').prop("selected", false);
|
||||
$('#list_filters_panel').find('select[name*="orderFilter_'+$(this).parent().data('filter_key')+'"] option:selected').prop('selected', false);
|
||||
} else {
|
||||
$('#list_filters_panel').find('input[name="orderFilter_'+$(this).parent().data('filter_key')+'"]').val('');
|
||||
}
|
||||
|
||||
// set post data for empty multi-select filters
|
||||
$(form).find('select[multiple]').each(function (i, selectElement) {
|
||||
if ($(selectElement).find('option:selected').length == 0) {
|
||||
$(form).append('<input type="hidden" name="' + $(selectElement).attr('name').slice(0, -2) + '" value="">');
|
||||
}
|
||||
});
|
||||
|
||||
form.submit();
|
||||
});
|
||||
|
||||
$('#form-order').submit(function () {
|
||||
let form = $(this);
|
||||
$(form).find('select[multiple]').each(function (i, selectElement) {
|
||||
if ($(selectElement).val() == null) {
|
||||
$(form).append('<input type="hidden" name="' + $(selectElement).attr('name').slice(0, -2) + '" value="">');
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
function updateRoomTypeFilter() {
|
||||
let filterInputHotelName = $('#filter_input_hotel_name');
|
||||
let filterInputRoomTypeName = $('#filter_input_room_type_name');
|
||||
|
||||
let idHotel = parseInt($(filterInputHotelName).val() || '0');
|
||||
|
||||
$.ajax({
|
||||
url: currentIndex + '&token=' + token,
|
||||
data: {
|
||||
ajax: true,
|
||||
action: 'GetHotelRoomTypes',
|
||||
id_hotel: idHotel,
|
||||
},
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
success: function(response) {
|
||||
if (response.status) {
|
||||
if (response.has_room_types) {
|
||||
$(filterInputRoomTypeName).html(response.html_room_types);
|
||||
} else {
|
||||
$(filterInputRoomTypeName).find('option').not(':first').remove();
|
||||
}
|
||||
|
||||
// destroy current chosen and re-initialize
|
||||
$(filterInputRoomTypeName).chosen('destroy');
|
||||
$(filterInputRoomTypeName).chosen({
|
||||
disable_search_threshold: 5,
|
||||
search_contains: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function updateHotelRoomsFilter(useRoomType = true) {
|
||||
let filterInputHotelName = $('#filter_input_hotel_name');
|
||||
let filterInputRoomTypeName = $('#filter_input_room_type_name');
|
||||
let filterInputRoomNumber = $('#filter_input_id_room_information');
|
||||
|
||||
let idHotel = parseInt($(filterInputHotelName).val() || '0');
|
||||
let idProduct = parseInt($(filterInputRoomTypeName).val() || '0');
|
||||
|
||||
$.ajax({
|
||||
url: currentIndex + '&token=' + token,
|
||||
data: {
|
||||
ajax: true,
|
||||
action: 'GetHotelRooms',
|
||||
id_hotel: idHotel,
|
||||
id_product: useRoomType ? idProduct : 0,
|
||||
},
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
success: function(response) {
|
||||
if (response.status) {
|
||||
if (response.has_hotel_rooms) {
|
||||
$(filterInputRoomNumber).html(response.html_hotel_rooms);
|
||||
} else {
|
||||
$(filterInputRoomNumber).find('option').not(':first').remove();
|
||||
}
|
||||
|
||||
// destroy current chosen and re-initialize
|
||||
$(filterInputRoomNumber).chosen('destroy');
|
||||
$(filterInputRoomNumber).chosen({
|
||||
disable_search_threshold: 5,
|
||||
search_contains: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// manage Hotel and Room type filter inputs
|
||||
$(document).on('change', '#filter_input_hotel_name', function () {
|
||||
updateRoomTypeFilter();
|
||||
updateHotelRoomsFilter(false);
|
||||
});
|
||||
|
||||
$(document).on('change', '#filter_input_room_type_name', function () {
|
||||
updateHotelRoomsFilter();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
@@ -354,7 +468,7 @@
|
||||
.list_filters {
|
||||
padding: 0 30px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));;
|
||||
gap: 8px 40px;}
|
||||
.list_filters > .row {
|
||||
display: flex;
|
||||
|
||||
@@ -157,7 +157,8 @@
|
||||
{/if} -->
|
||||
<!-- End -->
|
||||
|
||||
{if $refund_allowed && !$hasCompletelyRefunded}
|
||||
<!-- Check if refund is allowed and all bookings are not requested for refund -->
|
||||
{if $refund_allowed && !$completeRefundRequestOrCancel}
|
||||
<a id="desc-order-standard_refund" class="btn btn-default" href="#refundForm">
|
||||
<i class="icon-exchange"></i>
|
||||
{if $order->getTotalPaid()|floatval}
|
||||
@@ -232,23 +233,26 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- Change status form -->
|
||||
<form action="{$currentIndex|escape:'html':'UTF-8'}&vieworder&token={$smarty.get.token}" method="post" class="form-horizontal well hidden-print">
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<select id="id_order_state" class="chosen form-control" name="id_order_state">
|
||||
{foreach from=$states item=state}
|
||||
<option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{/if}>{$state['name']|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="submit" name="submitState" class="btn btn-primary">
|
||||
{l s='Update status'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{* If current state is refunded or cancelled the further order status changes are not allowed *}
|
||||
{if !isset($currentState) || (isset($currentState) && ($currentState->id != Configuration::get('PS_OS_REFUND') && $currentState->id != Configuration::get('PS_OS_CANCELED')))}
|
||||
<form action="{$currentIndex|escape:'html':'UTF-8'}&vieworder&id_order={$order->id|intval}&token={$smarty.get.token}" method="post" class="form-horizontal well hidden-print">
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<select id="id_order_state" class="chosen form-control" name="id_order_state">
|
||||
{foreach from=$states item=state}
|
||||
<option value="{$state['id_order_state']|intval}"{if isset($currentState) && $state['id_order_state'] == $currentState->id} selected="selected" disabled="disabled"{elseif ($state['id_order_state'] == Configuration::get('PS_OS_REFUND') && !$allBookingsRefunded)} disabled="disabled"{elseif ($state['id_order_state'] == Configuration::get('PS_OS_CANCELED') && !$allBookingsCancelled)} disabled="disabled"{elseif ($state['id_order_state'] == Configuration::get('PS_OS_OVERBOOKING_PAID') || $state['id_order_state'] == Configuration::get('PS_OS_OVERBOOKING_UNPAID') || $state['id_order_state'] == Configuration::get('PS_OS_OVERBOOKING_PARTIAL_PAID')) && (!isset($orderOverBookings) || !$orderOverBookings)} disabled="disabled"{/if}>{$state['name']|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="submit" name="submitState" class="btn btn-primary">
|
||||
{l s='Update status'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- Tab documents -->
|
||||
<div class="tab-pane" id="documents">
|
||||
@@ -277,61 +281,69 @@
|
||||
<th>{l s='Hotel Name'}</th>
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Documents'}</th>
|
||||
<th>{l s='Order Status'}</th>
|
||||
<th>{l s='Room Status'}</th>
|
||||
</tr>
|
||||
{if isset($htl_booking_order_data) && $htl_booking_order_data}
|
||||
{foreach from=$htl_booking_order_data item=data}
|
||||
{if !$data.is_refunded}
|
||||
<tr>
|
||||
<td>
|
||||
{$data['room_num']}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminAddHotel')}&id={$data['id_hotel']}&updatehtl_branch_info" target="_blank">
|
||||
<span>{$data['hotel_name']}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{dateFormat date=$data['date_from']} - {dateFormat date=$data['date_to']}
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-default" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
|
||||
<i class="icon icon-file-text"></i>
|
||||
{l s='Documents'} <span class="badge badge-info count-documents">{$data.num_checkin_documents}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<form action="" method="post" class="form-horizontal row room_status_info_form">
|
||||
<div class="col-sm-7">
|
||||
<select name="booking_order_status" class="form-control booking_order_status margin-bottom-5">
|
||||
{foreach from=$hotel_order_status item=state}
|
||||
<option value="{$state['id_status']|intval}" {if isset($data.id_status) && $state.id_status == $data.id_status} selected="selected" disabled="disabled"{/if}>{$state.name|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<tr>
|
||||
<td>
|
||||
{$data['room_num']}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{$link->getAdminLink('AdminAddHotel')}&id={$data['id_hotel']}&updatehtl_branch_info" target="_blank">
|
||||
<span>{$data['hotel_name']}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{dateFormat date=$data['date_from']} - {dateFormat date=$data['date_to']}
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-default" onclick="BookingDocumentsModal.init({$data.id|intval}, this); return false;">
|
||||
<i class="icon icon-file-text"></i>
|
||||
{l s='Documents'} <span class="badge badge-info count-documents">{$data.num_checkin_documents}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<form action="" method="post" class="form-horizontal row room_status_info_form">
|
||||
<div class="col-sm-7">
|
||||
{if $data.is_refunded || $data.is_cancelled}
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_ALLOTED']['id_status']}
|
||||
<p><span class="room_status badge badge-infomation">{l s='Room alloted'}</span></p>
|
||||
{/if}
|
||||
{else}
|
||||
<select name="booking_order_status" class="form-control booking_order_status margin-bottom-5">
|
||||
{foreach from=$hotel_order_status item=state}
|
||||
<option value="{$state['id_status']|intval}" {if isset($data.id_status) && $state.id_status == $data.id_status} selected="selected" disabled="disabled"{/if}>{$state.name|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}
|
||||
<p class="text-center"><span class="badge badge-success margin-bottom-5">{l s='Checked in on'} {dateFormat date=$data['check_in']}</span></p>
|
||||
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
|
||||
<p class="text-center"><span class="badge badge-success margin-bottom-5">{l s='Checked out on'} {dateFormat date=$data['check_out']}</span></p>
|
||||
{/if}
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}
|
||||
<p><span class="room_status badge badge-success">{l s='Checked in on'} {dateFormat date=$data['check_in']}</span></p>
|
||||
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
|
||||
<p><span class="room_status badge badge-success">{l s='Checked out on'} {dateFormat date=$data['check_out']}</span></p>
|
||||
{/if}
|
||||
|
||||
{* field for the current date *}
|
||||
<input class="room_status_date wk-input-date" type="text" name="status_date" value="{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}{$data['date_to']|date_format:"%d-%m-%Y"}{else}{$data['date_from']|date_format:"%d-%m-%Y"}{/if}" readonly/>
|
||||
{* field for the current date *}
|
||||
<input class="room_status_date wk-input-date" type="text" name="status_date" value="{if $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}{$data['date_to']|date_format:"%d-%m-%Y"}{else}{$data['date_from']|date_format:"%d-%m-%Y"}{/if}" readonly/>
|
||||
|
||||
<input type="hidden" name="date_from" value="{$data['date_from']|date_format:"%Y-%m-%d"}" />
|
||||
<input type="hidden" name="date_to" value="{$data['date_to']|date_format:"%Y-%m-%d"}" />
|
||||
<input type="hidden" name="id_room" value="{$data['id_room']}" />
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<button type="submit" name="submitbookingOrderStatus" class="btn btn-primary">
|
||||
{l s='Update Status'}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<input type="hidden" name="date_from" value="{$data['date_from']|date_format:"%Y-%m-%d"}" />
|
||||
<input type="hidden" name="date_to" value="{$data['date_to']|date_format:"%Y-%m-%d"}" />
|
||||
<input type="hidden" name="id_room" value="{$data['id_room']}" />
|
||||
<input type="hidden" name="id_order" value="{$order->id}" />
|
||||
</div>
|
||||
<div class="col-sm-5 text-right">
|
||||
{if $data.is_refunded || $data.is_cancelled}
|
||||
<span class="badge badge-danger">{if $data.is_cancelled}{l s='Cancelled'}{else}{l s='Refunded'}{/if}</span>
|
||||
{else}
|
||||
<button type="submit" name="submitbookingOrderStatus" class="btn btn-primary">
|
||||
{l s='Update Status'}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
@@ -352,121 +364,123 @@
|
||||
</script>
|
||||
<hr />
|
||||
<!-- Tab nav -->
|
||||
<ul class="nav nav-tabs" id="myTab" style="display:none"><!-- by webkul -->
|
||||
{$HOOK_TAB_SHIP}
|
||||
<li class="active">
|
||||
<a href="#shipping">
|
||||
<i class="icon-truck "></i>
|
||||
{l s='Shipping'} <span class="badge">{$order->getShipping()|@count}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#returns">
|
||||
<i class="icon-undo"></i>
|
||||
{l s='Merchandise Returns'} <span class="badge">{$order->getReturn()|@count}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Tab content -->
|
||||
<div class="tab-content panel" style="display:none"><!-- by webkul -->
|
||||
{$HOOK_CONTENT_SHIP}
|
||||
<!-- Tab shipping -->
|
||||
<div class="tab-pane active" id="shipping">
|
||||
<h4 class="visible-print">{l s='Shipping'} <span class="badge">({$order->getShipping()|@count})</span></h4>
|
||||
<!-- Shipping block -->
|
||||
{if !$order->isVirtual()}
|
||||
<div class="form-horizontal">
|
||||
{if $order->gift_message}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Message'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$order->gift_message|nl2br}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{include file='controllers/orders/_shipping.tpl'}
|
||||
{if $carrierModuleCall}
|
||||
{$carrierModuleCall}
|
||||
{/if}
|
||||
<hr />
|
||||
{if $order->recyclable}
|
||||
<span class="label label-success"><i class="icon-check"></i> {l s='Recycled packaging'}</span>
|
||||
{else}
|
||||
<span class="label label-inactive"><i class="icon-remove"></i> {l s='Recycled packaging'}</span>
|
||||
{/if}
|
||||
{* <!-- commented by qlo -->
|
||||
<ul class="nav nav-tabs" id="myTab" style="display:none">
|
||||
{$HOOK_TAB_SHIP}
|
||||
<li class="active">
|
||||
<a href="#shipping">
|
||||
<i class="icon-truck "></i>
|
||||
{l s='Shipping'} <span class="badge">{$order->getShipping()|@count}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#returns">
|
||||
<i class="icon-undo"></i>
|
||||
{l s='Merchandise Returns'} <span class="badge">{$order->getReturn()|@count}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Tab content -->
|
||||
<div class="tab-content panel" style="display:none">
|
||||
{$HOOK_CONTENT_SHIP}
|
||||
<!-- Tab shipping -->
|
||||
<div class="tab-pane active" id="shipping">
|
||||
<h4 class="visible-print">{l s='Shipping'} <span class="badge">({$order->getShipping()|@count})</span></h4>
|
||||
<!-- Shipping block -->
|
||||
{if !$order->isVirtual()}
|
||||
<div class="form-horizontal">
|
||||
{if $order->gift_message}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Message'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$order->gift_message|nl2br}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{include file='controllers/orders/_shipping.tpl'}
|
||||
{if $carrierModuleCall}
|
||||
{$carrierModuleCall}
|
||||
{/if}
|
||||
<hr />
|
||||
{if $order->recyclable}
|
||||
<span class="label label-success"><i class="icon-check"></i> {l s='Recycled packaging'}</span>
|
||||
{else}
|
||||
<span class="label label-inactive"><i class="icon-remove"></i> {l s='Recycled packaging'}</span>
|
||||
{/if}
|
||||
|
||||
{if $order->gift}
|
||||
<span class="label label-success"><i class="icon-check"></i> {l s='Gift wrapping'}</span>
|
||||
{else}
|
||||
<span class="label label-inactive"><i class="icon-remove"></i> {l s='Gift wrapping'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- Tab returns -->
|
||||
<div class="tab-pane" id="returns">
|
||||
<h4 class="visible-print">{l s='Merchandise Returns'} <span class="badge">({$order->getReturn()|@count})</span></h4>
|
||||
{if !$order->isVirtual()}
|
||||
<!-- Return block -->
|
||||
{if $order->getReturn()|count > 0}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="title_box ">{l s='Date'}</span></th>
|
||||
<th><span class="title_box ">{l s='Type'}</span></th>
|
||||
<th><span class="title_box ">{l s='Carrier'}</span></th>
|
||||
<th><span class="title_box ">{l s='Tracking number'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getReturn() item=line}
|
||||
<tr>
|
||||
<td>{$line.date_add}</td>
|
||||
<td>{l s=$line.type}</td>
|
||||
<td>{$line.state_name}</td>
|
||||
<td class="actions">
|
||||
<span class="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number|escape:'html':'UTF-8'}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
|
||||
{if $line.can_edit}
|
||||
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&vieworder&id_order={$order->id|intval}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|intval}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'html':'UTF-8'}{else}0{/if}">
|
||||
<span class="shipping_number_edit" style="display:none;">
|
||||
<button type="button" name="tracking_number">
|
||||
{$line.tracking_number|htmlentities}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-default" name="submitShippingNumber">
|
||||
{l s='Update'}
|
||||
</button>
|
||||
</span>
|
||||
<button href="#" class="edit_shipping_number_link">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</button>
|
||||
<button href="#" class="cancel_shipping_number_link" style="display: none;">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</form>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<div class="list-empty hidden-print">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No merchandise returned yet'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $carrierModuleCall}
|
||||
{$carrierModuleCall}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if $order->gift}
|
||||
<span class="label label-success"><i class="icon-check"></i> {l s='Gift wrapping'}</span>
|
||||
{else}
|
||||
<span class="label label-inactive"><i class="icon-remove"></i> {l s='Gift wrapping'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- Tab returns -->
|
||||
<div class="tab-pane" id="returns">
|
||||
<h4 class="visible-print">{l s='Merchandise Returns'} <span class="badge">({$order->getReturn()|@count})</span></h4>
|
||||
{if !$order->isVirtual()}
|
||||
<!-- Return block -->
|
||||
{if $order->getReturn()|count > 0}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="title_box ">{l s='Date'}</span></th>
|
||||
<th><span class="title_box ">{l s='Type'}</span></th>
|
||||
<th><span class="title_box ">{l s='Carrier'}</span></th>
|
||||
<th><span class="title_box ">{l s='Tracking number'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$order->getReturn() item=line}
|
||||
<tr>
|
||||
<td>{$line.date_add}</td>
|
||||
<td>{l s=$line.type}</td>
|
||||
<td>{$line.state_name}</td>
|
||||
<td class="actions">
|
||||
<span class="shipping_number_show">{if isset($line.url) && isset($line.tracking_number)}<a href="{$line.url|replace:'@':$line.tracking_number|escape:'html':'UTF-8'}">{$line.tracking_number}</a>{elseif isset($line.tracking_number)}{$line.tracking_number}{/if}</span>
|
||||
{if $line.can_edit}
|
||||
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&vieworder&id_order={$order->id|intval}&id_order_invoice={if $line.id_order_invoice}{$line.id_order_invoice|intval}{else}0{/if}&id_carrier={if $line.id_carrier}{$line.id_carrier|escape:'html':'UTF-8'}{else}0{/if}">
|
||||
<span class="shipping_number_edit" style="display:none;">
|
||||
<button type="button" name="tracking_number">
|
||||
{$line.tracking_number|htmlentities}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-default" name="submitShippingNumber">
|
||||
{l s='Update'}
|
||||
</button>
|
||||
</span>
|
||||
<button href="#" class="edit_shipping_number_link">
|
||||
<i class="icon-pencil"></i>
|
||||
{l s='Edit'}
|
||||
</button>
|
||||
<button href="#" class="cancel_shipping_number_link" style="display: none;">
|
||||
<i class="icon-remove"></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
</form>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{else}
|
||||
<div class="list-empty hidden-print">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='No merchandise returned yet'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $carrierModuleCall}
|
||||
{$carrierModuleCall}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
*}
|
||||
<script>
|
||||
$('#myTab a').click(function (e) {
|
||||
e.preventDefault()
|
||||
@@ -1163,7 +1177,7 @@
|
||||
<div class="panel" id="refundForm">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-shopping-cart"></i>
|
||||
{l s='Order Detail'} <span class="badge">{$order_detail_data|@count}</span>
|
||||
{l s='Rooms Detail'} <span class="badge">{$order_detail_data|@count}</span>
|
||||
{* by webkul products changes as rooms *}
|
||||
</div>
|
||||
{* by webkul this code is added for showing rooms information on the order detail page *}
|
||||
@@ -1185,9 +1199,11 @@
|
||||
<input type="hidden" name="TaxMethod" value="1">
|
||||
{/if}
|
||||
{if $can_edit}
|
||||
<div class="row-margin-bottom row-margin-top standard_refund_fields" style="display: none;">
|
||||
<textarea class="cancellation_reason" name="cancellation_reason" placeholder="{l s='Enter reason to cancel bookings'}"></textarea>
|
||||
</div>
|
||||
{if $refund_allowed && !$completeRefundRequestOrCancel}
|
||||
<div class="row-margin-bottom row-margin-top standard_refund_fields" style="display: none;">
|
||||
<textarea class="cancellation_reason" name="cancellation_reason" placeholder="{l s='Enter reason to cancel bookings'}"></textarea>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row-margin-bottom row-margin-top order_action">
|
||||
{if !$order->hasBeenDelivered()}
|
||||
{* <button type="button" id="add_product" class="btn btn-default">
|
||||
@@ -1204,7 +1220,7 @@
|
||||
{l s='Add a new discount'}
|
||||
</button>
|
||||
|
||||
{if $refund_allowed && !$hasCompletelyRefunded}
|
||||
{if $refund_allowed && !$completeRefundRequestOrCancel}
|
||||
<div class="pull-right">
|
||||
<button style="display: none;" type="button" class="btn btn-default standard_refund_fields" id="cancelRefund">
|
||||
{l s='Cancel'}
|
||||
@@ -1228,7 +1244,7 @@
|
||||
</div>
|
||||
<div class="col-xs-6 pull-right">
|
||||
<div class="panel panel-vouchers" style="{if !sizeof($discounts)}display:none;{/if}">
|
||||
{if (sizeof($discounts) || $can_edit)}
|
||||
{if sizeof($discounts)}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
@@ -1259,9 +1275,9 @@
|
||||
{displayPrice price=$discount['value'] currency=$currency->id}
|
||||
</td>
|
||||
{if $can_edit}
|
||||
<td>
|
||||
<a href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'html':'UTF-8'}">
|
||||
<i class="icon-minus-sign"></i>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-default" href="{$current_index}&submitDeleteVoucher&id_order_cart_rule={$discount['id_order_cart_rule']}&id_order={$order->id}&token={$smarty.get.token|escape:'html':'UTF-8'}">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Delete voucher'}
|
||||
</a>
|
||||
</td>
|
||||
@@ -1271,6 +1287,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
{if $can_edit}
|
||||
<div class="current-edit" id="voucher_form" style="display:none;">
|
||||
{include file='controllers/orders/_discount_form.tpl'}
|
||||
</div>
|
||||
@@ -1392,16 +1410,14 @@
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $order->total_paid_tax_incl > $order->total_paid_real}
|
||||
<tr>
|
||||
<td class="text-right"><strong>{l s='Due Amount'}</strong></td>
|
||||
<td class="amount text-right nowrap">
|
||||
<strong>
|
||||
{displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_real)}
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="text-right"><strong>{l s='Due Amount'}</strong></td>
|
||||
<td class="amount text-right nowrap">
|
||||
<strong>
|
||||
{displayPrice currency=$order->id_currency price=($order->total_paid_tax_incl - $order->total_paid_real)}
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1493,7 +1509,7 @@
|
||||
<li role="presentation" class="active"><a href="#reallocate_room_tab" aria-controls="reallocate" role="tab" data-toggle="tab">{l s='Room Reallocation'}</a></li>
|
||||
<li role="presentation"><a href="#swap_room_tab" aria-controls="swap" role="tab" data-toggle="tab">{l s='Swap Room'}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content panel active">
|
||||
<div class="tab-content active">
|
||||
<div role="tabpanel" class="tab-pane active" id="reallocate_room_tab">
|
||||
<form method="post" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&vieworder&id_order={$order->id|intval}">
|
||||
<div class="modal-header">
|
||||
@@ -1501,31 +1517,63 @@
|
||||
<h4 class="modal-title" id="realloc_myModalLabel">{l s='Reallocate Rooms'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="curr_room_num" class="control-label model-label">{l s='Current Room Number:'}</label>
|
||||
<input type="text" class="form-control modal_curr_room_num" name="modal_curr_room_num" readonly="true">
|
||||
<input type="hidden" class="form-control modal_date_from" name="modal_date_from">
|
||||
<input type="hidden" class="form-control modal_date_to" name="modal_date_to">
|
||||
<input type="hidden" class="form-control modal_id_room" name="modal_id_room">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="realloc_avail_rooms" class="control-label model-label">{l s='Available Rooms To Reallocate:'}</label>
|
||||
<div class="realloc_avail_rooms_container" style="width: 195px;">
|
||||
<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms">
|
||||
<option value="0" selected="selected">{l s='Select Rooms'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="error_text" id="realloc_sel_rm_err_p"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label style="text-decoration:underline;margin-top:5px;" for="message-text" class="col-sm-12 control-label model-label"><i class="icon-info-circle"></i> {l s='Currently Alloted Customer Information:'}</label>
|
||||
<dl class="well list-detail">
|
||||
<dt>{l s='Name'}</dt>
|
||||
<dd class="cust_name"></dd><br>
|
||||
<dt>{l s='Email'}</dt>
|
||||
<dd class="cust_email"></dd><br>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="curr_room_num" class="control-label model-label">{l s='Current Room Number:'}</label>
|
||||
<input type="text" class="form-control modal_curr_room_num" name="modal_curr_room_num" readonly="true">
|
||||
<input type="hidden" class="form-control modal_id_htl_booking" name="id_htl_booking">
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div class="panel-heading"><i class="icon-user"></i> {l s='Currently Alloted Customer'}</div>
|
||||
<div class="panel-content">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label model-label">{l s='Name'} :</label>
|
||||
<div class="dol-sm-9 cust_name"></div>
|
||||
</div>
|
||||
<div class="">
|
||||
<label class="col-sm-3 control-label model-label">{l s='Email'} :</label>
|
||||
<div class="dol-sm-9 cust_email"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="realloc_avail_room_type" class="control-label model-label">{l s='Room Type To Reallocate:'}</label>
|
||||
<div class="realloc_avail_room_type_container">
|
||||
<select class="form-control" name="realloc_avail_room_type" id="realloc_avail_room_type">
|
||||
<option value="0" selected="selected">{l s='Select Room Type'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="error_text" id="realloc_sel_rm_type_err_p"></p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="realloc_avail_rooms" class="control-label model-label">{l s='Room To Reallocate:'}</label>
|
||||
<div class="realloc_avail_rooms_container">
|
||||
<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms">
|
||||
<option value="0" selected="selected">{l s='Select Rooms'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="error_text" id="realloc_sel_rm_err_p"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="reallocation_price_diff_block" style="display:none;">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="reallocation_price_diff" class="control-label model-label alert-warning">{l s='Price Difference'} *</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
|
||||
<input type="text" name="reallocation_price_diff" id="reallocation_price_diff" value="0" />
|
||||
<span class="input-group-addon">{l s='Tax excl.'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="alert alert-warning col-sm-12 realloc_roomtype_change_message" style="display:none">
|
||||
<p>{l s="If room type is changed while room reallocation then all additional facilities and services will be assigned to the selected room of new room type."}</p>
|
||||
<p>{l s="If you want to change additional facilities or services, you can update by editing the room after reallocation."}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{l s="Close" mod="hotelreservationsyatem"}</button>
|
||||
@@ -1540,29 +1588,35 @@
|
||||
<h4 class="modal-title" id="swap_myModalLabel">{l s='Swap Rooms'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="swap_curr_room_num" class="control-label model-label">{l s='Current Room Number:'}</label>
|
||||
<input type="text" class="form-control modal_curr_room_num" name="modal_curr_room_num" readonly="true">
|
||||
<input type="hidden" class="form-control modal_date_from" name="modal_date_from">
|
||||
<input type="hidden" class="form-control modal_date_to" name="modal_date_to">
|
||||
<input type="hidden" class="form-control modal_id_room" name="modal_id_room">
|
||||
<input type="hidden" class="form-control modal_id_order" name="modal_id_order">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="swap_curr_room_num" class="control-label model-label">{l s='Current Room Number:'}</label>
|
||||
<input type="text" class="form-control modal_curr_room_num" name="modal_curr_room_num" readonly="true">
|
||||
<input type="hidden" class="form-control modal_id_htl_booking" name="id_htl_booking">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="swap_avail_rooms" class="control-label model-label">{l s='Available Rooms To Swap:'}</label>
|
||||
<div class="swap_avail_rooms_container"></div>
|
||||
<p class="error_text" id="swap_sel_rm_err_p"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label style="text-decoration:underline;margin-top:5px;" for="message-text" class="col-sm-12 control-label model-label"><i class="icon-info-circle"></i> {l s='Currently Alloted Customer Information:'}</label>
|
||||
<dl class="well list-detail">
|
||||
<dt>{l s='Name'}</dt>
|
||||
<dd class="cust_name"></dd><br>
|
||||
<dt>{l s='Email'}</dt>
|
||||
<dd class="cust_email"></dd><br>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div class="panel-heading"><i class="icon-user"></i> {l s='Currently Alloted Customer'}</div>
|
||||
<div class="panel-content">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label model-label">{l s='Name'} :</label>
|
||||
<div class="dol-sm-9 cust_name"></div>
|
||||
</div>
|
||||
<div class="">
|
||||
<label class="col-sm-3 control-label model-label">{l s='Email'} :</label>
|
||||
<div class="dol-sm-9 cust_email"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<label for="swap_avail_rooms" class="control-label model-label">{l s='Rooms To Swap:'}</label>
|
||||
<div class="swap_avail_rooms_container"></div>
|
||||
<p class="error_text" id="swap_sel_rm_err_p"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{l s="Close" mod="hotelreservationsyatem"}</button>
|
||||
<input type="submit" id="swap_allocated_rooms" name="swap_allocated_rooms" class="btn btn-primary" value="Swap">
|
||||
@@ -1571,6 +1625,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* loader before loading data *}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$link->getMediaLink("`$img_dir`admin/ajax-loader.gif")}' class="loading-img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1604,7 +1663,11 @@
|
||||
|
||||
|
||||
{strip}
|
||||
{addJsDefL name=no_rm_avail_txt}{l s='No rooms available.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=no_rm_avail_txt}{l s='No room available.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=no_realloc_rm_avail_txt}{l s='No room available for reallocation.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=no_realloc_rm_type_avail_txt}{l s='No room type available for reallocation.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=no_swap_rm_avail_txt}{l s='No room available for swap.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=slct_rm_type_err}{l s='Please select a room type first.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=slct_rm_err}{l s='Please select a room first.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txtExtraDemandSucc}{l s='Updated Successfully' js=1}{/addJsDefL}
|
||||
{addJsDefL name=atleastSelectTxt}{l s='Select at least one facility to update.' js=1}{/addJsDefL}
|
||||
@@ -1625,8 +1688,10 @@
|
||||
{addJsDefL name='years_txt'}{l s='years' js=1}{/addJsDefL}
|
||||
{addJsDefL name='all_children_txt'}{l s='All Children' js=1}{/addJsDefL}
|
||||
{addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL}
|
||||
{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'}
|
||||
{addJsDefL name='undo_cancellation_success'}{l s='Booking cancellation undo process is done successfully.' js=1}{/addJsDefL}
|
||||
{/strip}
|
||||
|
||||
{* Apply javascript for the page *}
|
||||
@@ -1653,12 +1718,10 @@
|
||||
{* open date picker for the date input of check-in checkout dates *}
|
||||
$(document).on('focus', '.room_status_date', function() {
|
||||
var dateFrom = $(this).closest('.room_status_info_form').find('[name="date_from"]').val();
|
||||
dateFrom = dateFrom.split("-");
|
||||
minDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(dateFrom[0], dateFrom[1] - 1, dateFrom[2])));
|
||||
minDate = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
|
||||
var dateTo = $(this).closest('.room_status_info_form').find('[name="date_to"]').val();
|
||||
dateTo = dateTo.split("-");
|
||||
maxDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(dateTo[0], dateTo[1] - 1, dateTo[2])));
|
||||
maxDate = $.datepicker.parseDate('yy-mm-dd', dateTo);
|
||||
|
||||
$(this).datepicker({
|
||||
dateFormat: 'dd-mm-yy',
|
||||
@@ -1751,6 +1814,17 @@
|
||||
$('#room_extra_demand_content #back_to_service_btn').hide();
|
||||
});
|
||||
|
||||
$(document).on('change', '#rooms_type_extra_demands .room_ordered_services .qty', function(e) {
|
||||
let quantityInputField = this;
|
||||
let maximumQuantity = parseInt($(quantityInputField).attr('data-max-quantity'));
|
||||
let currentQuantity = parseInt($(quantityInputField).val());
|
||||
if (currentQuantity > maximumQuantity) {
|
||||
$(quantityInputField).siblings('p').show();
|
||||
} else {
|
||||
$(quantityInputField).siblings('p').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('focusout', '#rooms_type_extra_demands .room_ordered_services .qty', function(e) {
|
||||
var qty_wntd = $(this).val();
|
||||
if (qty_wntd == '' || !$.isNumeric(qty_wntd) || qty_wntd < 1) {
|
||||
@@ -1766,41 +1840,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
function updateAdditionalServices(element)
|
||||
{
|
||||
var id_room_type_service_product_order_detail = $(element).data('id_room_type_service_product_order_detail');
|
||||
var qty = $(element).val();
|
||||
if ($.isNumeric(qty)) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: {
|
||||
id_room_type_service_product_order_detail: id_room_type_service_product_order_detail,
|
||||
qty: qty,
|
||||
action: 'updateRoomAdditionalServices',
|
||||
ajax: true
|
||||
},
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
showErrorMessage(jsonData.errors);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(document).on('submit', '#add_room_services_form', function(e) {
|
||||
e.preventDefault();
|
||||
var form_data = new FormData(this);
|
||||
@@ -1964,65 +2003,153 @@
|
||||
|
||||
$('#mySwappigModal').on('hidden.bs.modal', function (e)
|
||||
{
|
||||
$(".modal_id_order").val('');
|
||||
$(".modal_date_from").val('');
|
||||
$(".modal_date_to").val('');
|
||||
$(".modal_id_room").val('');
|
||||
$(".modal_id_htl_booking").val('');
|
||||
$(".modal_curr_room_num").val('');
|
||||
$(".cust_name").text('');
|
||||
$(".cust_email").text('');
|
||||
$(".swp_rm_opts").remove();
|
||||
$(".realloc_rm_type_opts").remove();
|
||||
$(".realloc_rm_opts").remove();
|
||||
});
|
||||
|
||||
$('#mySwappigModal').on('shown.bs.modal', function (e)
|
||||
{
|
||||
$(".modal_id_order").val(e.relatedTarget.dataset.id_order);
|
||||
$(".modal_date_from").val(e.relatedTarget.dataset.date_from);
|
||||
$(".modal_date_to").val(e.relatedTarget.dataset.date_to);
|
||||
$(".modal_id_room").val(e.relatedTarget.dataset.id_room);
|
||||
$(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num);
|
||||
$(".loading_overlay").show();
|
||||
|
||||
$(".modal_id_htl_booking").val(e.relatedTarget.dataset.id_htl_booking);
|
||||
$(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num + ', ' + e.relatedTarget.dataset.room_type_name);
|
||||
$(".cust_name").text(e.relatedTarget.dataset.cust_name);
|
||||
$(".cust_email").text(e.relatedTarget.dataset.cust_email);
|
||||
|
||||
// For Rooms Swapping
|
||||
if (e.relatedTarget.dataset.avail_rm_swap != 'false') {
|
||||
var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap);
|
||||
// reset price difference fields
|
||||
$("#reallocation_price_diff").val(0);
|
||||
$("#reallocation_price_diff_block").hide();
|
||||
$(".realloc_roomtype_change_message").hide();
|
||||
|
||||
html = '<select class="form-control" name="swap_avail_rooms" id="swap_avail_rooms" style="width:195px;">';
|
||||
// For Rooms Swapping
|
||||
var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap);
|
||||
if (e.relatedTarget.dataset.avail_rm_swap != 'false' && json_arr_rm_swp.length != 0) {
|
||||
html = '<select class="form-control" name="swap_avail_rooms" id="swap_avail_rooms">';
|
||||
$.each(json_arr_rm_swp, function(key,val) {
|
||||
html += '<option class="swp_rm_opts" value="'+val.id_room+'" >'+val.room_num+'</option>';
|
||||
html += '<option class="swp_rm_opts" value="'+val.id_hotel_booking+'" >'+val.room_num+'</option>';
|
||||
});
|
||||
html += '</select>';
|
||||
|
||||
$("#swap_allocated_rooms").removeAttr('disabled');
|
||||
$(".swap_avail_rooms_container").empty().append(html);
|
||||
} else {
|
||||
$(".swap_avail_rooms_container").empty().text(no_rm_avail_txt);
|
||||
$(".swap_avail_rooms_container").empty().text(no_swap_rm_avail_txt).addClass('text-danger');
|
||||
$("#swap_allocated_rooms").attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
// For Rooms Reallocation
|
||||
if (e.relatedTarget.dataset.avail_rm_realloc != 'false') {
|
||||
var json_arr_rm_realloc = JSON.parse(e.relatedTarget.dataset.avail_rm_realloc);
|
||||
|
||||
html = '<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms" style="width:195px;">';
|
||||
$.each(json_arr_rm_realloc, function(key,val) {
|
||||
html += '<option class="realloc_rm_opts" value="'+val.id_room+'" >'+val.room_num+'</option>';
|
||||
var json_arr_realloc_room_types = JSON.parse(e.relatedTarget.dataset.avail_realloc_room_types);
|
||||
if (e.relatedTarget.dataset.avail_realloc_room_types != 'false' && json_arr_realloc_room_types.length != 0) {
|
||||
var idCurrentRoomType = e.relatedTarget.dataset.id_room_type;
|
||||
var roomsTypesHtml = '<select data-id_htl_booking="' + e.relatedTarget.dataset.id_htl_booking + '" class="form-control" name="realloc_avail_room_type" id="realloc_avail_room_type">';
|
||||
$.each(json_arr_realloc_room_types, function(key, room_type) {
|
||||
roomsTypesHtml += "<option rooms_available='" + JSON.stringify(room_type.rooms) + "' class='realloc_rm_type_opts' value='" + room_type.id_product + "'";
|
||||
if (idCurrentRoomType == room_type.id_product) {
|
||||
roomsTypesHtml += ' selected="selected"';
|
||||
}
|
||||
roomsTypesHtml += '>' + room_type.room_type_name + '</option>';
|
||||
});
|
||||
html += '</select>';
|
||||
$(".realloc_avail_rooms_container").empty().append(html);
|
||||
roomsTypesHtml += '</select>';
|
||||
|
||||
setRoomsForReallocation(json_arr_realloc_room_types[idCurrentRoomType]['rooms']);
|
||||
|
||||
$("#realloc_allocated_rooms").removeAttr('disabled');
|
||||
$(".realloc_avail_room_type_container").empty().append(roomsTypesHtml);
|
||||
} else {
|
||||
$(".realloc_avail_rooms_container").empty().text(no_rm_avail_txt);
|
||||
$(".realloc_avail_rooms_container").empty().text(no_realloc_rm_avail_txt).addClass('text-danger');
|
||||
$(".realloc_avail_room_type_container").empty().text(no_realloc_rm_type_avail_txt).addClass('text-danger');
|
||||
$("#realloc_allocated_rooms").attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
$(".loading_overlay").hide();
|
||||
});
|
||||
|
||||
// change room type for reallocation
|
||||
$(document).on("change", "#realloc_avail_room_type", function(e) {
|
||||
$(".loading_overlay").show();
|
||||
|
||||
var idHotelBooking = $(this).data('id_htl_booking');
|
||||
$("#reallocation_price_diff").val(0);
|
||||
$("#reallocation_price_diff_block").hide();
|
||||
if (parseInt(idHotelBooking) > 0) {
|
||||
var optionSelected = $(this).find('option:selected');
|
||||
var roomsAvailable = JSON.parse(optionSelected.attr('rooms_available'));
|
||||
|
||||
// set the rooms of the selceted room type
|
||||
setRoomsForReallocation(roomsAvailable);
|
||||
|
||||
// send an ajax for fetching if price has changes in the new room type seleceted
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: {
|
||||
id_htl_booking: idHotelBooking,
|
||||
id_new_room_type: $(this).val(),
|
||||
action: 'changeRoomTypeToReallocate',
|
||||
ajax: true
|
||||
},
|
||||
success: function(result) {
|
||||
if (result.success == 1) {
|
||||
// has room type changed for reallocation
|
||||
if (result.has_room_type_change == 1) {
|
||||
$(".realloc_roomtype_change_message").show();
|
||||
// has room type price changed for reallocation
|
||||
if (result.has_price_changes == 1) {
|
||||
$("#reallocation_price_diff").val(result.price_diff);
|
||||
$("#reallocation_price_diff_block").show();
|
||||
}
|
||||
} else {
|
||||
$(".realloc_roomtype_change_message").hide();
|
||||
}
|
||||
$('#room_type_change_info').empty();
|
||||
if (result.is_changes_present == 1) {
|
||||
}
|
||||
} else if (typeof(result.error) != 'undefinded' && result.error) {
|
||||
showErrorMessage(result.error);
|
||||
} else {
|
||||
showErrorMessage(txtSomeErr);
|
||||
}
|
||||
|
||||
$(".loading_overlay").hide();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
$(".loading_overlay").hide();
|
||||
showErrorMessage(txtSomeErr);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".loading_overlay").hide();
|
||||
showErrorMessage(txtSomeErr);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
/*For reallocating rooms in the modal*/
|
||||
$("#realloc_allocated_rooms").on('click', function(e){
|
||||
$(".error_text").text('');
|
||||
var room_to_reallocate = $('#realloc_avail_rooms').val();
|
||||
var room_type_to_reallocate = $('#realloc_avail_room_type').val();
|
||||
|
||||
if (typeof room_type_to_reallocate == 'undefined' || room_type_to_reallocate == 0) {
|
||||
$("#realloc_sel_rm_type_err_p").text(slct_rm_type_err);
|
||||
return false;
|
||||
}
|
||||
if (typeof room_to_reallocate == 'undefined' || room_to_reallocate == 0) {
|
||||
$("#realloc_sel_rm_err_p").text(slct_rm_err);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
/*For swaping rooms in the modal*/
|
||||
$("#swap_allocated_rooms").on('click', function(e){
|
||||
$(".error_text").text('');
|
||||
@@ -2033,8 +2160,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
/*END*/
|
||||
|
||||
// for updating customer guest details
|
||||
$('#edit_guest_details').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -2098,9 +2223,61 @@
|
||||
$('.datepicker').datetimepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd ' + hours + ':' + mins + ':' + secs
|
||||
dateFormat: 'yy-mm-dd',
|
||||
timeFormat: 'hh:mm:ss',
|
||||
});
|
||||
});
|
||||
|
||||
function updateAdditionalServices(element)
|
||||
{
|
||||
var id_room_type_service_product_order_detail = $(element).data('id_room_type_service_product_order_detail');
|
||||
var qty = $(element).val();
|
||||
if ($.isNumeric(qty)) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: {
|
||||
id_room_type_service_product_order_detail: id_room_type_service_product_order_detail,
|
||||
qty: qty,
|
||||
action: 'updateRoomAdditionalServices',
|
||||
ajax: true
|
||||
},
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
showErrorMessage(jsonData.errors);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setRoomsForReallocation(roomsAvailable)
|
||||
{
|
||||
if (typeof(roomsAvailable) != 'undefined' && roomsAvailable.length) {
|
||||
var roomsHtml = '<select class="form-control" name="realloc_avail_rooms" id="realloc_avail_rooms">';
|
||||
roomsHtml += '<option class="realloc_rm_opts" value="0">---- ' + select_room_txt + ' ----</option>';
|
||||
$.each(roomsAvailable, function(key, roomInfo) {
|
||||
roomsHtml += '<option class="realloc_rm_opts" value="' + roomInfo.id_room + '">' + roomInfo.room_num + '</option>';
|
||||
});
|
||||
roomsHtml += '</select>';
|
||||
|
||||
$(".realloc_avail_rooms_container").empty().append(roomsHtml);
|
||||
} else {
|
||||
$(".realloc_avail_rooms_container").empty().text(no_realloc_rm_avail_txt);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
{/block}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{if isset($product->id)}
|
||||
<div id="product-configuration" class="panel product-tab">
|
||||
<input type="hidden" name="submitted_tabs[]" value="Configuration" />
|
||||
<h3 class="tab"> <i class="icon-AdminAdmin"></i> {l s='Configuration'}</h3>
|
||||
<h3 class="tab"> <i class="icon-AdminAdmin"></i> {l s='Rooms'}</h3>
|
||||
|
||||
<input type="hidden" id="checkConfSubmit" value="0" name="checkConfSubmit">
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
</td>
|
||||
<td class="col-sm-1 center">
|
||||
{if isset($room_info['id'])}
|
||||
<input type="hidden" class="booked-dates" name="{$var_name_room_info|cat:'[booked_dates]'}" value="{$room_info['booked_dates']|escape:'html':'UTF-8'}">
|
||||
<a href="#" class="view_htl_room btn btn-default" data-toggle="modal" data-target="#room-dates-modal" data-id-room="{$room_info['id']}"><i class="icon-info"></i></a>
|
||||
<a href="#" class="rm_htl_room btn btn-default" data-id-htl-info="{$room_info['id']}"><i class="icon-trash"></i></a>
|
||||
<input type="hidden" name="{$var_name_room_info|cat:'[id]'}" value="{$room_info['id']}">
|
||||
{else}
|
||||
@@ -224,6 +226,36 @@
|
||||
</div>
|
||||
{*END*}
|
||||
|
||||
<div class="modal fade" id="room-dates-modal" tabindex="-1" role="dialog" aria-labelledby="">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close margin-right-10" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><i class="icon-calendar"></i> {l s='Upcoming bookings'}</h4>
|
||||
</div>
|
||||
<div class="room-booked-dates-table modal-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span>{l s='Order'}</span></th>
|
||||
<th><span>{l s='Date From'}</span></th>
|
||||
<th><span>{l s='Date To'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-label="Close">{l s='Done'}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.deactiveDatesModal {
|
||||
cursor: pointer;
|
||||
@@ -400,6 +432,30 @@
|
||||
});
|
||||
});
|
||||
|
||||
{literal}
|
||||
$('#room-dates-modal').on('show.bs.modal', function(e) {
|
||||
const triggerRoom = $(e.relatedTarget);
|
||||
$('#room-dates-modal tbody').html('');
|
||||
var bookedDates = JSON.parse($(triggerRoom).closest('tr').find('.booked-dates').val());
|
||||
if (bookedDates.length) {
|
||||
if (bookedDates.length) {
|
||||
$('#room-dates-modal .room-booked-dates-table').show();
|
||||
$(bookedDates).each(function() {
|
||||
$('#room-dates-modal .room-booked-dates-table tbody').append(`<tr>
|
||||
<td><a href="{/literal}{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}{literal}&vieworder&id_order=${this.id_order}" target="_blank">#${this.id_order}</a></td>
|
||||
<td>${this.date_from_formatted}</td>
|
||||
<td>${this.date_to_formatted}</td>
|
||||
</tr>`);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$('#room-dates-modal .room-booked-dates-table tbody').append(`<tr>
|
||||
<td colspan="3" class="center">{/literal}{l s='No Booking for this room'}{literal}</td>
|
||||
</tr>`);
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
|
||||
// Add new room detail
|
||||
$('#add-more-rooms-button').on('click',function() {
|
||||
var lengthRooms = parseInt($('.room_data_values').length);
|
||||
@@ -444,18 +500,19 @@
|
||||
$.ajax({
|
||||
url: prod_link,
|
||||
type: 'POST',
|
||||
dataType: 'text',
|
||||
dataType: 'JSON',
|
||||
data: {
|
||||
ajax:true,
|
||||
action:'deleteHotelRoom',
|
||||
id: id_htl_info,
|
||||
},
|
||||
success: function (result) {
|
||||
if (parseInt(result) == 1) {
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
showSuccessMessage("{l s='Removed successfully'}");
|
||||
$current.closest(".room_data_values").remove();
|
||||
} else {
|
||||
showErrorMessage("{l s='Some error occurred'}");
|
||||
if (response.errors)
|
||||
showErrorMessage(response.errors);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
@@ -499,10 +556,10 @@
|
||||
dateFormat: 'yy-mm-dd',
|
||||
minDate: 0,
|
||||
onSelect: function(selectedDate) {
|
||||
var date_format = selectedDate.split('-');
|
||||
selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[0], date_format[1] - 1, date_format[2])));
|
||||
selectedDate.setDate(selectedDate.getDate() + 1);
|
||||
$(this).closest('tr').find('.disabled_date_to').datepicker('option', 'minDate', selectedDate);
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', selectedDate);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
|
||||
$(this).closest('tr').find('.disabled_date_to').datepicker('option', 'minDate', objDateToMin);
|
||||
},
|
||||
onClose: function(selectedDate) {
|
||||
var dateTo = $(this).closest('tr').find('.disabled_date_to').val();
|
||||
@@ -517,16 +574,17 @@
|
||||
dateFormat: 'yy-mm-dd',
|
||||
minDate: 0,
|
||||
beforeShow: function (input, instance) {
|
||||
var date_to = $(this).closest('tr').find('.disabled_date_from').val();
|
||||
if (typeof date_to != 'undefined' && date_to != '') {
|
||||
var date_format = date_to.split('-');
|
||||
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date(date_format[0], date_format[1] - 1, date_format[2])));
|
||||
let dateFrom = $(this).closest('tr').find('.disabled_date_from').val();
|
||||
|
||||
let objDateToMin = null;
|
||||
if (typeof dateFrom != 'undefined' && dateFrom != '') {
|
||||
objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
} else {
|
||||
var date_format = new Date();
|
||||
var selectedDate = new Date($.datepicker.formatDate('yy-mm-dd', new Date()));
|
||||
objDateToMin = new Date();
|
||||
}
|
||||
selectedDate.setDate(selectedDate.getDate()+1);
|
||||
$(this).datepicker('option', 'minDate', selectedDate);
|
||||
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
$(this).datepicker('option', 'minDate', objDateToMin);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
{**
|
||||
* 2010-2024 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through LICENSE.txt file inside our module
|
||||
*
|
||||
* 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 CustomizationPolicy.txt file inside our module for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright 2010-2024 Webkul IN
|
||||
* @license LICENSE.txt
|
||||
*}
|
||||
|
||||
{extends file='helpers/list/list_content.tpl'}
|
||||
|
||||
{block name='td_content'}
|
||||
{if isset($tr.$key) && isset($params.position)}
|
||||
{if $order_by == 'position' && $order_way != 'DESC'}
|
||||
{assign var=filters_has_value_no_location_hotel value=false}
|
||||
|
||||
{foreach $fields_display AS $key => $params}
|
||||
{if $key != 'id_category_default' && (isset($params['value']) && $params['value'] !== false && $params['value'] !== '')}
|
||||
{if is_array($params['value']) && trim(implode('', $params['value'])) == ''}
|
||||
{continue}
|
||||
{/if}
|
||||
|
||||
{assign var=filters_has_value_no_location_hotel value=true}
|
||||
{break}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{if !$filters_has_value_no_location_hotel}
|
||||
<div class="dragGroup">
|
||||
<div class="positions">
|
||||
{$tr.$key.position + 1}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
{$tr.$key.position + 1}
|
||||
{/if}
|
||||
{else}
|
||||
{$tr.$key.position + 1}
|
||||
{/if}
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -25,12 +25,393 @@
|
||||
|
||||
{extends file="helpers/list/list_header.tpl"}
|
||||
|
||||
{block name=leadin}
|
||||
{if isset($category_tree)}
|
||||
<div class="bloc-leadin">
|
||||
<div id="container_category_tree">
|
||||
{$category_tree}
|
||||
{block name="tableFilter"}{/block}
|
||||
{block name="override_form_extra"}
|
||||
{if !$simple_header && $show_filters}
|
||||
<script>
|
||||
$(function() {
|
||||
if ($("#list_filters_panel .datepicker").length > 0) {
|
||||
$("#list_filters_panel .datepicker").datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
altFormat: 'yy-mm-dd'
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="list_action_wrapper">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-sm-3 col-md-2">
|
||||
<div class="list_availibility_container">
|
||||
<button type="button" class="btn btn-default btn-left btn-block dropdown-toggle" data-toggle="dropdown">
|
||||
<span>{l s='Available Fields'}
|
||||
<i class="icon-caret-down pull-right"></i>
|
||||
</button>
|
||||
<ul id="optional-list-toggle" class="dropdown-menu">
|
||||
{foreach $fields_optional as $key => $field}
|
||||
<li>
|
||||
<label>
|
||||
<input type="checkbox" name="list_fields_visibility" value="{$key}" {if isset($field['selected']) && $field['selected']}checked="checked"{/if}>
|
||||
{$field['title']}
|
||||
</label>
|
||||
</li>
|
||||
{/foreach}
|
||||
{assign var="fields_optional" value=array()}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 col-xs-offset-5 col-sm-2 col-sm-offset-7 col-md-1 col-md-offset-9">
|
||||
<div class="list_filter_container">
|
||||
<button type="button" class="btn btn-default btn-block" data-toggle="collapse" data-target="#list_filters_panel">
|
||||
<i class="icon-sliders"></i>
|
||||
<span>{l s='Filters'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{if $filters_has_value}
|
||||
<div id="selected_filter_container">
|
||||
{l s='Filters: '}
|
||||
<span class="selected_filters">
|
||||
{foreach $fields_display AS $key => $params}
|
||||
{if (!isset($params.search) || $params.search) && $params.value != ''}
|
||||
{if ($params.type == 'date' || $params.type == 'datetime') && $params.value|is_array}
|
||||
{assign var="filter_value" value=''}
|
||||
{foreach $params.value as $value}
|
||||
{if ($value|is_string && !empty($value))}
|
||||
{if empty($filter_value)}
|
||||
{assign var="filter_value" value=$value}
|
||||
{else}
|
||||
{assign var="filter_value" value="`$filter_value` - `$value`"}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if !empty($filter_value)}
|
||||
<span data-filter_key="{if isset($params.name_date)}{$params.name_date}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$filter_value|escape:'html':'UTF-8'}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{/if}
|
||||
{elseif $params.type == 'range' && $params.value|is_array}
|
||||
{assign var="filter_value" value=''}
|
||||
{foreach $params.value as $value}
|
||||
{if (isset($value) && ($value !== '' || $value === 0))}
|
||||
{if !(isset($filter_value) && ($filter_value !== '' || $filter_value === 0))}
|
||||
{assign var="filter_value" value=$value}
|
||||
{else}
|
||||
{assign var="filter_value" value="`$filter_value` - `$value`"}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if (isset($filter_value) && ($filter_value !== '' || $filter_value === 0))}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$filter_value|escape:'html':'UTF-8'}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{/if}
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}" data-multiple="{$params.multiple|intval}" data-operator="{$params.operator}">
|
||||
{$params['title']|escape:'html':'UTF-8'}:
|
||||
<span class="filter_value">
|
||||
{foreach from=$params.value item=option name=foreachInfo}
|
||||
{$params.list[$option]}{if !$smarty.foreach.foreachInfo.last}{if $params.operator == 'or'} | {else}, {/if}{/if}
|
||||
{/foreach}
|
||||
</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{else}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$params['list'][$params['value']]|replace: ' ' : ''}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{/if}
|
||||
{elseif $params.type == 'bool' && $key == 'advance_payment'}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{if $params['value'] == 1}{l s='Yes'}{elseif $params['value'] == 0}{l s='No'}{/if}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{else}
|
||||
<span data-filter_key="{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" data-filter_type="{$params.type}">
|
||||
{$params['title']|escape:'html':'UTF-8'}: <span class="filter_value">{$params['value']|escape:'html':'UTF-8'}</span>
|
||||
<i class="icon-times"></i>
|
||||
</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="panel collapse" id="list_filters_panel">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="list_filters">
|
||||
{foreach $fields_display AS $key => $params}
|
||||
{if !isset($params.search) || $params.search}
|
||||
<div class="row">
|
||||
<label class="col-xs-3" for="filter_input_{$key}">{$params['title']|escape:'html':'UTF-8'}</label>
|
||||
<div class="col-xs-9">
|
||||
{if $params.type == 'range'}
|
||||
<div class="input_range">
|
||||
<input type="text" class="filter form-control" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}[0]" placeholder="{l s='From'}" value="{if isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}[1]" placeholder="{l s='To'}" value="{if isset($params.value.1)}{$params.value.1}{/if}">
|
||||
</div>
|
||||
{else if $params.type == 'bool'}
|
||||
<select id="filter_input_{$key}" class="filter center" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}">
|
||||
<option value="">-</option>
|
||||
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
</select>
|
||||
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
||||
<div class="date_range">
|
||||
<div class="input-group center">
|
||||
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_0" name="local_{$params.name_date}[0]" placeholder="{l s='From'}" autocomplete="off"/>
|
||||
<input type="hidden" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<span class="input-group-addon">
|
||||
<i class="icon-calendar"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group center">
|
||||
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_1" name="local_{$params.name_date}[1]" placeholder="{l s='To'}" autocomplete="off"/>
|
||||
<input type="hidden" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<span class="input-group-addon">
|
||||
<i class="icon-calendar"></i>
|
||||
</span>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
var dateStart = parseDate($("#{$params.id_date}_0").val());
|
||||
var dateEnd = parseDate($("#{$params.id_date}_1").val());
|
||||
$("#local_{$params.id_date}_0").datepicker("option", "altField", "#{$params.id_date}_0");
|
||||
$("#local_{$params.id_date}_1").datepicker("option", "altField", "#{$params.id_date}_1");
|
||||
if (dateStart !== null){
|
||||
$("#local_{$params.id_date}_0").datepicker("setDate", dateStart);
|
||||
}
|
||||
if (dateEnd !== null){
|
||||
$("#local_{$params.id_date}_1").datepicker("setDate", dateEnd);
|
||||
}
|
||||
|
||||
$('#local_{$params.id_date}_0').datepicker('option', {
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
beforeShow: function() {
|
||||
let dateTo = $('#local_{$params.id_date}_1').val().trim();
|
||||
if (typeof dateTo != 'undefined' && dateTo != '') {
|
||||
let objDateToMax = $.datepicker.parseDate('yy-mm-dd', dateTo);
|
||||
objDateToMax.setDate(objDateToMax.getDate() - 1);
|
||||
$('#local_{$params.id_date}_0').datepicker('option', 'maxDate', objDateToMax);
|
||||
}
|
||||
},
|
||||
onClose: function() {
|
||||
let dateFrom = $('#local_{$params.id_date}_0').val().trim();
|
||||
let dateTo = $('#local_{$params.id_date}_1').val().trim();
|
||||
|
||||
if (dateFrom >= dateTo) {
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', 'minDate', objDateToMin);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', {
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
beforeShow: function() {
|
||||
let dateFrom = $('#local_{$params.id_date}_0').val().trim();
|
||||
|
||||
if (typeof dateFrom != 'undefined' && dateFrom != '') {
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', 'minDate', objDateToMin);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen chosen-options-horizontal" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if isset($params.value) && $params.value}{if in_array($option_value, $params.value)} selected="selected"{/if}{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{else}
|
||||
{if isset($params.filter_key)}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} {if isset($params.class)}{$params.class}{/if}" {if !isset($params.remove_onchange) || !$params.remove_onchange}onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();"{/if} name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if (string)$option_display === (string)$params.value || (string)$option_value === (string)$params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
<input type="text" class="filter" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'html':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $has_actions || $show_filters}
|
||||
<div class="actions">
|
||||
<hr>
|
||||
{if $show_filters}
|
||||
<span class="pull-right">
|
||||
<button type="submit" id="submitFilterButton{$list_id}" name="submitFilter" class="btn btn-default" data-list-id="{$list_id}">
|
||||
<i class="icon-search"></i> {l s='Search'}
|
||||
</button>
|
||||
{if $filters_has_value}
|
||||
<button type="submit" name="submitReset{$list_id}" class="btn btn-warning">
|
||||
<i class="icon-eraser"></i> {l s='Reset'}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#selected_filter_container .selected_filters span i').on('click', function() {
|
||||
let form = $(this).closest('form');
|
||||
let type = $(this).parent().data('filter_type');
|
||||
$(this).parent().remove();
|
||||
if (type == 'date' || type == 'datetime') {
|
||||
$('#list_filters_panel').find('[name*="'+$(this).parent().data('filter_key')+'"]').val('');
|
||||
} else if (type == 'range') {
|
||||
$('#list_filters_panel').find('[name*="productFilter_'+$(this).parent().data('filter_key')+'"]').val('');
|
||||
} else if (type == 'select') {
|
||||
$('#list_filters_panel').find('select[name*="productFilter_'+$(this).parent().data('filter_key')+'"] option:selected').prop('selected', false);
|
||||
} else if (type == 'bool' && $(this).parent().data('filter_key') == 'advance_payment') {
|
||||
$('#list_filters_panel').find('select[name*="productFilter_'+$(this).parent().data('filter_key')+'"] option:selected').prop('selected', false);
|
||||
} else {
|
||||
$('#list_filters_panel').find('input[name*="productFilter_'+$(this).parent().data('filter_key')+'"]').val('');
|
||||
}
|
||||
|
||||
// set post data for empty multi-select filters
|
||||
$(form).find('select[multiple]').each(function (i, selectElement) {
|
||||
if ($(selectElement).find('option:selected').length == 0) {
|
||||
$(form).append('<input type="hidden" name="' + $(selectElement).attr('name').slice(0, -2) + '" value="">');
|
||||
}
|
||||
});
|
||||
|
||||
form.submit();
|
||||
});
|
||||
|
||||
$('#form-product').submit(function () {
|
||||
let form = $(this);
|
||||
$(form).find('select[multiple]').each(function (i, selectElement) {
|
||||
if ($(selectElement).val() == null) {
|
||||
$(form).append('<input type="hidden" name="' + $(selectElement).attr('name').slice(0, -2) + '" value="">');
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.list_action_wrapper {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.list_availibility_container {
|
||||
position: relative;}
|
||||
.list_availibility_container .dropdown-menu {
|
||||
right: 0;
|
||||
padding: 8px 12px;}
|
||||
.list_availibility_container .dropdown-menu label {
|
||||
font-weight: 400;}
|
||||
#selected_filter_container {
|
||||
background-color: #fff;
|
||||
padding: 8px 20px;
|
||||
border: solid 1px #d3d8db;
|
||||
border-radius: 5px 5px 0 0;
|
||||
font-size: 14px;
|
||||
min-height: 52px;
|
||||
margin-top: 15px;}
|
||||
#selected_filter_container .selected_filters > span {
|
||||
font-size: 12px;
|
||||
padding: 6px 10px;
|
||||
display: inline-block;
|
||||
background: #F5F8F9;
|
||||
border: 1px solid #A0D0EB;
|
||||
border-radius: 3px;}
|
||||
#selected_filter_container .selected_filters > span + span {
|
||||
margin-left: 12px;}
|
||||
#selected_filter_container .selected_filters > span .filter_value {
|
||||
font-weight: 700;
|
||||
}
|
||||
#selected_filter_container .selected_filters > span i {
|
||||
cursor: pointer;}
|
||||
|
||||
#content.bootstrap #list_filters_panel{
|
||||
margin-top: 15px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#content.bootstrap #selected_filter_container + #list_filters_panel {
|
||||
margin-top: 0;
|
||||
}
|
||||
#content.bootstrap #selected_filter_container + div.panel {
|
||||
border-top: transparent;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
.list_filters {
|
||||
padding: 0 30px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 8px 40px;}
|
||||
.list_filters > .row {
|
||||
display: flex;
|
||||
align-items: center;}
|
||||
.list_filters .date_range, .list_filters .input_range {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 15px;}
|
||||
.list_filters .date_range .input-group:first-child {
|
||||
margin-bottom: 0;}
|
||||
.list_filters label {
|
||||
text-align: right;
|
||||
font-weight: 400;}
|
||||
.list_filters .actions {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 4;}
|
||||
@media (max-width: 992px) {
|
||||
.list_filters {
|
||||
grid-template-columns: repeat(2, 1fr);}
|
||||
.list_filters .actions {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 3;}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.list_filters {
|
||||
grid-template-columns: repeat(1, 1fr);}
|
||||
.list_filters .actions {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 2;}
|
||||
.list_filters label {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
{/if}
|
||||
{/block}
|
||||
{/block}
|
||||
@@ -24,7 +24,7 @@
|
||||
*}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-12">
|
||||
<input id="{$id|escape:'html':'UTF-8'}" type="file" name="{$name|escape:'html':'UTF-8'}[]"{if isset($url)} data-url="{$url}"{/if}{if isset($multiple) && $multiple} multiple="multiple"{/if} style="width:0px;height:0px;" />
|
||||
<input id="{$id|escape:'html':'UTF-8'}" type="file" accept="image/gif, image/jpg, image/jpeg, image/png" name="{$name|escape:'html':'UTF-8'}[]"{if isset($url)} data-url="{$url}"{/if}{if isset($multiple) && $multiple} multiple="multiple"{/if} style="width:0px;height:0px;" />
|
||||
<button class="btn btn-default" data-style="expand-right" data-size="s" type="button" id="{$id|escape:'html':'UTF-8'}-add-button">
|
||||
<i class="icon-folder-open"></i> {if isset($multiple) && $multiple}{l s='Add files...'}{else}{l s='Add file...'}{/if}
|
||||
</button>
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
{l s='Select Hotel'}
|
||||
</label>
|
||||
<div class="col-sm-5">
|
||||
<select name="id_hotel" id="hotel_place" class="form-control">
|
||||
<select name="id_hotel" id="hotel_place" class="form-control chosen">
|
||||
{foreach from=$htl_info item=htl_dtl}
|
||||
<option value="{$htl_dtl['id']}" >{$htl_dtl['hotel_name']}</option>
|
||||
{/foreach}
|
||||
@@ -273,6 +273,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="show_at_front_container">
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Enable if you want this room type to be shown and to be available for booking from front office.'}">
|
||||
{l s='Show at front office'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-3">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="show_at_front" id="show_at_front_on" value="1" {if $product->show_at_front || !$product->isAssociatedToShop()}checked="checked"{/if}/>
|
||||
<label for="show_at_front_on" class="radioCheck">
|
||||
{l s='Yes'}
|
||||
</label>
|
||||
<input type="radio" name="show_at_front" id="show_at_front_off" value="0" {if !$product->show_at_front && $product->isAssociatedToShop()}checked="checked"{/if}/>
|
||||
<label for="show_at_front_off" class="radioCheck">
|
||||
{l s='No'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="product_options" class="form-group hidden">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
@@ -422,6 +443,27 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($product->id) && $product->id}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" id="category_position" for="category_position">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Set position of the room type when hotel search results are displayed.'}">
|
||||
{l s='Position'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" id="category_position" class="form-control fixed-width-lg" name="category_position" value="{$category_position}" />
|
||||
<p class="help-block">{l s='Please note that position numbering starts from 0. A position of 0 means room type will be displayed at the topmost.'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($product->id) && $product->id}
|
||||
<div class="alert alert-info">
|
||||
{l s='You can change positions of room types of this hotel from '}
|
||||
<a href="{$link->getAdminLink('AdminProducts')}&id_category={$htl_full_info['id_category']}">{l s='here.'}</a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* <div class="form-group">
|
||||
<label class="control-label col-lg-3" for="tags_{$id_lang}">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
|
||||
@@ -494,7 +494,7 @@ $(document).ready(function () {
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
{if !$multi_shop}
|
||||
<input type="hidden" name="sp_id_shop" value="0" />
|
||||
<input type="hidden" name="sp_id_shop" value="1" />
|
||||
{else}
|
||||
<div class="col-lg-3">
|
||||
<select name="sp_id_shop" id="sp_id_shop">
|
||||
|
||||
@@ -3,77 +3,134 @@
|
||||
<input type="hidden" name="submitted_tabs[]" value="ServiceProduct" />
|
||||
<h3 class="tab"> <i class="icon-AdminAdmin"></i> {l s='Service Products'}</h3>
|
||||
|
||||
{if isset($service_products) && $service_products}
|
||||
{if (isset($associated_service_products) && $associated_service_products) || (isset($unassociated_service_products) && $unassociated_service_products)}
|
||||
<div class="from-group table-responsive-row clearfix">
|
||||
<table class="table tableDnD hotel-roomtype-link-table">
|
||||
<table class="table hotel-roomtype-link-table">
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
<th class="text-center">
|
||||
<input type="checkbox" class="bulk-service-products-status">
|
||||
</th>
|
||||
<th class="col-sm-1">
|
||||
<span>{l s='Id Product'}</span>
|
||||
<span>{l s='ID'}</span>
|
||||
</th>
|
||||
<th class="col-sm-3">
|
||||
<span>{l s='name'}</span>
|
||||
<th class="col-sm-2">
|
||||
<span>{l s='Name'}</span>
|
||||
</th>
|
||||
<th class="">
|
||||
<span>{l s='Auto add to cart'}</span>
|
||||
<th class="text-center">
|
||||
<span>{l s='Auto Add to Cart'}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{l s='Position'}</span>
|
||||
</th>
|
||||
<th class="">
|
||||
<th>
|
||||
<span>{l s='Price'}</span>
|
||||
</th>
|
||||
<th class="">
|
||||
<th>
|
||||
<span>{l s='Tax'}</span>
|
||||
</th>
|
||||
<th class="text-right">
|
||||
<span>{l s='Action'}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$service_products key=key item=service_product}
|
||||
<tr id='room_type_service_product_{$service_product.id_room_type_service_product|escape:'html':'UTF-8'}' position='{$service_product.position|escape:'html':'UTF-8'}' id_product='{$service_product.id_product|escape:'html':'UTF-8'}' id_element="{$product->id}" data-roomtype_url="{$link->getAdminLink('AdminProducts', true)|addslashes}">
|
||||
<td class="col-sm-1">{$service_product.id_product|escape:'html':'UTF-8'} <a target="blank" href="{$link->getAdminLink('AdminNormalProducts')|escape:'html':'UTF-8'}&id_product={$service_product.id_product|escape:'html':'UTF-8'}&updateproduct"><i class="icon-external-link-sign"></i></a></td>
|
||||
{foreach from=$associated_service_products item=service_product}
|
||||
<tr id='room_type_service_product_{$service_product.id_product|escape:'html':'UTF-8'}' position="{$service_product.association_info.position|escape:'html':'UTF-8'}" id_product='{$service_product.id_product|escape:'html':'UTF-8'}' id_element="{$product->id}" data-roomtype_url="{$link->getAdminLink('AdminProducts', true)|addslashes}">
|
||||
{assign var=inputs_prefix value="service_product_`$service_product.id_product`_"}
|
||||
<input type="hidden" name="available_service_products[]" value="{$service_product.id_product}">
|
||||
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="{$inputs_prefix}associated" class="is-associated" checked>
|
||||
</td>
|
||||
<td class="col-sm-1">
|
||||
{$service_product.id_product|escape:'html':'UTF-8'}
|
||||
<a target="blank" href="{$link->getAdminLink('AdminNormalProducts')|escape:'html':'UTF-8'}&id_product={$service_product.id_product|escape:'html':'UTF-8'}&updateproduct">
|
||||
<i class="icon-external-link-sign"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{$service_product.name}</td>
|
||||
<td><span {if $service_product.auto_add_to_cart}class="badge badge-success"{/if}>{if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if}</span></td>
|
||||
<td class="text-center">
|
||||
<span {if $service_product.auto_add_to_cart}class="badge badge-success"{/if}>
|
||||
{if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if}
|
||||
</span>
|
||||
</td>
|
||||
<td class="pointer dragHandle center positionImage">
|
||||
<div class="dragGroup">
|
||||
<div class="positions">
|
||||
{$service_product.position + 1}
|
||||
{$service_product.association_info.position + 1}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="field-view service-product-price-text">{if isset($service_product.custom_price) && $service_product.custom_price}{displayPrice price=$service_product.custom_price currency=$currency->id}{else}{displayPrice price=$service_product.default_price currency=$currency->id}{/if}</span>
|
||||
<div class="field-edit" style="display:none">
|
||||
<div class="fixed-width-xl">
|
||||
<div class="input-group">
|
||||
<input type="text" value="{if isset($service_product.custom_price) && $service_product.custom_price}{$service_product.custom_price|escape:'html':'UTF-8'}{else}{$service_product.default_price|escape:'html':'UTF-8'}{/if}" class="service-product-price" data-id_product="{$service_product.id_product|escape:'html':'UTF-8'}">
|
||||
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
|
||||
{assign var=price_value value=0}
|
||||
{if isset($smarty.post["{$inputs_prefix}price"])}
|
||||
{assign var=price_value value=$smarty.post["{$inputs_prefix}price"]}
|
||||
{else}
|
||||
{if isset($service_product.association_info.custom_price)}
|
||||
{assign var=price_value value=$service_product.association_info.custom_price}
|
||||
{elseif isset($service_product.association_info.default_price)}
|
||||
{assign var=price_value value=$service_product.association_info.default_price}
|
||||
{/if}
|
||||
{/if}
|
||||
<input type="text" name="{$inputs_prefix}price" value="{$price_value}" data-id_product="{$service_product.id_product}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="help-block">{l s='Default price: %s' sprintf={displayPrice price=$service_product.default_price currency=$currency->id}}
|
||||
<div class="help-block">
|
||||
{l s='Default price: %s' sprintf={displayPrice price=$service_product.association_info.default_price currency=$currency->id}}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="field-view service_product_tax_text">{if isset($service_product.tax_rules_group_name) && $service_product.tax_rules_group_name}{$service_product.tax_rules_group_name}{else}{$service_product.default_tax_rules_group_name}{/if}</span>
|
||||
<div class="field-edit" style="display:none">
|
||||
<select class="service_product_id_tax_rules_group">
|
||||
<div class="fixed-width-xl">
|
||||
<select class="service_product_id_tax_rules_group" name="{$inputs_prefix}id_tax_rules_group">
|
||||
<option value="0">{l s='No Tax'}</option>
|
||||
{foreach from=$tax_rules_groups item=tax_rules_group}
|
||||
<option value="{$tax_rules_group.id_tax_rules_group}" {if $service_product.id_tax_rules_group == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
|
||||
<option value="{$tax_rules_group.id_tax_rules_group}" {if $service_product.association_info.id_tax_rules_group == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
|
||||
{$tax_rules_group['name']|htmlentitiesUTF8}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="help-block">{l s='Default tax rule: %s' sprintf=$service_product.default_tax_rules_group_name}
|
||||
<div class="help-block">{l s='Default tax rule: %s' sprintf=$service_product.association_info.default_tax_rules_group_name}</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a href="#" class="btn btn-default button-edit-price field-view"><i class="icon-pencil"></i></a>
|
||||
<span class="field-edit" style="display:none">
|
||||
<a href="#" class="btn btn-default btn-save" data-roomtype_url="{$link->getAdminLink('AdminProducts', true)|addslashes}" data-id_product="{$service_product.id_product|escape:'html':'UTF-8'}"><i class="icon-save"></i> {l s='save'}</a>
|
||||
<a href="#" class="btn btn-default btn-cancel"><i class="icon-times"></i></a>
|
||||
</span>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{foreach from=$unassociated_service_products item=service_product}
|
||||
<tr class="nodrop nodrag">
|
||||
{assign var=inputs_prefix value="service_product_`$service_product.id_product`_"}
|
||||
<input type="hidden" name="available_service_products[]" value="{$service_product.id_product}">
|
||||
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="{$inputs_prefix}associated" class="is-associated" {if isset($smarty.post["{$inputs_prefix}associated"]) && in_array($smarty.post["{$inputs_prefix}associated"], array('on', 'true', '1'))}checked{/if}>
|
||||
</td>
|
||||
<td class="col-sm-1">{$service_product.id_product|escape:'html':'UTF-8'} <a target="blank" href="{$link->getAdminLink('AdminNormalProducts')|escape:'html':'UTF-8'}&id_product={$service_product.id_product|escape:'html':'UTF-8'}&updateproduct"><i class="icon-external-link-sign"></i></a></td>
|
||||
<td>{$service_product.name}</td>
|
||||
<td class="text-center"><span {if $service_product.auto_add_to_cart}class="badge badge-success"{/if}>{if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if}</span></td>
|
||||
<td>{l s='--'}</td>
|
||||
<td>
|
||||
<div class="fixed-width-xl">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
|
||||
<input type="text" name="{$inputs_prefix}price" data-id_product="{$service_product.id_product|escape:'html':'UTF-8'}" value="{if isset($smarty.post["{$inputs_prefix}price"]) && $smarty.post["{$inputs_prefix}price"]}{$smarty.post["{$inputs_prefix}price"]}{else}{$service_product.price}{/if}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="help-block">
|
||||
{l s='Default price: %s' sprintf={displayPrice price=$service_product.price currency=$currency->id}}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="fixed-width-xl">
|
||||
<select class="service_product_id_tax_rules_group" name="{$inputs_prefix}id_tax_rules_group">
|
||||
<option value="0">{l s='No Tax'}</option>
|
||||
{foreach from=$tax_rules_groups item=tax_rules_group}
|
||||
<option value="{$tax_rules_group.id_tax_rules_group}" {if isset($smarty.post["{$inputs_prefix}id_tax_rules_group"])}{if $tax_rules_group.id_tax_rules_group == $smarty.post["{$inputs_prefix}id_tax_rules_group"]}{/if}{elseif $tax_rules_group.id_tax_rules_group == $service_product.id_tax_rules_group}selected{/if}>
|
||||
{$tax_rules_group['name']|htmlentitiesUTF8}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="help-block">{l s='Default tax rule: %s' sprintf=$service_product.tax_rules_group_name}</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
@@ -108,43 +108,160 @@ $(function() {
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_hotels) && $num_hotels}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_hotels == 1}
|
||||
{l s='1 Hotel'}
|
||||
{else}
|
||||
{l s='%d Hotels' sprintf=$num_hotels}
|
||||
{/if}
|
||||
</h3>
|
||||
{$hotels}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_hotel_features) && $num_hotel_features}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_hotel_features == 1}
|
||||
{l s='1 hotel feature'}
|
||||
{else}
|
||||
{l s='%d hotel features' sprintf=$num_hotel_features}
|
||||
{/if}
|
||||
</h3>
|
||||
{$hotel_features}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_products) && $num_products}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_products == 1}
|
||||
{l s='1 product'}
|
||||
{else}
|
||||
{l s='%d products' sprintf=$num_products}
|
||||
{/if}
|
||||
</h3>
|
||||
{$products}
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_products == 1}
|
||||
{l s='1 room type'}
|
||||
{else}
|
||||
{l s='%d room types' sprintf=$num_products}
|
||||
{/if}
|
||||
</h3>
|
||||
{$products}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_catalog_features) && $num_catalog_features}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_catalog_features == 1}
|
||||
{l s='1 feature'}
|
||||
{else}
|
||||
{l s='%d features' sprintf=$num_catalog_features}
|
||||
{/if}
|
||||
</h3>
|
||||
{$catalog_features}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_service_products) && $num_service_products}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_service_products == 1}
|
||||
{l s='1 service product'}
|
||||
{else}
|
||||
{l s='%d service products' sprintf=$num_service_products}
|
||||
{/if}
|
||||
</h3>
|
||||
{$service_products}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_global_demands) && $num_global_demands}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_global_demands == 1}
|
||||
{l s='1 global demand'}
|
||||
{else}
|
||||
{l s='%d global demands' sprintf=$num_global_demands}
|
||||
{/if}
|
||||
</h3>
|
||||
{$global_demands}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_refund_rules) && $num_refund_rules}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_refund_rules == 1}
|
||||
{l s='1 refund rule'}
|
||||
{else}
|
||||
{l s='%d refund rules' sprintf=$num_refund_rules}
|
||||
{/if}
|
||||
</h3>
|
||||
{$refund_rules}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_customers) && $num_customers}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_customers == 1}
|
||||
{l s='1 customer'}
|
||||
{else}
|
||||
{l s='%d customers' sprintf=$num_customers}
|
||||
{/if}
|
||||
</h3>
|
||||
{$customers}
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_customers == 1}
|
||||
{l s='1 customer'}
|
||||
{else}
|
||||
{l s='%d customers' sprintf=$num_customers}
|
||||
{/if}
|
||||
</h3>
|
||||
{$customers}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_groups) && $num_groups}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_groups == 1}
|
||||
{l s='1 group'}
|
||||
{else}
|
||||
{l s='%d groups' sprintf=$num_groups}
|
||||
{/if}
|
||||
</h3>
|
||||
{$groups}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_customer_address) && $num_customer_address}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_customer_address == 1}
|
||||
{l s='1 customer address'}
|
||||
{else}
|
||||
{l s='%d customer addresses' sprintf=$num_customer_address}
|
||||
{/if}
|
||||
</h3>
|
||||
{$customer_address}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_order_messages) && $num_order_messages}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_order_messages == 1}
|
||||
{l s='1 customer service message'}
|
||||
{else}
|
||||
{l s='%d customer service messages' sprintf=$num_order_messages}
|
||||
{/if}
|
||||
</h3>
|
||||
{$order_messages}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($num_orders) && $num_orders}
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_orders == 1}
|
||||
{l s='1 order'}
|
||||
{else}
|
||||
{l s='%d orders' sprintf=$num_orders}
|
||||
{/if}
|
||||
</h3>
|
||||
{$orders}
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3>
|
||||
{if $num_orders == 1}
|
||||
{l s='1 order'}
|
||||
{else}
|
||||
{l s='%d orders' sprintf=$num_orders}
|
||||
{/if}
|
||||
</h3>
|
||||
{$orders}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($addons) && $addons}
|
||||
|
||||
@@ -31,13 +31,17 @@
|
||||
<tr>
|
||||
<th class="fixed-width-xs">
|
||||
<span class="title_box">
|
||||
<input type="checkbox" name="checkme" id="checkme" onclick="checkDelBoxes(this.form, 'groupBox[]', this.checked)" />
|
||||
<input type="checkbox" name="checkme" id="checkme" onclick="checkDelBoxes(this.form, '{$input['name']}[]', this.checked)" />
|
||||
</span>
|
||||
</th>
|
||||
<th class="fixed-width-xs">
|
||||
<span class="title_box">
|
||||
{if isset($input['groups_id_title']) && $input['groups_id_title']}{$input['groups_id_title']}{else}{l s='ID'}{/if}
|
||||
</span>
|
||||
</th>
|
||||
<th class="fixed-width-xs"><span class="title_box">{l s='ID'}</span></th>
|
||||
<th>
|
||||
<span class="title_box">
|
||||
{l s='Group name'}
|
||||
{if isset($input['groups_title']) && $input['groups_title']}{$input['groups_title']}{else}{l s='Group name'}{/if}
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
@@ -46,8 +50,8 @@
|
||||
{foreach $groups as $key => $group}
|
||||
<tr>
|
||||
<td>
|
||||
{assign var=id_checkbox value=groupBox|cat:'_'|cat:$group['id_group']}
|
||||
<input type="checkbox" name="groupBox[]" class="groupBox" id="{$id_checkbox}" value="{$group['id_group']}" {if $fields_value[$id_checkbox]}checked="checked"{/if} />
|
||||
{assign var=id_checkbox value=$input['name']|cat:'_'|cat:$group['id_group']}
|
||||
<input type="checkbox" name="{$input['name']}[]" class="groupBox" id="{$id_checkbox}" value="{$group['id_group']}" {if $fields_value[$id_checkbox]}checked="checked"{/if} />
|
||||
</td>
|
||||
<td>{$group['id_group']}</td>
|
||||
<td>
|
||||
|
||||
@@ -422,21 +422,13 @@
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
beforeShow: function() {
|
||||
let dateTo = $('#local_{$params.id_date}_1').val().trim();
|
||||
if (typeof dateTo != 'undefined' && dateTo != '') {
|
||||
let objDateToMax = $.datepicker.parseDate('yy-mm-dd', dateTo);
|
||||
objDateToMax.setDate(objDateToMax.getDate() - 1);
|
||||
$('#local_{$params.id_date}_0').datepicker('option', 'maxDate', objDateToMax);
|
||||
}
|
||||
},
|
||||
onClose: function() {
|
||||
let dateFrom = $('#local_{$params.id_date}_0').val().trim();
|
||||
let dateTo = $('#local_{$params.id_date}_1').val().trim();
|
||||
|
||||
if (dateFrom >= dateTo) {
|
||||
if ((dateFrom && dateTo) && (dateFrom >= dateTo)) {
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
objDateToMin.setDate(objDateToMin.getDate());
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', 'minDate', objDateToMin);
|
||||
}
|
||||
@@ -452,7 +444,7 @@
|
||||
|
||||
if (typeof dateFrom != 'undefined' && dateFrom != '') {
|
||||
let objDateToMin = $.datepicker.parseDate('yy-mm-dd', dateFrom);
|
||||
objDateToMin.setDate(objDateToMin.getDate() + 1);
|
||||
objDateToMin.setDate(objDateToMin.getDate());
|
||||
|
||||
$('#local_{$params.id_date}_1').datepicker('option', 'minDate', objDateToMin);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<li>
|
||||
<a id="page-header-desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass|escape}{else}{$k}{/if}" class="toolbar_btn {if isset($btn.target) && $btn.target} _blank{/if} pointer"{if isset($btn.href)} href="{$btn.href|escape}"{/if} title="{if isset($btn.help)}{$btn.help}{else}{$btn.desc|escape}{/if}"{if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}{if isset($btn.modal_target) && $btn.modal_target} data-target="{$btn.modal_target}" data-toggle="modal"{/if}{if isset($btn.help)} data-toggle="tooltip" data-placement="bottom"{/if}>
|
||||
<i class="{if isset($btn.icon)}{$btn.icon|escape}{else}process-icon-{if isset($btn.imgclass)}{$btn.imgclass|escape}{else}{$k}{/if}{/if}{if isset($btn.class)} {$btn.class|escape}{/if}"></i>
|
||||
<div{if isset($btn.force_desc) && $btn.force_desc == true } class="locked"{/if}>{$btn.desc|escape}</div>
|
||||
<span{if isset($btn.force_desc) && $btn.force_desc == true } class="locked"{/if}>{$btn.desc|escape}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
@@ -92,7 +92,7 @@
|
||||
<li>
|
||||
<a id="page-header-desc-{$table}-{if isset($toolbar_btn['modules-list'].imgclass)}{$toolbar_btn['modules-list'].imgclass}{else}modules-list{/if}" class="toolbar_btn{if isset($toolbar_btn['modules-list'].class)} {$toolbar_btn['modules-list'].class}{/if}{if isset($toolbar_btn['modules-list'].target) && $toolbar_btn['modules-list'].target} _blank{/if}" {if isset($toolbar_btn['modules-list'].href)}href="{$toolbar_btn['modules-list'].href}"{/if} title="{$toolbar_btn['modules-list'].desc}"{if isset($toolbar_btn['modules-list'].js) && $toolbar_btn['modules-list'].js} onclick="{$toolbar_btn['modules-list'].js}"{/if}>
|
||||
<i class="{if isset($toolbar_btn['modules-list'].icon)}{$toolbar_btn['modules-list'].icon}{else}process-icon-{if isset($toolbar_btn['modules-list'].imgclass)}{$toolbar_btn['modules-list'].imgclass}{else}modules-list{/if}{/if}"></i>
|
||||
<div{if isset($toolbar_btn['modules-list'].force_desc) && $toolbar_btn['modules-list'].force_desc == true } class="locked"{/if}>{$toolbar_btn['modules-list'].desc}</div>
|
||||
<span{if isset($toolbar_btn['modules-list'].force_desc) && $toolbar_btn['modules-list'].force_desc == true } class="locked"{/if}>{$toolbar_btn['modules-list'].desc}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
@@ -115,9 +115,15 @@
|
||||
|
||||
});
|
||||
{/if}
|
||||
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
|
||||
$('#modules_list_container').modal('show');
|
||||
openModulesList();
|
||||
$('.process-icon-modules-list').parent('a').unbind().bind('click', async function (){
|
||||
let loggedIn = await checkIfEmployeeIsLoggedIn();
|
||||
|
||||
if (loggedIn) {
|
||||
$('#modules_list_container').modal('show');
|
||||
openModulesList();
|
||||
} else {
|
||||
window.location = window.location.pathname;
|
||||
}
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -39,36 +39,41 @@
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li class="search-book search-option">
|
||||
<a href="#" data-value="1" data-placeholder="{l s='Product name, SKU, reference...'}" data-icon="icon-book">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_CATELOG}" data-placeholder="{l s='Room Types, Service products...'}" data-icon="icon-book">
|
||||
<i class="icon-book"></i> {l s='Catalog'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="search-modules search-option">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_HOTEL}" data-placeholder="{l s='Hotel'}" data-icon="icon-AdminHotelReservationSystemManagement">
|
||||
<i class="icon-building"></i> {l s='Hotel'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="search-customers-name search-option">
|
||||
<a href="#" data-value="2" data-placeholder="{l s='Email, name...'}" data-icon="icon-group">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_CUSTOMER_BY_NAME}" data-placeholder="{l s='Email, name...'}" data-icon="icon-group">
|
||||
<i class="icon-group"></i> {l s='Customers'} {l s='by name'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="search-customers-addresses search-option">
|
||||
<a href="#" data-value="6" data-placeholder="{l s='123.45.67.89'}" data-icon="icon-desktop">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_CUSTOMER_BY_IP}" data-placeholder="{l s='123.45.67.89'}" data-icon="icon-desktop">
|
||||
<i class="icon-desktop"></i> {l s='Customers'} {l s='by ip address'}</a>
|
||||
</li>
|
||||
<li class="search-orders search-option">
|
||||
<a href="#" data-value="3" data-placeholder="{l s='Order ID'}" data-icon="icon-credit-card">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_ORDER}" data-placeholder="{l s='Order ID'}" data-icon="icon-credit-card">
|
||||
<i class="icon-credit-card"></i> {l s='Orders'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="search-invoices search-option">
|
||||
<a href="#" data-value="4" data-placeholder="{l s='Invoice Number'}" data-icon="icon-book">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_INVOICE}" data-placeholder="{l s='Invoice Number'}" data-icon="icon-book">
|
||||
<i class="icon-book"></i> {l s='Invoices'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="search-carts search-option">
|
||||
<a href="#" data-value="5" data-placeholder="{l s='Cart ID'}" data-icon="icon-shopping-cart">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_CART}" data-placeholder="{l s='Cart ID'}" data-icon="icon-shopping-cart">
|
||||
<i class="icon-shopping-cart"></i> {l s='Carts'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="search-modules search-option">
|
||||
<a href="#" data-value="7" data-placeholder="{l s='Module name'}" data-icon="icon-puzzle-piece">
|
||||
<a href="#" data-value="{$QLO_SEARCH_TYPE_MODULE}" data-placeholder="{l s='Module name'}" data-icon="icon-puzzle-piece">
|
||||
<i class="icon-puzzle-piece"></i> {l s='Modules'}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user