Merge branch 'Qloapps:develop' into gli-3097

This commit is contained in:
Shazar Rahman
2026-09-11 16:24:11 +05:30
committed by GitHub
290 changed files with 16318 additions and 7629 deletions

View File

@@ -127,4 +127,4 @@ if (Tools::isSubmit('getZones')) {
if (Tools::isSubmit('getEmailHTML') && $email = Tools::getValue('email')) {
$email_html = AdminTranslationsController::getEmailHTML($email);
die($email_html);
}
}

View File

@@ -125,7 +125,7 @@ var // currently active contextMenu trigger
offset = {top: y, left: x};
}
// correct offset if viewport demands it
// correct offset if viewport it
var bottom = $win.scrollTop() + $win.height(),
right = $win.scrollLeft() + $win.width(),
height = opt.$menu.height(),

View File

@@ -107,92 +107,42 @@
</td>
<td>{displayWtPriceWithCurrency price=$room['feature_price_tax_excl'] currency=$currency}</td>
<td>
{if (isset($room['selected_demands']) && $room['selected_demands']) || (isset($room['selected_services']) && $room['selected_services'])}
<a href="#" data-toggle="modal" data-target="#rooms_type_extra_demands_{$room['id']}">
{displayWtPriceWithCurrency price=($room['demand_price'] + $room['additional_service_price'] + $room['additional_services_auto_add_price'])|escape:'html':'UTF-8' currency=$currency}
{if isset($room['selected_services']) && $room['selected_services']}
<a href="#" data-toggle="modal" data-target="#rooms_type_extra_services_{$room['id']}">
{displayWtPriceWithCurrency price=($room['additional_service_price'] + $room['additional_services_auto_add_price'])|escape:'html':'UTF-8' currency=$currency}
</a>
{else}
{displayWtPriceWithCurrency price=0 currency=$currency}
{/if}
</td>
<td class="text-right">
{if (isset($room['selected_demands']) && $room['selected_demands']) || (isset($room['selected_services']) && $room['selected_services'])}
{displayWtPriceWithCurrency price=($room['amt_with_qty'] + $room['additional_services_auto_add_price'] + $room['demand_price'] + $room['additional_service_price'])|escape:'html':'UTF-8' currency=$currency}
{if isset($room['selected_services']) && $room['selected_services']}
{displayWtPriceWithCurrency price=($room['amt_with_qty'] + $room['additional_services_auto_add_price'] + $room['additional_service_price'])|escape:'html':'UTF-8' currency=$currency}
{else}
{displayWtPriceWithCurrency price=$room['amt_with_qty']|escape:'html':'UTF-8' currency=$currency}
{/if}
</td>
</tr>
<div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_demands_{$room['id']}">
<div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_services_{$room['id']}">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body" id="rooms_extra_demands">
<div class="modal-body" id="rooms_extra_services">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<ul class="nav nav-tabs" role="tablist">
{if isset($room['selected_demands']) && $room['selected_demands']}
<li role="presentation" class="active"><a href="#room_type_demands_desc_{$room['id']}" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
{/if}
{if isset($room['selected_services']) && $room['selected_services']}
<li role="presentation" {if !isset($room['selected_demands']) || !$room['selected_demands']}class="active"{/if}><a href="#room_type_service_product_desc_{$room['id']}" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
{/if}
<li role="presentation" class="active" ><a href="#room_type_service_product_desc_{$room['id']}" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
</ul>
<div class="tab-content panel">
{if isset($room['selected_demands']) && $room['selected_demands']}
<div id="room_type_demands_desc_{$room['id']}" class="tab-pane active">
<div id="room_type_demands_desc">
{if isset($room['selected_demands']) && $room['selected_demands']}
{assign var=roomCount value=1}
{foreach $room['selected_demands'] as $demand}
<div class="row room_demands_container">
<div class="col-sm-12 room_demand_detail">
{if isset($room['selected_demands']) && $room['selected_demands']}
{foreach $room['extra_demands'] as $idGlobalDemand => $roomDemand}
{if $demand.id_global_demand == $idGlobalDemand}
<div class="row room_demand_block">
<div class="col-xs-6">
<div class="row">
<div class="col-xs-10 demand_adv_option_block">
<p>
{$roomDemand['name']|escape:'html':'UTF-8'}<br>
{if isset($roomDemand['adv_option']) && $roomDemand['adv_option']}
{$roomDemand['adv_option'][$demand['id_option']]['name']}
{/if}
</p>
</div>
</div>
</div>
<div class="col-xs-6">
<p><span class="pull-right extra_demand_option_price">
{if isset($roomDemand['adv_option']) && $roomDemand['adv_option']}
{convertPrice price = $roomDemand['adv_option'][$demand['id_option']]['price_tax_excl']|escape:'html':'UTF-8'}
{else}
{convertPrice price = $roomDemand['price_tax_excl']|escape:'html':'UTF-8'}
{/if}
</span></p>
</div>
</div>
{/if}
{/foreach}
{/if}
</div>
</div>
{assign var=roomCount value=$roomCount+1}
{/foreach}
{/if}
</div>
</div>
{/if}
{if isset($room['selected_services']) && $room['selected_services']}
<div id="room_type_service_product_desc_{$room['id']}" class="tab-pane{if !isset($room['selected_demands']) || !$room['selected_demands']} active{/if}">
<div id="room_type_service_product_desc_{$room['id']}" class="tab-pane active">
<div id="room_type_services_desc">
{assign var=roomCount value=1}
<div class="row room_demands_container">
<div class="col-sm-12 room_demand_detail">
<div class="row room_service_container">
<div class="col-sm-12 room_service_detail">
{if isset($room['selected_services']) && $room['selected_services']}
{foreach $room['selected_services'] as $service}
<div class="row room_demand_block">
<div class="row room_service_block">
<div class="col-xs-5">
<div class="row">
<div class="col-xs-10">

View File

@@ -72,6 +72,12 @@
</p>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Nationality'}</label>
<div class="col-lg-9">
<p class="form-control-static">{if $nationality}{$nationality}{else}--{/if}</p>
</div>
</div>
<div class="row">
<label class="control-label col-lg-3">{l s='Registration Date'}</label>
<div class="col-lg-9">

View File

@@ -187,6 +187,7 @@ $(document).ready(function () {
</div>
</div>
{/if}
{* Code For eco-tax working
<div class="form-group" {if !$ps_use_ecotax} style="display:none;"{/if}>
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="ecotax" type="default"}</span></div>
<label class="control-label col-lg-2" for="ecotax">
@@ -197,6 +198,9 @@ $(document).ready(function () {
<input maxlength="27" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:$priceDisplayPrecisionFormat}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />
</div>
</div>
*}
{include file="controllers/products/_tourism_tax_rule_field.tpl"}
{* <div class="form-group {if $product->auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}hide_on_auto_add_Withroom{/if}" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} {if $product->auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}style="display:none"{/if}>
<label class="control-label col-lg-3" for="priceTI">{l s='Retail price with tax'}</label>
<div class="input-group col-lg-2">

View File

@@ -100,6 +100,8 @@
});
}
{/if}
changeStandardProductAddressType();
});
</script>
{/if}
@@ -110,6 +112,5 @@
<script type="text/javascript">
changeCMSActivationAuthorization();
changeOverbookingOrderAction();
changeStandardProductAddressType();
</script>
{/block}

View File

@@ -1,113 +0,0 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a 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
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_demands">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon-remove-sign"></i></button>
<h4 class="modal-title"><i class="icon icon-bed"></i> &nbsp;{l s='Room Services'}</h4>
</div>
<div class="modal-body" id="rooms_extra_demands">
<ul class="nav nav-tabs" role="tablist">
{if isset($selectedRoomDemands) && $selectedRoomDemands}
<li role="presentation" class="active"><a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
{/if}
<li role="presentation" {if !isset($selectedRoomDemands) || !$selectedRoomDemands}class="active"{/if}><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
</ul>
<div class="tab-content">
{if isset($selectedRoomDemands) && $selectedRoomDemands}
<div id="room_type_demands_desc" class="tab-pane active">
<div id="room_type_demands_desc">
{if isset($selectedRoomDemands) && $selectedRoomDemands}
{assign var=roomCount value=1}
{foreach $selectedRoomDemands as $key => $roomDemand}
<div class="row room_demands_container">
<div class="col-sm-12 room_demand_detail">
{if isset($roomTypeDemands) && $roomTypeDemands}
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>{l s='Name'}</th>
<th>{l s='Options'}</th>
<th>{l s='Unit Price (tax excl.)'}</th>
</tr>
</thead>
<tbody>
{foreach $roomTypeDemands as $idGlobalDemand => $demand}
<tr class="room_demand_block">
<td>
<input id_cart_booking="{$roomDemand['id']}" value="{$idGlobalDemand|escape:'html':'UTF-8'}" type="checkbox" class="id_room_type_demand" {if isset($roomDemand['selected_global_demands']) && $roomDemand['selected_global_demands'] && ($idGlobalDemand|in_array:$roomDemand['selected_global_demands'])}checked{/if} />
</td>
<td class="demand_adv_option_block">
<p>{$demand['name']|escape:'html':'UTF-8'}</p>
</td>
<td class="demand_adv_option_block">
{if isset($demand['adv_option']) && $demand['adv_option']}
<select class="id_option">
{foreach $demand['adv_option'] as $idOption => $option}
{assign var=demand_key value="`$idGlobalDemand`-`$idOption`"}
<option optionPrice="{$option['price_tax_excl']|escape:'html':'UTF-8'}" value="{$idOption|escape:'html':'UTF-8'}" {if isset($roomDemand['extra_demands'][$demand_key])}selected{/if} key="{$demand_key}">{$option['name']}</option>
{if isset($roomDemand['extra_demands'][$demand_key])}
{assign var=selected_adv_option value="$idOption"}
{/if}
{/foreach}
</select>
{else}
--
<input type="hidden" class="id_option" value="0" />
{/if}
</td>
<td>
<span class="extra_demand_option_price">
{if isset($selected_adv_option) && isset($demand['adv_option'][$selected_adv_option]['price_tax_excl'])}{convertPrice price = $demand['adv_option'][$selected_adv_option]['price_tax_excl']|escape:'html':'UTF-8'}{else if isset($demand['adv_option']) && $demand['adv_option']}{convertPrice price = $demand['adv_option'][$demand['adv_option']|@key]['price_tax_excl']}{else}{convertPrice price = $demand['price_tax_excl']|escape:'html':'UTF-8'}{/if}
</span>
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
{l s='/ night'}
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
</div>
</div>
{assign var=roomCount value=$roomCount+1}
{/foreach}
{/if}
</div>
</div>
{/if}
{include file='controllers/orders/modals/_add_order_extra_services_tab_content.tpl'}
</div>
{if isset($loaderImg) && $loaderImg}
<div class="loading_overlay">
<img src='{$loaderImg}' class="loading-img"/>
</div>
{/if}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,45 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a 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
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_services">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon-remove-sign"></i></button>
<h4 class="modal-title"><i class="icon icon-bed"></i> &nbsp;{l s='Room Services'}</h4>
</div>
<div class="modal-body" id="rooms_extra_services">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
</ul>
<div class="tab-content">
{include file='controllers/orders/modals/_add_order_extra_services_tab_content.tpl'}
</div>
{if isset($loaderImg) && $loaderImg}
<div class="loading_overlay">
<img src='{$loaderImg}' class="loading-img"/>
</div>
{/if}
</div>
</div>
</div>
</div>

View File

@@ -137,13 +137,13 @@
</div>
</td>
<td>
{displayPrice price=($data.demand_price + $data.additional_service_price + $data.additional_services_auto_add_price)|escape:'html':'UTF-8'}
{displayPrice price=($data.additional_service_price + $data.additional_services_auto_add_price)|escape:'html':'UTF-8'}
</td>
{* <td class="cart_line_total_rooms_price" id="cart_detail_data_price_{$data.id|escape:'html':'UTF-8'}">
{displayPrice price=$data.amt_with_qty}</td> *}
<td class="cart_line_total_price">
{if (isset($data.extra_demands) && $data.extra_demands) || (isset($data.additional_service) && $data.additional_service) || (isset($data.selected_services) && $data.selected_services)}
{displayPrice price=($data.amt_with_qty + $data.additional_services_auto_add_price + $data.demand_price + $data.additional_service_price)|escape:'html':'UTF-8'}
{if isset($data.additional_service) && $data.additional_service}
{displayPrice price=($data.amt_with_qty + $data.additional_services_auto_add_price + $data.additional_service_price)|escape:'html':'UTF-8'}
{else}
{displayPrice price=$data.amt_with_qty|escape:'html':'UTF-8'}
{/if}
@@ -153,7 +153,7 @@
<i class="icon-trash"></i>&nbsp;{l s='Delete'}
</button>
<br />
<a href="#" id_hotel_cart_booking="{$data.id|escape:'html':'UTF-8'}" id_room="{$data.id_room|escape:'html':'UTF-8'}" date_from="{$data.date_from|escape:'html':'UTF-8'}" date_to="{$data.date_to|escape:'html':'UTF-8'}" id_product="{$data.id_product|escape:'html':'UTF-8'}" id_cart="{$data.id_cart|escape:'html':'UTF-8'}" class="open_rooms_extra_demands btn btn-success" title="{l s='Click here to add or remove the extra services of this room type.'}">
<a href="#" id_hotel_cart_booking="{$data.id|escape:'html':'UTF-8'}" id_room="{$data.id_room|escape:'html':'UTF-8'}" date_from="{$data.date_from|escape:'html':'UTF-8'}" date_to="{$data.date_to|escape:'html':'UTF-8'}" id_product="{$data.id_product|escape:'html':'UTF-8'}" id_cart="{$data.id_cart|escape:'html':'UTF-8'}" class="open_rooms_extra_services btn btn-success" title="{l s='Click here to add or remove the extra services of this room type.'}">
<i class="icon-pencil"></i>&nbsp;{l s='Services'}
</a>
</td>
@@ -168,31 +168,22 @@
</div>
{* Modal for extra demands *}
{* <div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_demands">
{* <div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_services">
</div> *}
{strip}
{addJsDefL name=txtExtraDemandSucc}{l s='Updated Successfully' js=1}{/addJsDefL}
{addJsDefL name=txtExtraDemandErr}{l s='Some error occurred while updating demands' js=1}{/addJsDefL}
{/strip}
{* Css for handling extra demands changes *}
{* Css for handling extra changes *}
<style type="text/css">
#customer_cart_details .extra-demand-list {
padding-left:15px;}
#customer_cart_details .delete_hotel_cart_data {
margin-bottom:2px !important;}
#customer_cart_details .room_type_old_price {
text-decoration: line-through;
color:#979797;
font-size:12px;}
/*Extra demands CSS*/
#rooms_extra_demands .rooms_extra_demands_head {
margin-bottom: 18px;}
#rooms_extra_demands .room_demand_block {
margin-bottom: 15px;
color: #333;}
#room_type_service_product_desc #back_to_service_btn {
display: none;}
#add_new_room_services_block {

View File

@@ -69,6 +69,23 @@
</td>
<td>
<span>{displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id}</span>
{if isset($use_tourism_tax) && $use_tourism_tax && isset($product.tourism_tax_status)}
<span class="price_info">
&nbsp;<img src="{$info_icon_path|escape:'htmlall':'UTF-8'}" />
</span>
<div class="price_info_container" style="display: none;">
<div>
<label>{l s='Service Tax:'}</label>
<span class="pull-right">{displayPrice price=$product.total_service_tax_only currency=$currency->id}</span>
</div>
{if $product.tourism_tax_total > 0}
<div>
<label>{l s='Tourism Tax:'}</label>
<span class="pull-right">{displayPrice price=$product.tourism_tax_total currency=$currency->id}</span>
</div>
{/if}
</div>
{/if}
</td>
<td>
<span>{displayPrice price=$product.total_price_tax_incl currency=$currency->id}</span>
@@ -136,6 +153,23 @@
{l s='Delete'}
</a>
</li>
{if isset($use_tourism_tax) && $use_tourism_tax && isset($product.tourism_tax_status) && $product.tourism_tax_status != $tourism_tax_status_not_applicable && !$product.is_cancelled && !$product.is_refunded}
{if $product.tourism_tax_status == $tourism_tax_status_applied}
<li>
<a href="#" class="tt-exempt-service-line" data-id_service_product_order_detail="{$product.id_service_product_order_detail|intval}" data-label="{$product.name|escape:'html':'UTF-8'}">
<i class="icon-ban"></i>
{l s='Exempt Tourism Tax'}
</a>
</li>
{else}
<li>
<a href="#" class="tt-apply-service-line" data-id_service_product_order_detail="{$product.id_service_product_order_detail|intval}">
<i class="icon-check"></i>
{l s='Apply Tourism Tax'}
</a>
</li>
{/if}
{/if}
</ul>
</div>
{/if}

View File

@@ -96,8 +96,8 @@
</td>
<td class="center">
{convertPriceWithCurrency price=($data['extra_demands_price_te'] + $data['additional_services_price_te'] + $data['convenience_fee_te'] + $data['additional_services_price_auto_add_te']) currency=$currency->id}
{if $data['extra_demands']|count || $data['additional_services']|count}
{convertPriceWithCurrency price=($data['additional_services_price_te'] + $data['convenience_fee_te'] + $data['additional_services_price_auto_add_te']) currency=$currency->id}
{if $data['additional_services']|count}
<a class="open_room_extra_services" href="#" date_from="{$data['date_from']}" date_to="{$data['date_to']}" id_product="{$data['id_product']}" id_room="{$data['id_room']}" id_order="{$order->id}" id_htl_booking="{$data['id']}">
<i class="icon icon-lg icon-info-circle"></i>
</a>
@@ -105,6 +105,21 @@
</td>
<td class="center">
{convertPriceWithCurrency price=($data['total_room_tax']) currency=$currency->id}
<span class="price_info">
&nbsp;<img src="{$info_icon_path|escape:'htmlall':'UTF-8'}" />
</span>
<div class="price_info_container" style="display: none;">
<div>
<label>{l s='Room & Service Tax:'}</label>
<span class="pull-right">{convertPriceWithCurrency price=$data.total_room_service_tax_only currency=$currency->id}</span>
</div>
{if isset($data.tourism_tax_total) && $data.tourism_tax_total > 0}
<div>
<label>{l s='Tourism Tax:'}</label>
<span class="pull-right">{convertPriceWithCurrency price=$data.tourism_tax_total currency=$currency->id}</span>
</div>
{/if}
</div>
</td>
<td class="center">
{convertPriceWithCurrency price=($data['total_room_price_ti']) currency=$currency->id}
@@ -181,6 +196,23 @@
{l s='Delete'}
</a>
</li>
{if isset($use_tourism_tax) && $use_tourism_tax && isset($data.tourism_tax_status) && $data.tourism_tax_status != $tourism_tax_status_not_applicable && !$data.is_cancelled && !$data.is_refunded}
{if $data.tourism_tax_status == $tourism_tax_status_applied}
<li>
<a href="#" class="tt-exempt-booking" data-id_htl_booking="{$data.id|intval}" data-label="{$data.room_num|escape:'html':'UTF-8'} - {$data.room_type_name|escape:'html':'UTF-8'}: ({$data.date_from|date_format:"%d/%m/%Y"} - {$data.date_to|date_format:"%d/%m/%Y"})">
<i class="icon-ban"></i>
{l s='Exempt Tourism Tax'}
</a>
</li>
{else}
<li>
<a href="#" class="tt-apply-booking" data-id_htl_booking="{$data.id|intval}">
<i class="icon-check"></i>
{l s='Apply Tourism Tax'}
</a>
</li>
{/if}
{/if}
</ul>
{/if}
</div>

View File

@@ -40,8 +40,8 @@
{if (isset($refundReqBookings) && $refundReqBookings)}
<th class="center"><span class="title_box help-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Refund or cancellation status and refunded amount for this room booking'}">{l s='Refund'}</span></th>
{/if}
{if ($can_edit && !$order->hasBeenDelivered())}
<th class="fixed-width-md center"><span >{l s='Actions'}</span></th>
{if (isset($can_edit) && $can_edit && !$order->hasBeenDelivered())}
<th class="fixed-width-md"><span class="title_box">{l s='Actions'}</th>
{/if}
</tr>
</thead>
@@ -62,4 +62,6 @@
{l s='Room information not available.'}
</div>
</div>
{/if}
{/if}
{include file='controllers/orders/_tourism_tax_actions.tpl'}

View File

@@ -69,6 +69,23 @@
</td>
<td>
<span>{displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id}</span>
{if isset($use_tourism_tax) && $use_tourism_tax && isset($product.tourism_tax_status)}
<span class="price_info">
&nbsp;<img src="{$info_icon_path|escape:'htmlall':'UTF-8'}" />
</span>
<div class="price_info_container" style="display: none;">
<div>
<label>{l s='Service Tax:'}</label>
<span class="pull-right">{displayPrice price=$product.total_service_tax_only currency=$currency->id}</span>
</div>
{if $product.tourism_tax_total > 0}
<div>
<label>{l s='Tourism Tax:'}</label>
<span class="pull-right">{displayPrice price=$product.tourism_tax_total currency=$currency->id}</span>
</div>
{/if}
</div>
{/if}
</td>
<td>
<span>{displayPrice price=$product.total_price_tax_incl currency=$currency->id}</span>
@@ -136,6 +153,23 @@
{l s='Delete'}
</a>
</li>
{if isset($use_tourism_tax) && $use_tourism_tax && isset($product.tourism_tax_status) && $product.tourism_tax_status != $tourism_tax_status_not_applicable && !$product.is_cancelled && !$product.is_refunded}
{if $product.tourism_tax_status == $tourism_tax_status_applied}
<li>
<a href="#" class="tt-exempt-service-line" data-id_service_product_order_detail="{$product.id_service_product_order_detail|intval}" data-label="{$product.name|escape:'html':'UTF-8'}">
<i class="icon-ban"></i>
{l s='Exempt Tourism Tax'}
</a>
</li>
{else}
<li>
<a href="#" class="tt-apply-service-line" data-id_service_product_order_detail="{$product.id_service_product_order_detail|intval}">
<i class="icon-check"></i>
{l s='Apply Tourism Tax'}
</a>
</li>
{/if}
{/if}
</ul>
</div>
{/if}

View File

@@ -0,0 +1,179 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a 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
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
{* Shared tourism tax price-breakdown tooltip + apply/exempt modal & handlers — included wherever a
room table (_rooms_informaion_table.tpl) and/or a products table (_hotel_service_products_table.tpl /
_standalone_service_products_table.tpl) with tourism tax columns is rendered. *}
<style>
.ui-tooltip.price_info-tooltip { border: unset; padding: 10px; box-shadow: 0px 0px 15px 0px #00000026; }
.ui-tooltip.price_info-tooltip span { margin-left: 15px; }
.ui-tooltip.price_info-tooltip label { font-weight: 600; }
</style>
<div class="modal fade" id="exempt-tourism-tax-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon-remove-sign"></i></button>
<h4 class="modal-title"><i class="icon-ban"></i> {l s='Exempt Tourism Tax'}</h4>
</div>
<div class="modal-body">
<div class="form-group" id="tt-exempt-targets-group">
<label class="control-label" id="tt-exempt-targets-label"><b>{l s='Rooms to be exempted'}</b></label>
<ul id="tt-exempt-targets-list" style="max-height:150px; overflow-y:auto; margin-bottom:0; padding-left:18px;"></ul>
</div>
<div class="form-group">
<label class="control-label">{l s='Reason for Exemption'}</label>
<textarea rows="3" class="textarea-autosize" id="tt-exempt-note"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="tt-exempt-confirm">
<i class="icon-ban"></i> {l s='Exempt Tourism Tax'}
</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
if ($('#customer_cart_details .price_info, #customer_products_details .price_info').length) {
$('#customer_cart_details .price_info, #customer_products_details .price_info').each(function (i, element) {
$(this).find('img').tooltip({
content: $(this).closest('td').find('.price_info_container').html(),
items: 'img',
trigger: 'hover',
tooltipClass: 'price_info-tooltip',
open: function (event, ui) {
if (typeof(event.originalEvent) === 'undefined') {
return false;
}
var $id = $(ui.tooltip).attr('id');
if ($('div.ui-tooltip').not('#' + $id).length) {
return false;
}
},
close: function (event, ui) {
ui.tooltip.hover(function () {
$(this).stop(true).fadeTo(400, 1);
}, function () {
$(this).fadeOut('400', function () {
$(this).remove();
});
});
}
});
});
}
function ttAjax(action, data) {
$.ajax({
type: 'POST',
url: admin_order_tab_link,
data: $.extend({ ajax: 1, action: action }, data),
dataType: 'json',
beforeSend: function () {
$('#page-loader').show();
},
success: function (resp) {
if (resp.hasError && resp.errors && resp.errors.length) {
showErrorMessage(resp.errors.join('<br>'));
} else {
window.location.href = admin_order_tab_link + '&conf=4&vieworder&id_order=' + id_order;
}
},
error: function () {
showErrorMessage('{l s='Tourism tax request failed. Please try again.' js=1}');
},
complete: function () {
$('#page-loader').hide();
}
});
}
$(document).on('click', '.tt-apply-booking', function (e) {
e.preventDefault();
ttAjax('ApplyTourismTax', { id_htl_booking: $(this).data('id_htl_booking') });
});
$(document).on('click', '.tt-apply-all-bookings', function (e) {
e.preventDefault();
ttAjax('ApplyTourismTax', { id_order: $(this).data('id_order') });
});
$(document).on('click', '.tt-apply-service-line', function (e) {
e.preventDefault();
ttAjax('ApplyTourismTax', { id_service_product_order_detail: $(this).data('id_service_product_order_detail') });
});
var ttExemptTarget = null;
var ttRoomsToBeExemptedLabel = '{l s='Rooms to be exempted' js=1}';
var ttProductsToBeExemptedLabel = '{l s='Products to be exempted' js=1}';
function ttShowExemptModal(labels, hasRooms) {
var $list = $('#tt-exempt-targets-list');
$list.empty();
$.each(labels, function (i, label) {
$list.append($('<li>').addClass('message-item-text').text(label));
});
$('#tt-exempt-targets-label b').text(hasRooms ? ttRoomsToBeExemptedLabel : ttProductsToBeExemptedLabel);
$('#tt-exempt-note').val('');
$('#exempt-tourism-tax-modal').modal('show');
}
$(document).on('click', '.tt-exempt-booking', function (e) {
e.preventDefault();
ttExemptTarget = { id_htl_booking: $(this).data('id_htl_booking') };
ttShowExemptModal([$(this).data('label')], true);
});
$(document).on('click', '.tt-exempt-all-bookings', function (e) {
e.preventDefault();
ttExemptTarget = { id_order: $(this).data('id_order') };
var labels = [];
var hasRooms = $('.tt-exempt-booking').length > 0;
$('.tt-exempt-booking').each(function () {
labels.push($(this).data('label'));
});
$('.tt-exempt-service-line').each(function () {
labels.push($(this).data('label'));
});
ttShowExemptModal(labels, hasRooms);
});
$(document).on('click', '.tt-exempt-service-line', function (e) {
e.preventDefault();
ttExemptTarget = { id_service_product_order_detail: $(this).data('id_service_product_order_detail') };
ttShowExemptModal([$(this).data('label')], false);
});
$(document).on('click', '#tt-exempt-confirm', function (e) {
if (!ttExemptTarget) {
return;
}
$('#exempt-tourism-tax-modal').modal('hide');
ttAjax('ExemptTourismTax', $.extend({ note: $('#tt-exempt-note').val() }, ttExemptTarget));
});
});
</script>

View File

@@ -22,6 +22,11 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<style>
.ui-tooltip.price_info-tooltip { border: unset; padding: 10px; box-shadow: 0px 0px 15px 0px #00000026; }
.ui-tooltip.price_info-tooltip span { margin-left: 15px; }
.ui-tooltip.price_info-tooltip label { font-weight: 600; }
</style>
<script type="text/javascript">
{if isset($cart->id) && $cart->id}
var id_cart = {$cart->id|intval};
@@ -49,6 +54,33 @@
$(document).ready(function() {
$('.total_taxes_price_info img').tooltip({
content: function () {
return $(this).closest('.data-focus').find('.price_info_container').html();
},
items: 'img',
trigger: 'hover',
tooltipClass: 'price_info-tooltip',
open: function (event, ui) {
if (typeof(event.originalEvent) === 'undefined') {
return false;
}
var $id = $(ui.tooltip).attr('id');
if ($('div.ui-tooltip').not('#' + $id).length) {
return false;
}
},
close: function (event, ui) {
ui.tooltip.hover(function () {
$(this).stop(true).fadeTo(400, 1);
}, function () {
$(this).fadeOut('400', function () {
$(this).remove();
});
});
}
});
$('#customer').typeWatch({
captureLength: 3,
highlight: true,
@@ -763,10 +795,18 @@
$('#total_convenience_fees').html(formatCurrency(parseFloat(jsonSummary.summary.convenience_fee), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.cart_total_without_discount_te), currency_format, currency_sign, currency_blank));
// $('#total_service_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_service_products), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount) + parseFloat(jsonSummary.summary.total_tourism_tax || 0), currency_format, currency_sign, currency_blank));
$('#total_taxes_vat').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount || 0), currency_format, currency_sign, currency_blank));
var totalTaxesTourismAmt = parseFloat(jsonSummary.summary.total_tourism_tax || 0);
$('#total_taxes_tourism').closest('div').toggle(totalTaxesTourismAmt > 0);
$('#total_taxes_tourism').html(formatCurrency(totalTaxesTourismAmt, currency_format, currency_sign, currency_blank));
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
$('#payment_amount').val(jsonSummary.summary.total_price);
if (parseInt($('input[name="is_full_payment"]:checked').val())) {
$('#payment_amount').val(jsonSummary.summary.total_price);
}
$('#full_payment_amount_value').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
if (jsonSummary.summary.is_advance_payment_active) {
$('#advance_payment_amount').html(formatCurrency(parseFloat(jsonSummary.summary.advance_payment_amount_with_tax), currency_format, currency_sign, currency_blank));
$('#advance_payment_amount_block').show();
@@ -778,7 +818,8 @@
if (jsonSummary.summary.total_price == 0) { // if free order
$('#send_email_to_customer, [name="is_full_payment"], #payment_amount, #payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').hide(200);
} else {
$('#send_email_to_customer, [name="is_full_payment"], #payment_amount, #payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').show(200);
$('#send_email_to_customer, [name="is_full_payment"], #payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').show(200);
$('#payment_amount').closest('.form-group').toggle(!parseInt($('input[name="is_full_payment"]:checked').val()));
}
}
@@ -1275,7 +1316,11 @@
shipping_price_selected_carrier = jsonSummary.summary.total_shipping;
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount) + parseFloat(jsonSummary.summary.total_tourism_tax || 0), currency_format, currency_sign, currency_blank));
$('#total_taxes_vat').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount || 0), currency_format, currency_sign, currency_blank));
var totalTaxesTourismAmt2 = parseFloat(jsonSummary.summary.total_tourism_tax || 0);
$('#total_taxes_tourism').closest('div').toggle(totalTaxesTourismAmt2 > 0);
$('#total_taxes_tourism').html(formatCurrency(totalTaxesTourismAmt2, currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.cart_total_without_discount_te), currency_format, currency_sign, currency_blank));
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
$('#total_rooms').html(formatCurrency(parseFloat(jsonSummary.summary.total_rooms_with_services_without_discount_te), currency_format, currency_sign, currency_blank));
@@ -1297,7 +1342,11 @@
}
$('#order_message').val(jsonSummary.order_message);
$('#payment_amount').siblings('.input-group-addon').html(currency_sign);
$('#payment_amount').val(jsonSummary.summary.total_price);
if (parseInt($('input[name="is_full_payment"]:checked').val())) {
$('#payment_amount').val(jsonSummary.summary.total_price);
}
$('#full_payment_amount_value').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
if (jsonSummary.summary.is_advance_payment_active) {
$('#advance_payment_amount').html(formatCurrency(parseFloat(jsonSummary.summary.advance_payment_amount_with_tax), currency_format, currency_sign, currency_blank));
$('#advance_payment_amount_block').show();
@@ -1309,7 +1358,8 @@
if (jsonSummary.summary.total_price == 0) { // if free order
$('#send_email_to_customer, [name="is_full_payment"], #payment_amount, #payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').hide(200);
} else {
$('#send_email_to_customer, [name="is_full_payment"], #payment_amount, #payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').show(200);
$('#send_email_to_customer, [name="is_full_payment"], #payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').show(200);
$('#payment_amount').closest('.form-group').toggle(!parseInt($('input[name="is_full_payment"]:checked').val()));
}
resetBind();
@@ -1562,10 +1612,10 @@
});
}
{* JS for handling extra demands changes *}
{* JS for handling extra services changes *}
$(document).ready(function() {
// modalbox for extra demands
$('body').on('click', '.open_rooms_extra_demands', function() {
// modalbox for extra services
$('body').on('click', '.open_rooms_extra_services', function() {
var idProduct = $(this).attr('id_product');
var idCart = $(this).attr('id_cart');
var idRoom = $(this).attr('id_room');
@@ -1590,7 +1640,7 @@
id_product: idProduct,
id_customer: id_customer,
id_hotel_cart_booking: idHotelCartBooking,
action: 'getRoomTypeCartDemands',
action: 'getRoomTypeCartServices',
ajax: true
},
success: function(response) {
@@ -1603,10 +1653,8 @@
errorHtml += '</ol>';
showErrorMessage(errorHtml);
} else {
$('#customer_cart_details').after(response.html_exta_demands);
// $('#rooms_type_extra_demands').find('#room_type_demands_desc').html('');
// $('#rooms_type_extra_demands').find('#room_type_demands_desc').append(response.html_exta_demands);
$('#rooms_type_extra_demands').modal('show');
$('#customer_cart_details').after(response.html_exta_services);
$('#rooms_type_extra_services').modal('show');
}
},
complete: function() {
@@ -1614,98 +1662,11 @@
}
});
});
$(document).on('hidden.bs.modal', '#rooms_type_extra_demands', function (e) {
$(document).on('hidden.bs.modal', '#rooms_type_extra_services', function (e) {
// reload to make changes reflect everywhere
location.reload();
});
// select/unselect extra demand
$(document).on('click', '.id_room_type_demand', function() {
var roomDemands = [];
// get the selected extra demands by customer
$(this).closest('.room_demand_detail').find('input:checkbox.id_room_type_demand:checked').each(function () {
roomDemands.push({
'id_global_demand':$(this).val(),
'id_option': $(this).closest('.room_demand_block').find('.id_option').val()
});
});
var idBookingCart = $(this).attr('id_cart_booking');
$(".loading_overlay").show();
$.ajax({
type: 'POST',
dataType: 'JSON',
headers: {
"cache-control": "no-cache"
},
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
dataType: 'JSON',
cache: false,
data: {
id_cart_booking: idBookingCart,
room_demands: JSON.stringify(roomDemands),
action: 'changeRoomDemands',
ajax: true
},
success: function(response) {
if (response.status) {
showSuccessMessage(txtExtraDemandSucc);
} else {
showErrorMessage(txtExtraDemandErr);
}
},
complete: function() {
$(".loading_overlay").hide();
}
});
});
// change advanced option of extra demand
$(document).on('change', '.demand_adv_option_block .id_option', function(e) {
var option_selected = $(this).find('option:selected');
var extra_demand_price = option_selected.attr("optionPrice")
extra_demand_price = parseFloat(extra_demand_price);
extra_demand_price = formatCurrency(extra_demand_price, currency_format, currency_sign, currency_blank);
$(this).closest('.room_demand_block').find('.extra_demand_option_price').text(extra_demand_price);
var roomDemands = [];
if ($(this).closest('.room_demand_block').find('input:checkbox.id_room_type_demand').is(':checked')) {
// get the selected extra demands by customer
$(this).closest('.room_demand_detail').find('input:checkbox.id_room_type_demand:checked').each(function () {
roomDemands.push({
'id_global_demand':$(this).val(),
'id_option': $(this).closest('.room_demand_block').find('.id_option').val()
});
});
var idBookingCart = $(this).closest('.room_demand_block').find('.id_room_type_demand').attr('id_cart_booking');
$(".loading_overlay").show();
$.ajax({
type: 'POST',
dataType: 'JSON',
headers: {
"cache-control": "no-cache"
},
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
dataType: 'JSON',
cache: false,
data: {
id_cart_booking: idBookingCart,
room_demands: JSON.stringify(roomDemands),
action: 'changeRoomDemands',
ajax: true
},
success: function(response) {
if (response.status) {
showSuccessMessage(txtExtraDemandSucc);
} else {
showErrorMessage(txtExtraDemandErr);
}
},
complete: function() {
$(".loading_overlay").hide();
}
});
}
});
$(document).on('keyup', '#payment_module_name', function() {
let paymentMethod = $('#payment_module_name').val().trim().toLowerCase();
@@ -1729,11 +1690,13 @@
$(document).on('change', 'input[name="is_full_payment"]', function() {
if (parseInt($('input[name="is_full_payment"]:checked').val())) {
$('#payment_amount').attr('disabled', true);
$('#payment_amount').val({$order_total|floatval}).attr('disabled', true);
$('#payment_amount').closest('.form-group').hide(200);
$('#payment_type, #payment_transaction_id').closest('.form-group').show(200);
$('#payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').show(200);
} else {
$('#payment_amount').attr('disabled', false);
$('#payment_amount').val({$order_total|floatval}).attr('disabled', false);
$('#payment_amount').closest('.form-group').show(200);
managePaymentOptions();
}
@@ -1747,9 +1710,9 @@
let paymentAmount = parseFloat($('#payment_amount').val().trim());
if (paymentAmount != 0) {
$('#payment_type, #payment_transaction_id').closest('.form-group').show(200);
$('#payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').show(200);
} else {
$('#payment_type, #payment_transaction_id').closest('.form-group').hide(200);
$('#payment_type, #payment_module_name, #payment_transaction_id').closest('.form-group').hide(200);
}
}
@@ -1764,7 +1727,7 @@
}
});
// click on back button on created facilities while additional facilities edit
// click on back button on created extra service edit
$(document).on('click', '#back_to_service_btn', function() {
$('#room_type_services_desc').show();
$('#add_new_room_services_block').hide();
@@ -1818,7 +1781,7 @@
if (jsonData.service_panel) {
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
}
showSuccessMessage(txtExtraDemandSucc);
showSuccessMessage(txtExtraServiceSucc);
} else {
var errorHtml = error_found_txt + ':<br>';
errorHtml += '<ol>';
@@ -1866,7 +1829,7 @@
if (jsonData.service_panel) {
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
}
showSuccessMessage(txtExtraDemandSucc);
showSuccessMessage(txtExtraServiceSucc);
} else {
if (jsonData.errors != 'undefined' && jsonData.errors.length) {
var errorHtml = error_found_txt + ':<br>';
@@ -2334,8 +2297,20 @@
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total taxes'}</span><br/>
<span>{l s='Total taxes'}
<span class="price_info total_taxes_price_info">&nbsp;<img src="{$info_icon_path|escape:'htmlall':'UTF-8'}" /></span>
</span><br/>
<span id="total_taxes" class="size_l"></span>
<div class="price_info_container" style="display: none;">
<div>
<label>{l s='Room & Service Tax:'}</label>
<span class="pull-right" id="total_taxes_vat"></span>
</div>
<div>
<label>{l s='Tourism Tax:'}</label>
<span class="pull-right" id="total_taxes_tourism"></span>
</div>
</div>
</div>
</div>
<div class="col-lg-2">
@@ -2399,8 +2374,13 @@
<p class="help-block">{l s='If disabled, no mail related to this order will be sent during order creation.'}</p>
</div>
</div>
<div class="form-group" {if $order_total <= 0}style="display: none;"{/if}>
<label class="control-label col-lg-3">{l s="Full payment"}</label>
<div class="form-group" {if $order_total <= 0}style="display: none;"{/if}>
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Keep this option enabled for full payment and disable it to take partial payment of the booking.'}">
{l s="Full payment"}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="is_full_payment" id="is_full_payment_on" value="1" {if $is_full_payment}checked="checked"{/if}>
@@ -2409,15 +2389,18 @@
<label for="is_full_payment_off">{l s="No"}</label>
<a class="slide-button btn"></a>
</span>
<p class="help-block">{l s='Keep this option enabled for full payment and disable it to take partial payment of the booking.'}</p>
<p class="help-block">
<span>{l s='Total amount: '}</span>
<span id="full_payment_amount_value">{displayPrice price=$order_total currency=$currency->id}</span>
</p>
</div>
</div>
<div class="form-group" {if $order_total <= 0}style="display: none;"{/if}>
<div class="form-group" {if $order_total <= 0 || $is_full_payment}style="display: none;"{/if}>
<label class="control-label required col-lg-3">{l s='Payment amount'}</label>
<div class="col-lg-9">
<div class="input-group fixed-width-xxl">
<span class="input-group-addon">{$currency->sign}</span>
<input type="text" name="payment_amount" id="payment_amount" value="{if isset($smarty.post.payment_amount)}{$smarty.post.payment_amount|escape:'html':'UTF-8'}{elseif $is_full_payment}{$order_total}{/if}" {if $is_full_payment}disabled{/if} />
<input type="text" name="payment_amount" id="payment_amount" value="{if !$is_full_payment && isset($smarty.post.payment_amount)}{$smarty.post.payment_amount|escape:'html':'UTF-8'}{else}{$order_total}{/if}" {if $is_full_payment}disabled{/if} />
</div>
<p class="help-block" id="advance_payment_amount_block" {if isset($is_advance_payment_active) && $is_advance_payment_active}style="display: block;"{else}style="display: none;"{/if}>
<span>{l s='Advance payment amount: '}</span>
@@ -2425,6 +2408,27 @@
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">{l s='Booking Source'}</label>
<div class="col-lg-9">
<select class="fixed-width-xxl" name="id_booking_source" id="id_booking_source">
<option value="">{l s='-- Select Booking Source --'}</option>
{assign var="prev_business_source" value=""}
{foreach from=$booking_sources item=booking_source name=booking_sources_loop}
{if $booking_source.business_source_name != $prev_business_source}
{if !$smarty.foreach.booking_sources_loop.first}</optgroup>{/if}
<optgroup label="{$booking_source.business_source_name}">
{assign var="prev_business_source" value=$booking_source.business_source_name}
{/if}
<option value="{$booking_source.id_source}" {if (isset($smarty.post.id_booking_source) && $booking_source.id_source == $smarty.post.id_booking_source) || (!isset($smarty.post.id_booking_source) && $booking_source.code == 'WALKIN')}selected="selected"{/if}>
{$booking_source.name}
</option>
{/foreach}
{if $booking_sources}</optgroup>{/if}
</select>
<p class="help-block">{l s='Walk-in is selected by default. Change it if this booking came from a different source.'}</p>
</div>
</div>
<div class="form-group" {if $order_total <= 0}style="display: none;"{/if}>
<label class="control-label col-lg-3">{l s='Payment source'}</label>
<div class="col-lg-9">
@@ -2487,6 +2491,7 @@
{addJsDefL name='no_children_allowed_txt'}{l s='Only adults can be accommodated' js=1}{/addJsDefL}
{addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL}
{addJsDefL name='error_found_txt'}{l s='Errors found' js=1}{/addJsDefL}
{addJsDefL name='txtExtraServiceSucc'}{l s='Updated Successfully' js=1}{/addJsDefL}
{/strip}
<div id="loader_container">

View File

@@ -770,6 +770,18 @@
<i class="icon-plus-sign"></i> {l s='Add Rooms'}
</button>
{/if}
{if isset($use_tourism_tax) && $use_tourism_tax && $order_detail_data}
{if isset($order_tourism_tax_has_applied) && $order_tourism_tax_has_applied}
<button type="button" class="btn btn-default pull-right tt-exempt-all-bookings" data-id_order="{$order->id|intval}" style="margin-right:5px; text-transform:uppercase">
<i class="icon-ban"></i> {l s='Exempt Tourism Tax'}
</button>
{/if}
{if isset($order_tourism_tax_has_unapplied) && $order_tourism_tax_has_unapplied}
<button type="button" class="btn btn-default pull-right tt-apply-all-bookings" data-id_order="{$order->id|intval}" style="margin-right:5px; text-transform:uppercase">
<i class="icon-check"></i> {l s='Apply Tourism Tax'}
</button>
{/if}
{/if}
</div>
{* by webkul this code is added for showing rooms information on the order detail page *}
{include file='controllers/orders/_rooms_informaion_table.tpl'}
@@ -790,6 +802,18 @@
<i class="icon-plus-sign"></i> {l s='Add Product'}
</button>
{/if}
{if isset($use_tourism_tax) && $use_tourism_tax && $hotel_service_products}
{if isset($products_tourism_tax_has_applied) && $products_tourism_tax_has_applied}
<button type="button" class="btn btn-default pull-right tt-exempt-all-bookings" data-id_order="{$order->id|intval}" style="margin-right:5px; text-transform:uppercase">
<i class="icon-ban"></i> {l s='Exempt Tourism Tax'}
</button>
{/if}
{if isset($products_tourism_tax_has_unapplied) && $products_tourism_tax_has_unapplied}
<button type="button" class="btn btn-default pull-right tt-apply-all-bookings" data-id_order="{$order->id|intval}" style="margin-right:5px; text-transform:uppercase">
<i class="icon-check"></i> {l s='Apply Tourism Tax'}
</button>
{/if}
{/if}
</div>
{include file='controllers/orders/_hotel_service_products_table.tpl'}
@@ -810,8 +834,21 @@
<i class="icon-plus-sign"></i> {l s='Add Product'}
</button>
{/if}
{if isset($use_tourism_tax) && $use_tourism_tax && $standalone_service_products}
{if isset($products_tourism_tax_has_applied) && $products_tourism_tax_has_applied}
<button type="button" class="btn btn-default pull-right tt-exempt-all-bookings" data-id_order="{$order->id|intval}" style="margin-right:5px; text-transform:uppercase">
<i class="icon-ban"></i> {l s='Exempt Tourism Tax'}
</button>
{/if}
{if isset($products_tourism_tax_has_unapplied) && $products_tourism_tax_has_unapplied}
<button type="button" class="btn btn-default pull-right tt-apply-all-bookings" data-id_order="{$order->id|intval}" style="margin-right:5px; text-transform:uppercase">
<i class="icon-check"></i> {l s='Apply Tourism Tax'}
</button>
{/if}
{/if}
</div>
{include file='controllers/orders/_standalone_service_products_table.tpl'}
{include file='controllers/orders/_tourism_tax_actions.tpl'}
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
<input type="hidden" name="TaxMethod" value="0">
@@ -843,10 +880,6 @@
{assign var=order_shipping_price value=$order->total_shipping_tax_incl}
{/if}
{* total extra demands prices *}
{* $totalDemandsPriceTE
$totalDemandsPriceTI *}
{* Get total rooms prices *}
{assign var=total_rooms_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)}
{assign var=total_rooms_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)}
@@ -855,16 +888,21 @@
{assign var=total_products_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE) + $order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE))}
{assign var=total_products_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_HOTEL_STANDALONE) + $order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_STANDALONE))}
{* Get total of extra services and extra demands prices(excluding convenience fee) *}
{assign var=total_room_services_and_demands_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE) + $totalDemandsPriceTE)}
{assign var=total_room_services_and_demands_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE) + $totalDemandsPriceTI)}
{* Get total of extra services prices(excluding convenience fee) *}
{assign var=total_room_services_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE))}
{assign var=total_room_services_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE))}
{* Get total of only convenience fees prices *}
{assign var=total_convenience_fee_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)}
{assign var=total_convenience_fee_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)}
{assign var=order_total_price_tax_excl value=($total_rooms_price_tax_excl + $total_room_services_and_demands_tax_excl + $total_products_price_tax_excl)}
{assign var=order_total_price_tax_incl value=($total_rooms_price_tax_incl + $total_room_services_and_demands_tax_incl + $total_products_price_tax_incl)}
{assign var=total_convenience_fee_vat_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT, null, false)}
{assign var=order_total_price_tax_excl value=($total_rooms_price_tax_excl + $total_room_services_tax_excl + $total_products_price_tax_excl)}
{assign var=order_total_price_tax_incl value=($total_rooms_price_tax_incl + $total_room_services_tax_incl + $total_products_price_tax_incl)}
{assign var=total_rooms_tax_only value=(($total_rooms_price_tax_incl - $total_rooms_price_tax_excl) - $tourism_tax_room)}
{assign var=total_convenience_fee_tax_only value=($total_convenience_fee_vat_incl - $total_convenience_fee_tax_excl)}
{assign var=total_products_tax_only value=(($total_products_price_tax_incl - $total_products_price_tax_excl) - $tourism_tax_products)}
{if $total_rooms_price_tax_excl}
<tr id="total_products">
@@ -884,11 +922,11 @@
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
{/if}
{if isset($total_room_services_and_demands_tax_excl) && $total_room_services_and_demands_tax_excl > 0}
{if isset($total_room_services_tax_excl) && $total_room_services_tax_excl > 0}
<tr id="total_products">
<td class="text-right">{l s='Total Extra services (Tax excl.)'}</td>
<td class="amount text-right nowrap">
{displayPrice price=($total_room_services_and_demands_tax_excl - $total_convenience_fee_tax_excl) currency=$currency->id}
{displayPrice price=($total_room_services_tax_excl - $total_convenience_fee_tax_excl) currency=$currency->id}
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
@@ -940,28 +978,54 @@
<td colspan="3" class="panel">
<table class="table table-responsive">
<tbody>
{if $total_rooms_price_tax_excl}
{if $total_rooms_price_tax_excl && $total_rooms_tax_only > 0}
<tr>
<td class="text-left">{l s='Total Rooms Tax'}</td>
<td class="text-right">
{displayPrice price=($total_rooms_price_tax_incl - $total_rooms_price_tax_excl) currency=$currency->id}
{displayPrice price=$total_rooms_tax_only currency=$currency->id}
</td>
</tr>
{/if}
{if isset($total_room_services_and_demands_tax_incl) && (($total_room_services_and_demands_tax_incl - $total_room_services_and_demands_tax_excl) - ($total_convenience_fee_tax_incl - $total_convenience_fee_tax_excl)) > 0}
{if isset($tourism_tax_room) && $tourism_tax_room > 0}
<tr>
<td class="text-left">{l s='Tourism Tax on Room'}</td>
<td class="text-right">
{displayPrice price=$tourism_tax_room currency=$currency->id}
</td>
</tr>
{/if}
{if isset($total_room_services_tax_incl) && (($total_room_services_tax_incl - $total_room_services_tax_excl) - ($total_convenience_fee_tax_incl - $total_convenience_fee_tax_excl)) > 0}
<tr>
<td class="text-left">{l s='Extra services Tax'}</td>
<td class="text-right nowrap">
{displayPrice price=(($total_room_services_and_demands_tax_incl - $total_room_services_and_demands_tax_excl) - ($total_convenience_fee_tax_incl - $total_convenience_fee_tax_excl)) currency=$currency->id}
{displayPrice price=(($total_room_services_tax_incl - $total_room_services_tax_excl) - ($total_convenience_fee_tax_incl - $total_convenience_fee_tax_excl)) currency=$currency->id}
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
{/if}
{if ($total_products_price_tax_incl - $total_products_price_tax_excl) > 0}
{if isset($tourism_tax_service) && $tourism_tax_service > 0}
<tr>
<td class="text-left">{l s='Tourism Tax on Extra Services'}</td>
<td class="text-right nowrap">
{displayPrice price=$tourism_tax_service currency=$currency->id}
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
{/if}
{if $total_products_tax_only > 0}
<tr id="total_products">
<td class="text-left">{l s='Products Tax'}</td>
<td class="amount text-right nowrap">
{displayPrice price=($total_products_price_tax_incl - $total_products_price_tax_excl) currency=$currency->id}
{displayPrice price=$total_products_tax_only currency=$currency->id}
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
{/if}
{if isset($tourism_tax_products) && $tourism_tax_products > 0}
<tr id="total_products">
<td class="text-left">{l s='Tourism Tax on Products'}</td>
<td class="amount text-right nowrap">
{displayPrice price=$tourism_tax_products currency=$currency->id}
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
@@ -970,7 +1034,7 @@
<tr id="total_products">
<td class="text-left">{l s='Convenience Fee Tax'}</td>
<td class="amount text-right nowrap">
{displayPrice price=($total_convenience_fee_tax_incl - $total_convenience_fee_tax_excl) currency=$currency->id}
{displayPrice price=$total_convenience_fee_tax_only currency=$currency->id}
</td>
<td class="partial_refund_fields current-edit" style="display:none;"></td>
</tr>
@@ -1261,12 +1325,12 @@
{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=txtExtraServiceSucc}{l s='Updated Successfully' js=1}{/addJsDefL}
{addJsDefL name=atleastSelectTxt}{l s='Select at least one facility to update.' js=1}{/addJsDefL}
{addJsDefL name=txtSomeErr}{l s='Some error occurred. Please try again.' js=1}{/addJsDefL}
{addJsDefL name=txtDeleteSucc}{l s='Deleted successfully' js=1}{/addJsDefL}
{addJsDefL name=txtInvalidDemandVal}{l s='Invalid demand value found' js=1}{/addJsDefL}
{addJsDefL name=txtInvalidServiceVal}{l s='Invalid service value found' js=1}{/addJsDefL}
{addJsDefL name='select_age_txt'}{l s='Select age' js=1}{/addJsDefL}
{addJsDefL name='under_1_age'}{l s='Under 1' js=1}{/addJsDefL}
{addJsDefL name='room_txt'}{l s='Room' js=1}{/addJsDefL}

View File

@@ -20,7 +20,7 @@
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<div id="room_type_service_product_desc" class="tab-pane{if !isset($selectedRoomDemands) || !$selectedRoomDemands} active{/if}">
<div id="room_type_service_product_desc" class="tab-pane{if isset($serviceProducts) || $serviceProducts} active{/if}">
{if $customServiceAllowed}
<div class="row">
<button id="btn_new_room_service" class="btn btn-success pull-right"><i class="icon-plus-circle"></i> {l s='Add a new service'}</button>
@@ -31,8 +31,8 @@
{if isset($serviceProducts) && $serviceProducts}
<div id="room_type_services_desc">
{assign var=roomCount value=1}
<div class="row room_demands_container">
<div class="col-sm-12 room_demand_detail">
<div class="row room_service_container">
<div class="col-sm-12 room_service_detail">
{if isset($serviceProducts) && $serviceProducts}
<form id="update_selected_room_services_form">
<table class="table table-striped">
@@ -54,7 +54,7 @@
{else}
{assign var='serviceSelected' value=false}
{/if}
<tr class="room_demand_block">
<tr class="room_service_block">
<td>
<input data-id_cart_booking="{$selectedRoomServiceProduct['id']}" value="{$product['id_product']|escape:'html':'UTF-8'}" type="checkbox" class="change_room_type_service_product" {if $serviceSelected}checked{/if}/>

View File

@@ -128,6 +128,26 @@
</div>
{/if}
</div>
{if isset($use_tourism_tax) && $use_tourism_tax}
<div class="form-group row">
<div class="col-sm-12">
<label class="control-label">{l s='Apply tourism tax'}</label>
<div>
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="add_product[apply_tourism_tax]" id="add_product_apply_tourism_tax_on" value="1" checked="checked"/>
<label for="add_product_apply_tourism_tax_on" class="radioCheck">
{l s='Yes'}
</label>
<input type="radio" name="add_product[apply_tourism_tax]" id="add_product_apply_tourism_tax_off" value="0"/>
<label for="add_product_apply_tourism_tax_off" class="radioCheck">
{l s='No'}
</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
{/if}
<div class="form-group row">
<div class="col-sm-12">
<label class="control-label">{l s='Remark'}</label>

View File

@@ -26,9 +26,6 @@
<li role="presentation" class="active">
<a href="#edit_room_tab" role="tab" data-toggle="tab">{l s='Rooms'}</a>
</li>
<li role="presentation">
<a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a>
</li>
<li role="presentation">
<a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a>
</li>

View File

@@ -22,8 +22,7 @@
<div class="extra-services-content modal-body">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
<li role="presentation"><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
<li role="presentation" class="active"><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
</ul>
<div class="tab-content clearfix">
{include file='controllers/orders/modals/_partials/_room_extra_services_content.tpl'}

View File

@@ -1,181 +0,0 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a 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
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<div id="room_type_demands_desc" class="tab-pane {if (isset($show_active) && $show_active) || (!isset($orderEdit) || !$orderEdit)}active{/if} extra-services-container">
<input type="hidden" value="{$id_booking_detail}" id="id_htl_booking">
{if isset($orderEdit) && $orderEdit}
<p class="col-sm-12 facility_nav_btn">
<button id="btn_new_room_demand" class="btn btn-success"><i class="icon-plus"></i> {l s='Add new facility'}</button>
<button id="back_to_demands_btn" class="btn btn-default"><i class="icon-arrow-left"></i> {l s='Back'}</button>
</p>
{* Already selected room demands *}
<div class="col-sm-12 room_ordered_demands table-responsive">
<table class="table">
<thead>
<tr>
<th>{l s='Name'}</th>
<th>{l s='Unit Price (tax excl.)'}</th>
<th>{l s='Total Price (tax excl.)'}</th>
<th>{l s='Total Price (tax incl.)'}</th>
<th class="text-right">{l s='Action'}</th>
</tr>
</thead>
<tbody>
{if isset($extraDemands) && $extraDemands}
{foreach $extraDemands as $roomDemand}
{foreach $roomDemand['extra_demands'] as $demand}
<tr data-id_booking_demand="{$demand['id_booking_demand']}">
<td>{$demand['name']}</td>
<td>
<div class="input-group">
<span class="input-group-addon">{$currencySign}</span>
<input type="text" class="form-control unit_price" value="{$demand['unit_price_tax_excl']}">
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
<span class="input-group-addon">{l s='/ night'}</span>
{/if}
</div>
</td>
<td>{displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}</td>
<td>{displayPrice price=$demand['total_price_tax_incl'] currency=$orderCurrency}</td>
<td class="text-right"><a class="btn btn-danger pull-right del-order-room-demand" href="#" id_booking_demand="{$demand['id_booking_demand']}"><i class="icon-trash"></i></a></td>
</tr>
{/foreach}
{/foreach}
{else}
<tr>
<td colspan="4">
<i class="icon-warning"></i> {l s='No facilities added yet.'}
</td>
</tr>
{/if}
</tbody>
</table>
</div>
{* Room demands available for the current editing room*}
<div class="col-sm-12 room_demands_container">
<div class="room_demand_detail">
{if isset($roomTypeDemands) && $roomTypeDemands}
<table class="table">
<thead>
<tr>
<th></th>
<th>{l s='Name'}</th>
<th>{l s='Option'}</th>
<th>{l s='Unit Price (tax excl.)'}</th>
</tr>
</thead>
<tbody>
{foreach $roomTypeDemands as $idGlobalDemand => $demand}
<tr class="room_demand_block">
<td>
<input id_cart_booking="{$roomDemand['id']}" value="{$idGlobalDemand|escape:'html':'UTF-8'}" type="checkbox" class="id_room_type_demand" {if isset($roomDemand['selected_global_demands']) && $roomDemand['selected_global_demands'] && ($idGlobalDemand|in_array:$roomDemand['selected_global_demands'])}checked{/if} />
</td>
<td>
{$demand['name']|escape:'html':'UTF-8'}
</td>
<td class="demand_adv_option_block">
{if isset($demand['adv_option']) && $demand['adv_option']}
<select class="id_option">
{foreach $demand['adv_option'] as $idOption => $option}
{assign var=demand_key value="`$idGlobalDemand`-`$idOption`"}
<option optionPrice="{$option['price_tax_excl']|escape:'html':'UTF-8'}" value="{$idOption|escape:'html':'UTF-8'}" {if isset($roomDemand['extra_demands'][$demand_key])}selected{/if} key="{$demand_key}">{$option['name']}</option>
{if isset($roomDemand['extra_demands'][$demand_key])}
{assign var=selected_adv_option value="$idOption"}
{/if}
{/foreach}
</select>
{else}
{l s='--'}
<input type="hidden" class="id_option" value="0" />
{/if}
</td>
<td>
<div class="input-group">
<span class="input-group-addon">{$currencySign}</span>
{if isset($selected_adv_option) && isset($demand['adv_option'][$selected_adv_option]['price_tax_excl'])}
{assign var=demand_price value=$demand['adv_option'][$selected_adv_option]['price_tax_excl']}
{else if isset($demand['adv_option']) && $demand['adv_option']}
{assign var=demand_price value=$demand['adv_option'][$demand['adv_option']|@key]['price_tax_excl']}
{else}
{assign var=demand_price value=$demand['price_tax_excl']}
{/if}
<input type="text" class="form-control unit_price" value="{$demand_price}" data-id-product="{$product['id_product']}">
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
<span class="input-group-addon">{l s='/ night'}</span>
{/if}
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
<div class="modal-footer">
<button type="button" id="save_room_demands" class="btn btn-primary"><i class="icon icon-save"></i> &nbsp;{l s="Update Facilities"}</button>
</div>
{else}
<i class="icon-warning"></i> {l s='No facilities available for this room.'}
{/if}
</div>
</div>
{else}
<div class="room_demand_detail">
<table class="table">
<thead>
<tr>
<th>{l s='Name'}</th>
<th>{l s='Unit Price (tax excl.)'}</th>
<th>{l s='Total Price (tax excl.)'}</th>
<th>{l s='Total Price (tax incl.)'}</th>
</tr>
</thead>
<tbody>
{if isset($extraDemands) && $extraDemands}
{foreach $extraDemands as $roomDemand}
{foreach $roomDemand['extra_demands'] as $demand}
<tr class="room_demand_block">
<td>{$demand['name']}</td>
<td>
{displayPrice price=$demand['unit_price_tax_excl'] currency=$orderCurrency}
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
{l s='/ night'}
{/if}
</td>
<td>{displayPrice price=$demand['total_price_tax_excl'] currency=$orderCurrency}</td>
<td>{displayPrice price=$demand['total_price_tax_incl'] currency=$orderCurrency}</td>
</tr>
{/foreach}
{/foreach}
{else}
<tr>
<td colspan="3">
<i class="icon-warning"></i> {l s='No facilities added yet.'}
</td>
</tr>
{/if}
</tbody>
</table>
</div>
{/if}
</div>

View File

@@ -20,7 +20,7 @@
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<div id="room_type_service_product_desc" class="tab-pane {if isset($show_active) && $show_active}active{/if} extra-services-container">
<div id="room_type_service_product_desc" class="tab-pane {if isset($show_active) && $show_active}active{/if} extra-services-container">
{if isset($orderEdit) && $orderEdit}
<div class="col-sm-12 facility_nav_btn">
@@ -51,7 +51,7 @@
<tbody>
{if isset($additionalServices) && $additionalServices}
{foreach $additionalServices['additional_services'] as $service}
<tr class="room_demand_block" data-id_service_product_order_detail="{$service['id_service_product_order_detail']}">
<tr class="room_service_block" data-id_service_product_order_detail="{$service['id_service_product_order_detail']}">
<td>
<div>{$service['name']|escape:'html':'UTF-8'}</div>
<input value="{$service['id_service_product_order_detail']|escape:'html':'UTF-8'}" name="id_service_product_order_detail[]" type="hidden"/>
@@ -110,7 +110,7 @@
{* add already available service interface *}
<form id="add_existing_room_services_form" class="col-sm-12 room_services_container">
<div class="room_demand_detail">
<div class="room_service_detail">
{if isset($serviceProducts) && $serviceProducts}
<table class="table">
<thead>
@@ -124,7 +124,7 @@
</thead>
<tbody>
{foreach $serviceProducts as $product}
<tr class="room_demand_block">
<tr class="room_service_block">
<td>
<input data-id_booking_detail="{$id_booking_detail}" value="{$product['id_product']|escape:'html':'UTF-8'}" name="selected_service[]" type="checkbox" class="id_room_type_service"/>
</td>
@@ -250,7 +250,7 @@
{/if}
{elseif isset($additionalServices) && $additionalServices}
<table class="table room_demand_detail">
<table class="table room_service_detail">
<thead>
<tr>
<th>{l s='ID'}</th>
@@ -264,7 +264,7 @@
</thead>
</tbody>
{foreach $additionalServices['additional_services'] as $service}
<tr class="room_demand_block">
<tr class="room_service_block">
<td>
{$service['id_product']|escape:'html':'UTF-8'}{if !$service['product_deleted']} <a target="blank" href="{$link->getAdminLink('AdminNormalProducts')|escape:'html':'UTF-8'}&amp;id_product={$service['id_product']|escape:'html':'UTF-8'}&amp;updateproduct"><i class="icon-external-link-sign"></i></a>{/if}
</td>

View File

@@ -20,17 +20,14 @@
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
{include file='controllers/orders/modals/_extra_services_facilities_tab_content.tpl'}
{include file='controllers/orders/modals/_extra_services_service_products_tab_content.tpl'}
{* Css for handling extra demands changes *}
{* Css for handling extra services changes *}
<style type="text/css">
/*Extra demands CSS*/
#edit_product .extra-services-container .room_demands_container,
/*Extra services CSS*/
#edit_product .extra-services-container .room_service_container,
#edit_product .extra-services-container .room_services_container {
display: none;}
#edit_product .extra-services-container #save_room_demands,
#edit_product .extra-services-container #back_to_demands_btn,
#edit_product .extra-services-container #save_service_service,
#edit_product .extra-services-container #back_to_service_btn {
display: none;}

View File

@@ -89,8 +89,8 @@
</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>
<p>{l s="If room type is changed while room reallocation then all extra services will be assigned to the selected room of new room type."}</p>
<p>{l s="If you want to change extra services, you can update by editing the room after reallocation."}</p>
</div>
</div>
<p class="error_text" id="realloc_sel_rm_err_p"></p>

View File

@@ -0,0 +1,52 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a 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
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
{if isset($tourismTaxRulesGroups)}
<div class="form-group">
<div class="col-lg-1"></div>
<label class="control-label col-lg-2" for="id_tourism_tax_rules_group">{l s='Tourism Tax Rule:'}</label>
<div class="col-lg-8">
<div class="row">
<div class="col-lg-6">
<select name="id_tourism_tax_rules_group" id="id_tourism_tax_rules_group"{if isset($tourismTaxRatesByGroup)} onchange="javascript:calcPrice();"{/if}>
{foreach from=$tourismTaxRulesGroups item=ttrg}
<option value="{$ttrg.id_tax_rules_group|intval}"
{if isset($id_tourism_tax_rules_group) && $id_tourism_tax_rules_group == $ttrg.id_tax_rules_group}selected="selected"{/if}>
{$ttrg.name|escape:'htmlall':'UTF-8'}
</option>
{/foreach}
</select>
</div>
<div class="col-lg-2">
<a class="btn btn-link confirm_leave" href="{$link->getAdminLink('AdminTaxRulesGroup')|escape:'html':'UTF-8'}&amp;addtax_rules_group&amp;id_product={$product->id}&amp;is_tourism_tax_rule_group=1">
<i class="icon-plus-sign"></i> {l s='Create new tax'} <i class="icon-external-link-sign"></i>
</a>
</div>
</div>
</div>
</div>
{if isset($tourismTaxRatesByGroup)}
<script type="text/javascript">
var tourismTaxRatesByGroup = {$tourismTaxRatesByGroup|json_encode};
</script>
{/if}
{/if}

View File

@@ -1,156 +0,0 @@
{**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a 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
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
{if isset($product->id) && $product->id}
<input type="hidden" name="submitted_tabs[]" value="AdditionalFacilities" />
<div class="panel">
<div class="panel-heading">
<i class="icon-user"></i> {l s='Room Type Additional Facilities'}
</div>
<div class="alert alert-info">
{l s='To create new additional facilities please visit'} <a target="_blank" href="{$link->getAdminLink('AdminRoomTypeGlobalDemand')}">{l s='Additional facilities'}</a> {l s='page.'}
</div>
{if isset($allDemands) && $allDemands}
<div class="from-group table-responsive-row clearfix">
<table class="table" id="demands_table">
<thead>
<tr>
<th></th>
<th>
{l s='Name'}
</th>
<th>
{l s='Option'}
</th>
<th class="fixed-width-xl">
{l s='Price'}
</th>
<th>
{l s='Tax rule'}
</th>
<th class="fixed-width-lg text-center">
{l s='Per day price calculation'}
</th>
</tr>
</thead>
<tbody>
{foreach $allDemands as $key => $demand}
{assign var="rowcount" value=0}
{if isset($demand['adv_option']) && $demand['adv_option']}
{assign var="rowspan" value=$demand['adv_option']|count}
{assign var="adv_option" value=$demand['adv_option']}
{else}
{assign var="rowspan" value=1}
{assign var="adv_option" value=[]}
{/if}
{foreach $adv_option as $option}
{assign var="rowcount" value=$rowcount + 1}
<tr>
{if $rowcount <= 1}
<td rowspan="{$rowspan}">
<input class="selected_demand" type="checkbox" name="selected_demand[]" value="{$demand['id_global_demand']|escape:'html':'UTF-8'}" {if isset($selectedDemands[$demand['id_global_demand']])}checked{/if} />
<input type="hidden" name="demand_price_{$demand['id_global_demand']|escape:'html':'UTF-8'}" value="{if isset($selectedDemands[$demand['id_global_demand']]['price'])}{$selectedDemands[$demand['id_global_demand']]['price']|escape:'html':'UTF-8'}{elseif isset($demand['price'])}{$demand['price']|escape:'html':'UTF-8'}{/if}"/>
</td>
<td rowspan="{$rowspan}">
<a target="blank" href="{$link->getAdminLink('AdminRoomTypeGlobalDemand')|escape:'html':'UTF-8'}&amp;id_global_demand={$demand['id_global_demand']|escape:'html':'UTF-8'}&amp;updatehtl_room_type_global_demand"><i class="icon-external-link-sign"></i></a> {$demand['name']|escape:'html':'UTF-8'}
</td>
{/if}
<td>
{$option['name']|escape:'html':'UTF-8'}
</td>
<td class="demand_price_{$demand['id_global_demand']}">
<div class="input-group price_input" {if !isset($selectedDemands[$demand['id_global_demand']])}style="display:none"{/if}>
<span class="input-group-addon">{$defaultcurrencySign|escape:'html':'UTF-8'}</span>
<input type="text" name="option_price_{$option['id']|escape:'html':'UTF-8'}" value="{if isset($selectedDemands[$demand['id_global_demand']]['adv_option'][$option['id']]['price'])}{$selectedDemands[$demand['id_global_demand']]['adv_option'][$option['id']]['price']|escape:'html':'UTF-8'}{else}{$option['price']|escape:'html':'UTF-8'}{/if}"/>
</div>
<div class="price_display" {if isset($selectedDemands[$demand['id_global_demand']])}style="display:none"{/if}>
{displayPrice price={$option['price']|escape:'html':'UTF-8'} currency=$idDefaultcurrency}
</div>
</td>
{if $rowcount == 1}
<td rowspan="{$rowspan}">
{$demand['default_tax_rules_group_name']}
</td>
<td class="text-center" rowspan="{$rowspan}">
{if $demand['price_calc_method'] == 1}
<span class="badge badge-success">{l s='Yes'}</span>
{else}
<span>{l s='No'}</span>
{/if}
</td>
{/if}
</tr>
{foreachelse}
<tr>
<td>
<input class="selected_demand" type="checkbox" name="selected_demand[]" value="{$demand['id_global_demand']|escape:'html':'UTF-8'}" {if isset($selectedDemands[$demand['id_global_demand']])}checked{/if} />
</td>
<td>
<a target="blank" href="{$link->getAdminLink('AdminRoomTypeGlobalDemand')|escape:'html':'UTF-8'}&amp;id_global_demand={$demand['id_global_demand']|escape:'html':'UTF-8'}&amp;updatehtl_room_type_global_demand"><i class="icon-external-link-sign"></i></a> {$demand['name']|escape:'html':'UTF-8'}
</td>
<td></td>
<td class="demand_price_{$demand['id_global_demand']}">
<div class="input-group price_input" {if !isset($selectedDemands[$demand['id_global_demand']])}style="display:none"{/if}>
<span class="input-group-addon">{$defaultcurrencySign|escape:'html':'UTF-8'}</span>
<input type="text" name="demand_price_{$demand['id_global_demand']|escape:'html':'UTF-8'}"
value="{if isset($selectedDemands[$demand['id_global_demand']]['price'])}{$selectedDemands[$demand['id_global_demand']]['price']|escape:'html':'UTF-8'}{elseif isset($demand['price'])}{$demand['price']|escape:'html':'UTF-8'}{/if}"/>
</div>
<div class="price_display" {if isset($selectedDemands[$demand['id_global_demand']])}style="display:none"{/if}>
{displayPrice price={$demand['price']|escape:'html':'UTF-8'} currency=$idDefaultcurrency}
</div>
</td>
<td>
{$demand['default_tax_rules_group_name']}
</td>
<td class="text-center">
{if $demand['price_calc_method'] == 1}
<span class="badge badge-success">{l s='Yes'}</span>
{else}
<span>{l s='No'}</span>
{/if}
</td>
</tr>
{/foreach}
{/foreach}
</tbody>
</table>
</div>
<div class="panel-footer">
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&amp;submitFilterproduct={$smarty.request.page|intval}{/if}" class="btn btn-default">
<i class="process-icon-cancel"></i>
{l s='Cancel'}
</a>
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save'}
</button>
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled">
<i class="process-icon-loading"></i>
{l s='Save and stay'}
</button>
</div>
{/if}
</div>
{/if}

View File

@@ -121,7 +121,7 @@
<a href="#" class="btn btn-default connectedRoomModal" data-toggle="modal"
data-target="#connectedRoomModal" data-id-room="{$room_info['id']|intval}"
data-room-num="{$room_info['room_num']|escape:'html':'UTF-8'}"
data-room-type="{$room_info['id_product']|intval}">
data-room-type="{if isset($room_info['id_product'])}{$room_info['id_product']|intval}{/if}">
<span class="connected-room-icon-wrapper">
<i class="icon-random"></i>
<span class="connected-room-count">

View File

@@ -183,6 +183,7 @@ $(document).ready(function () {
</div>
</div>
{/if}
{* Code For eco-tax working
<div class="form-group" {if !$ps_use_ecotax} style="display:none;"{/if}>
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="ecotax" type="default"}</span></div>
<label class="control-label col-lg-2" for="ecotax">
@@ -193,6 +194,8 @@ $(document).ready(function () {
<input maxlength="27" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:$priceDisplayPrecisionFormat}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />
</div>
</div>
*}
{include file="controllers/products/_tourism_tax_rule_field.tpl"}
<div class="form-group" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} >
<label class="control-label col-lg-3" for="priceTI">{l s='Retail price with tax'}</label>
<div class="input-group col-lg-2">
@@ -465,6 +468,7 @@ $(document).ready(function () {
</div>
</div>
{if isset($specificPriceModificationForm)}
<div class="panel">
<h3>{l s='Specific prices'}</h3>

View File

@@ -121,6 +121,19 @@ $(function() {
</div>
{/if}
{if isset($num_hotel_amenities) && $num_hotel_amenities}
<div class="panel">
<h3>
{if $num_hotel_amenities == 1}
{l s='1 hotel amenity'}
{else}
{l s='%d hotel amenities' sprintf=$num_hotel_amenities}
{/if}
</h3>
{$hotel_amenities}
</div>
{/if}
{if isset($num_hotel_features) && $num_hotel_features}
<div class="panel">
<h3>
@@ -173,19 +186,6 @@ $(function() {
</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>

View File

@@ -0,0 +1,18 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
{extends file="helpers/list/list_header.tpl"}
{block name="override_form_extra"}
{if isset($smarty.get.id_business_source)}
<input type="hidden" name="id_business_source" value="{$smarty.get.id_business_source|intval}" />
{/if}
{/block}

View File

@@ -0,0 +1,33 @@
{*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*}
<form action="{$current_index}&token={$token}" method="post">
<div class="modal-body">
<div class="form-group">
<label>{l s='Current Source'}</label>
<input type="text" name="merge_current_source" id="merge_current_source" class="form-control" readonly="true" value="{$current_source->name}"/>
</div>
<div class="form-group">
<label>{l s='Target Source'}</label>
<select name="target_source" id="target_source" class="form-control">
{foreach from=$sources item=source}
<option value="{$source.id_source}">{$source.name}</option>
{/foreach}
</select>
</div>
<p class="help-block">{l s='Every order currently attributed to Current Source will be reattributed to Target Source. Current Source itself is left as-is.'}</p>
<input type="hidden" name="id_business_source" value="{$id_business_source|intval}" />
<input type="hidden" name="current_source" value="{$current_source->id|intval}" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{l s='Cancel'}</button>
<button type="submit" name="submitMergeSource" class="btn btn-primary"> <i class="icon-random"></i> &nbsp {l s='Update'}</button>
</div>
</form>

View File

@@ -54,14 +54,10 @@
<input type="hidden" name="lang" value="{$lang}" />
<input type="hidden" name="type" value="{$type}" />
<input type="hidden" name="theme" value="{$theme}" />
<script type="text/javascript">
$(document).ready(function(){
$('a.useSpecialSyntax').click(function(){
var syntax = $(this).find('img').attr('alt');
$('#BoxUseSpecialSyntax .syntax span').html(syntax+".");
});
});
</script>
<input type="hidden" name="reset_mail_name" id="reset_mail_name" value="" />
<input type="hidden" name="reset_template_type" id="reset_template_type" value="" />
<input type="hidden" name="reset_module_name" id="reset_module_name" value="" />
<input type="hidden" name="token" id="translation_mails_token" value="{$token}" />
<div id="BoxUseSpecialSyntax">
<div class="alert alert-warning">
<p>
@@ -80,6 +76,10 @@
<a name="submitTranslations{$type|ucfirst}" href="{$cancel_url}" class="btn btn-default">
<i class="process-icon-cancel"></i> {l s='Cancel'}
</a>
<button type="button" id="{$table}_form_reset_btn" class="btn btn-default mail-template-reset-btn label-tooltip" disabled="disabled" data-toggle="tooltip" title="">
<i class="process-icon-refresh"></i>
{l s='Reset'}
</button>
{*$toggle_button*}
<button type="submit" id="{$table}_form_submit_btn" name="submitTranslations{$type|ucfirst}" class="btn btn-default pull-right">
<i class="process-icon-save"></i>
@@ -101,56 +101,6 @@
</span>
</h3>
{$mail_content}
{literal}
<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
$('.mails_field').on('shown.bs.collapse', function () {
// get active email
var active_email = $(this).find('.email-collapse.in');
// get iframe container for active email
var frame = active_email.find('.email-html-frame');
// get source url for active email
var src = frame.data('email-src');
// get rte container for active email
var rte_mail_selector = active_email.find('textarea.rte-mail').data('rte');
// create special config
var rte_mail_config = {};
rte_mail_config['editor_selector'] = 'rte-mail-' + rte_mail_selector;
rte_mail_config['height'] = '500px';
// We want the default plugins + 'fullpage' plugin for HTML emails
rte_mail_config['plugins'] = "colorpicker link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor anchor fullpage";
// move controls to active panel
$('#translation_mails-control-actions').appendTo($(this).find('.panel-collapse.in'));
// when user first open email
if (frame.find('iframe.email-frame').length == 0) {
// load iframe
frame.append('<iframe class="email-frame" />');
$.ajax({
url:'ajax.php',
type: 'POST',
dataType: 'html',
data: {
getEmailHTML : true,
email : src
},
success: function(result)
{
var doc = frame.find('iframe')[0].contentWindow.document;
doc.open();
doc.write(result);
doc.close();
tinySetup(rte_mail_config);
// init tinyMCE with special config
}
});
}
});
})
//]]>
</script>
{/literal}
</div>
<div class="panel">
<h3>