Merge branch 'webkul:develop' into changelog-1.6.0

This commit is contained in:
abhishek-webkul
2023-04-14 21:18:33 +05:30
committed by GitHub
42 changed files with 755 additions and 550 deletions

View File

@@ -1066,7 +1066,7 @@
<table class="table table-striped">
<thead>
<tr>
<th class="text-left">{l s='Refund ID'}</th>
<th class="text-left">{l s='Request ID'}</th>
<th class="text-center">{l s='Total Rooms'}</th>
<th class="text-left">{l s='Status'}</th>
<th class="text-center">{l s='Requested Date'}</th>

View File

@@ -35,7 +35,7 @@
</span>
</label>
<div class="col-sm-3">
<input id="base_adults" type="text" name="base_adults" class="form-control" {if isset($roomTypeInfo)}value="{$roomTypeInfo['adults']|escape:'htmlall':'UTF-8'}"{/if}>
<input id="base_adults" type="text" name="base_adults" class="form-control" value="{if isset($roomTypeInfo)}{$roomTypeInfo['adults']|escape:'htmlall':'UTF-8'}{else}2{/if}">
</div>
</div>
<div class="form-group">

View File

@@ -284,95 +284,96 @@ $(document).ready(function () {
</span>
</div>
</div>
<div class="form-group adv_payment_field">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-sm-2">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='If disabled, Advance Payment for the room type will be calculated By Global Advance payment settings.'}">
{l s='Apply Room Type Advance Payment Setting.'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" value="1" id="cal_from_on" name="cal_from" {if (isset($adv_pay_dtl) && $adv_pay_dtl['calculate_from'])}checked="checked"{/if}>
<label for="cal_from_on">{l s='Yes'}</label>
<input type="radio" value="0" id="cal_from_off" name="cal_from" {if ((isset($adv_pay_dtl) && !$adv_pay_dtl['calculate_from']) || !isset($adv_pay_dtl))}checked="checked"{/if}>
<label for="cal_from_off">{l s='No'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
<div class="form-group adv_payment_field">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-sm-2">{l s='Payment type'}</label>
<div class="col-lg-9">
<div class="radio">
<label for="percent_type">
<input type="radio" name="payment_type" class="payment_type" value="1" {if ((isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 1)) || !isset($adv_pay_dtl) || !$adv_pay_dtl['payment_type'])}checked="checked"{/if}>
{l s='Percent (%) '}
</label>
</div>
<div class="radio">
<label for="fixed_type">
<input type="radio" name="payment_type" class="payment_type" value="2" {if isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 2)}checked="checked"{/if}>
{l s='Amount'}
</label>
<div class="adv_payment_field">
<div class="form-group">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-sm-2">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='If disabled, Advance Payment for the room type will be calculated By Global Advance payment settings.'}">
{l s='Apply Room Type Advance Payment Setting.'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" value="1" id="cal_from_on" name="cal_from" {if (isset($adv_pay_dtl) && $adv_pay_dtl['calculate_from'])}checked="checked"{/if}>
<label for="cal_from_on">{l s='Yes'}</label>
<input type="radio" value="0" id="cal_from_off" name="cal_from" {if ((isset($adv_pay_dtl) && !$adv_pay_dtl['calculate_from']) || !isset($adv_pay_dtl))}checked="checked"{/if}>
<label for="cal_from_off">{l s='No'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
<div class="form-group adv_payment_field">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<div class="col-lg-11">
<div class="row" id="type_percent">
<label class="control-label col-sm-2">{l s='Value'}</label>
<div class="col-sm-4 col-lg-3">
<div class="input-group">
<span class="input-group-addon">%</span>
<input type="text" value="{if isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 1)}{$adv_pay_dtl['value']}{/if}" name="adv_pay_percent" />
<div class="room_type_adv_payment_field">
<div class="form-group">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-sm-2">{l s='Payment type'}</label>
<div class="col-lg-9">
<div class="radio">
<label for="percent_type">
<input type="radio" name="payment_type" class="payment_type" value="1" {if ((isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 1)) || !isset($adv_pay_dtl) || !$adv_pay_dtl['payment_type'])}checked="checked"{/if}>
{l s='Percent (%) '}
</label>
</div>
<div class="radio">
<label for="fixed_type">
<input type="radio" name="payment_type" class="payment_type" value="2" {if isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 2)}checked="checked"{/if}>
{l s='Amount'}
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<div class="col-lg-11">
<div class="row" id="type_amount">
<label class="control-label col-sm-2">{l s='Amount'}</label>
<div class="col-sm-9">
<div class="row">
<div class="row" id="type_percent">
<label class="control-label col-sm-2">{l s='Value'}</label>
<div class="col-sm-4 col-lg-3">
<div class="input-group">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input name="adv_pay_amount" type="text" value="{if isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 2)}{{toolsConvertPrice price=$adv_pay_dtl['value']}|string_format:'%.6f'}{/if}"/>
<span class="input-group-addon">%</span>
<input type="text" value="{if isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 1)}{$adv_pay_dtl['value']}{/if}" name="adv_pay_percent" />
</div>
</div>
</div>
<div class="help-block">
{l s='If final price of the room type is less than advance payment amount for the customer then customer will pay the final(lesser) price of the room type.'}
<div class="row" id="type_amount">
<label class="control-label col-sm-2">{l s='Amount'}</label>
<div class="col-sm-9">
<div class="row">
<div class="col-sm-4 col-lg-3">
<div class="input-group">
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
<input name="adv_pay_amount" type="text" value="{if isset($adv_pay_dtl) && ($adv_pay_dtl['payment_type'] == 2)}{{toolsConvertPrice price=$adv_pay_dtl['value']}|string_format:'%.6f'}{/if}"/>
</div>
</div>
</div>
<div class="help-block">
{l s='If final price of the room type is less than advance payment amount for the customer then customer will pay the final(lesser) price of the room type.'}
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-sm-2">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='If Enable, customer will pay : (Advanced payment price + tax) and if Disabled, customer will only pay advanced payment price'}">
{l s='Include tax'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" value="1" id="adv_tax_include_on" name="adv_tax_include" {if (isset($adv_pay_dtl) && $adv_pay_dtl['tax_include']) || !isset($adv_pay_dtl)}checked="checked"{/if}>
<label for="adv_tax_include_on">{l s='Yes'}</label>
<input type="radio" value="0" id="adv_tax_include_off" name="adv_tax_include" {if isset($adv_pay_dtl) && !$adv_pay_dtl['tax_include']}checked="checked"{/if}>
<label for="adv_tax_include_off">{l s='No'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
</div>
</div>
<div class="form-group adv_payment_field">
<div class="col-lg-1"><span class="pull-right">{include file="controllers/products/multishop/checkbox.tpl" field="price" type="price"}</span></div>
<label class="control-label col-sm-2">
<span class="label-tooltip" data-toggle="tooltip" title="{l s='If Enable, customer will pay : (Advanced payment price + tax) and if Disabled, customer will only pay advanced payment price'}">
{l s='Include tax'}
</span>
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" value="1" id="adv_tax_include_on" name="adv_tax_include" {if (isset($adv_pay_dtl) && $adv_pay_dtl['tax_include']) || !isset($adv_pay_dtl)}checked="checked"{/if}>
<label for="adv_tax_include_on">{l s='Yes'}</label>
<input type="radio" value="0" id="adv_tax_include_off" name="adv_tax_include" {if isset($adv_pay_dtl) && !$adv_pay_dtl['tax_include']}checked="checked"{/if}>
<label for="adv_tax_include_off">{l s='No'}</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
{/if}
<div class="panel-footer">
@@ -634,15 +635,25 @@ $(document).ready(function () {
else
$(".adv_payment_field").hide();
$(".adv_payment_active").on('change',function()
{
$(".adv_payment_active").on('change',function(){
var adv_payment = $(".adv_payment_active:checked").val();
if (adv_payment == 1)
$(".adv_payment_field").show();
else if (adv_payment == 0)
$(".adv_payment_field").hide();
});
var cal_from = $('[name="cal_from"]:checked').val();
if (cal_from == 1)
$(".room_type_adv_payment_field").show();
else
$(".room_type_adv_payment_field").hide();
$('[name="cal_from"]').on('change',function(){
var cal_from = $('[name="cal_from"]:checked').val();
if (cal_from == 1)
$(".room_type_adv_payment_field").show();
else if (cal_from == 0)
$(".room_type_adv_payment_field").hide();
});
var payment_type = $(".payment_type:checked").val();
if (payment_type == 1)
{

View File

@@ -251,10 +251,13 @@ class AddressCore extends ObjectModel
$errors = parent::validateController($htmlentities);
// for customer address we need to check of customer address already exists.
if ($idCustomer = Tools::getValue('id_customer')) {
if ($id_address = Customer::getCustomerIdAddress($idCustomer)) {
// if we are editing an address we do not need to validate already created address.
if (!Validate::isLoadedObject($this)) {
if ($idCustomer = Tools::getValue('id_customer')) {
if ($id_address = Customer::getCustomerIdAddress($idCustomer)) {
$errors[] = sprintf(Tools::displayError('Customer address already exists. Id address: #%d'), $id_address);
$errors[] = sprintf(Tools::displayError('Customer address already exists. Id address: #%d'), $id_address);
}
}
}

View File

@@ -586,8 +586,12 @@ class OrderCore extends ObjectModel
return self::$_historyCache[$this->id.'_'.$id_order_state.'_'.$filters];
}
public function getProductsDetail($is_booking = null, $product_service_type = null)
{
public function getProductsDetail(
$is_booking = null,
$product_service_type = null,
$product_auto_add = null,
$product_price_addition_type = null
) {
$sql = 'SELECT *
FROM `'._DB_PREFIX_.'order_detail` od
LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.id_product = od.product_id)
@@ -598,6 +602,12 @@ class OrderCore extends ObjectModel
if (!$is_booking && $product_service_type !== null) {
$sql .= ' AND od.`product_service_type` = '. (int)$product_service_type;
}
if (!$is_booking && $product_service_type == Product::SERVICE_PRODUCT_WITH_ROOMTYPE && $product_auto_add !== null) {
$sql .= ' AND od.`product_auto_add` = '. (int)$product_auto_add;
}
if (!$is_booking && $product_service_type == Product::SERVICE_PRODUCT_WITH_ROOMTYPE && $product_auto_add == 1 && $product_price_addition_type !== null) {
$sql .= ' AND od.`product_price_addition_type` = '. (int)$product_price_addition_type;
}
}
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
}
@@ -1063,11 +1073,16 @@ class OrderCore extends ObjectModel
*
* @return Product total without taxes
*/
public function getTotalProductsWithoutTaxes($products = false, $bookingProducts = null, $product_service_type = null)
{
public function getTotalProductsWithoutTaxes(
$products = false,
$bookingProducts = null,
$product_service_type = null,
$product_auto_add = null,
$product_price_addition_type = null
) {
// update
if (!$products) {
$products = $this->getProductsDetail($bookingProducts, $product_service_type);
$products = $this->getProductsDetail($bookingProducts, $product_service_type, $product_auto_add, $product_price_addition_type);
}
$return = 0;
@@ -1083,11 +1098,16 @@ class OrderCore extends ObjectModel
*
* @return Product total with taxes
*/
public function getTotalProductsWithTaxes($products = false, $bookingProducts = null, $product_service_type = null)
{
public function getTotalProductsWithTaxes(
$products = false,
$bookingProducts = null,
$product_service_type = null,
$product_auto_add = null,
$product_price_addition_type = null
) {
/* Retro-compatibility (now set directly on the validateOrder() method) */
if (!$products) {
$products = $this->getProductsDetail($bookingProducts, $product_service_type);
$products = $this->getProductsDetail($bookingProducts, $product_service_type, $product_auto_add, $product_price_addition_type);
}
$return = 0;

View File

@@ -224,7 +224,9 @@ class OrderReturnCore extends ObjectModel
}
}
if ($roomSelectedServices = $objRoomTypeServiceProductOrderDetail->getSelectedServicesForRoom($bookingRow['id_htl_booking'])) {
if ($roomSelectedServices = $objRoomTypeServiceProductOrderDetail->getSelectedServicesForRoom(
$bookingRow['id_htl_booking']
)) {
if (count($roomSelectedServices['additional_services'])) {
foreach ($roomSelectedServices['additional_services'] as $service) {
if ($service['total_price_tax_incl'] > 0) {

View File

@@ -324,8 +324,6 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$room_extra_demands = array();
$room_additinal_services = array();
$totalConvenienceFeeTE = 0;
$totalConvenienceFeeTI = 0;
$totalDemandsPriceTE = 0;
$totalDemandsPriceTI = 0;
foreach ($order_details as $type_key => $type_value) {
@@ -504,32 +502,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
1,
0
);
$totalConvenienceFeeTI += $cart_htl_data[$type_key]['date_diff'][$date_join]['convenience_fee_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order_obj->id,
0,
0,
$data_v['id_product'],
$data_v['date_from'],
$data_v['date_to'],
$data_v['id_room'],
1,
1,
1,
Product::PRICE_ADDITION_TYPE_INDEPENDENT
);
$totalConvenienceFeeTE += $cart_htl_data[$type_key]['date_diff'][$date_join]['convenience_fee_te'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order_obj->id,
0,
0,
$data_v['id_product'],
$data_v['date_from'],
$data_v['date_to'],
$data_v['id_room'],
1,
0,
1,
Product::PRICE_ADDITION_TYPE_INDEPENDENT
);
$cart_htl_data[$type_key]['date_diff'][$date_join]['additional_services_price_auto_add_ti'] = $objRoomTypeServiceProductOrderDetail->getroomTypeServiceProducts(
$order_obj->id,
0,
@@ -636,16 +609,16 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
// enter extra demands price to the footer total details
$footer['total_extra_demands_ti'] = $totalDemandsPriceTI;
$footer['total_extra_demands_te'] = $totalDemandsPriceTE;
$footer['total_convenience_fee_ti'] = $totalConvenienceFeeTI;
$footer['total_convenience_fee_te'] = $totalConvenienceFeeTE;
}
}
$footer['room_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, true);
$footer['room_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, true);
$footer['service_products_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
$footer['service_products_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
$footer['additional_service_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTE;
$footer['additional_service_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTI;
$footer['room_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, true) + $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM);
$footer['room_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, true) + $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM);
// $footer['service_products_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
// $footer['service_products_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
$footer['additional_service_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 0) + $totalDemandsPriceTE;
$footer['additional_service_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 0) + $totalDemandsPriceTI;
$footer['total_convenience_fee_te'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT);
$footer['total_convenience_fee_ti'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT);
$data = array(
'cart_htl_data' => $cart_htl_data,
'service_product_data' => $service_product_data,

View File

@@ -366,7 +366,12 @@ class AdminAddressesControllerCore extends AdminController
$this->redirect_after = false;
}
$address = new Address();
if ($idAddress = Tools::getValue('id_address')) {
$address = new Address($idAddress);
} else {
$address = new Address();
}
$this->errors = $address->validateController();
// Transform e-mail in id_customer for parent processing

View File

@@ -72,11 +72,11 @@ class AdminCategoriesControllerCore extends AdminController
'name' => array(
'title' => $this->l('Name')
),
'description' => array(
'title' => $this->l('Description'),
'callback' => 'getDescriptionClean',
'orderby' => false
),
// 'description' => array(
// 'title' => $this->l('Description'),
// 'callback' => 'getDescriptionClean',
// 'orderby' => false
// ),
'position' => array(
'title' => $this->l('Position'),
'filter_key' => 'sa!position',

View File

@@ -209,7 +209,7 @@ class AddressControllerCore extends FrontController
$mod = Tools::getValue('mod');
Tools::redirect('index.php?controller='.$back.($mod ? '&back='.$mod : ''));
} else {
Tools::redirect('index.php?controller=address');
Tools::redirect('index.php?controller=address&updated=1');
}
}
$this->errors[] = Tools::displayError('An error occurred while updating your address.');

View File

@@ -57,6 +57,10 @@ class OrderReturnControllerCore extends FrontController
) {
$isCanceled = true;
}
$voucher = '';
if (Validate::isLoadedObject($objCartRule = new CartRule($objOrderReturn->id_return_type))) {
$voucher = $objCartRule->name[$this->context->language->id];
}
$this->context->smarty->assign(
array (
'orderReturnInfo' => (array)$objOrderReturn,
@@ -67,6 +71,7 @@ class OrderReturnControllerCore extends FrontController
'currentStateInfo' => (array) new OrderReturnState($objOrderReturn->state,
$this->context->language->id),
'isRefundCompleted' => $objOrderReturn->hasBeenCompleted(),
'voucher' => $voucher,
)
);

View File

@@ -593,7 +593,11 @@ class ProductControllerCore extends FrontController
$quantity = count($occupancy);
} else {
// when room selection is done using qty, occupancy parameter will contain the number of rooms.
$quantity = $occupancy;
if (is_array($occupancy)) {
$quantity = 1;
} else {
$quantity = $occupancy;
}
}
if ($quantity <= 0) {
@@ -1222,8 +1226,10 @@ class ProductControllerCore extends FrontController
$dateFrom = Tools::getValue('date_from');
$dateTo = Tools::getValue('date_to');
$occupancy = Tools::getValue('occupancy');
if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
if (Configuration::get('PS_FRONT_ROOM_UNIT_SELECTION_TYPE') == HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_OCCUPANCY) {
if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
}
}
$roomTypeDemands = Tools::getValue('room_type_demands');
$roomServiceProducts = Tools::getValue('room_service_products');

View File

@@ -18,6 +18,7 @@
*/
function line_chart_dashinsights(widget_name, chart_details) {
$('#dashinsights_room_nights svg').html('');
nv.addGraph(function () {
var chart = nv.models.lineChart()
.useInteractiveGuideline(true)
@@ -46,6 +47,7 @@ function line_chart_dashinsights(widget_name, chart_details) {
}
function multibar_chart_dotw_dashinsights(widget_name, chart_details) {
$('#dashinsights_days_of_the_week svg').html('');
nv.addGraph(function() {
var chart = nv.models.multiBarHorizontalChart()
.showControls(false)
@@ -71,6 +73,7 @@ function multibar_chart_dotw_dashinsights(widget_name, chart_details) {
}
function multibar_chart_los_dashinsights(widget_name, chart_details) {
$('#dashinsights_length_of_stay svg').html('')
nv.addGraph(function() {
var chart = nv.models.multiBarHorizontalChart()
.showControls(false)

View File

@@ -88,26 +88,30 @@ class DashOccupancy extends Module
'do_count_unavailable' => sprintf('%02d', $occupancyData['count_unavailable']),
);
$dataPieChartBig = array(
array(
'label' => $this->l('Occupied'),
'value' => $occupancyData['count_total']
? ($occupancyData['count_occupied'] / $occupancyData['count_total']) * 100
: 0,
),
array(
'label' => $this->l('Available'),
'value' => $occupancyData['count_total']
? ($occupancyData['count_available'] / $occupancyData['count_total']) * 100
: 0,
),
array(
'label' => $this->l('Unavailable'),
'value' => $occupancyData['count_total']
? ($occupancyData['count_unavailable'] / $occupancyData['count_total']) * 100
: 0,
),
);
if ($occupancyData['count_total']) {
$dataPieChartBig = array(
array(
'label' => $this->l('Occupied'),
'value' => $occupancyData['count_total']
? ($occupancyData['count_occupied'] / $occupancyData['count_total']) * 100
: 0,
),
array(
'label' => $this->l('Available'),
'value' => $occupancyData['count_total']
? ($occupancyData['count_available'] / $occupancyData['count_total']) * 100
: 0,
),
array(
'label' => $this->l('Unavailable'),
'value' => $occupancyData['count_total']
? ($occupancyData['count_unavailable'] / $occupancyData['count_total']) * 100
: 0,
),
);
} else {
$dataPieChartBig = array();
}
return array(
'data_value' => $dataValue,

View File

@@ -18,7 +18,8 @@
*/
function pie_chart_occupancy(widget_name, chart_details) {
nv.addGraph(function() {
$('#availablePieChart svg').html('');
occupacygraph = nv.addGraph(function() {
var chart = nv.models.pieChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })

View File

@@ -134,24 +134,21 @@ class HotelBranchInformation extends ObjectModel
$context = Context::getContext();
}
/* Query definition */
$query = 'REPLACE INTO `'._DB_PREFIX_.'htl_access` (`id_profile`, `id_hotel`, `access`)';
$query .= ' VALUES '.'(1, '.(int)$idHotel.', 1)';
/* Profile selection */
$profiles = Db::getInstance()->executeS('SELECT `id_profile` FROM '._DB_PREFIX_.'profile WHERE `id_profile` != 1');
if (!$profiles || empty($profiles)) {
return true;
}
/* Query definition */
$query = 'REPLACE INTO `'._DB_PREFIX_.'htl_access` (`id_profile`, `id_hotel`, `access`)';
$query .= ' VALUES '.'(1, '.(int)$idHotel.', 1),';
foreach ($profiles as $profile) {
$access = 0;
if (isset($context->employee->id_profile)) {
$access = ($profile['id_profile'] == $context->employee->id_profile) ? 1 : 0;
}
foreach ($profiles as $profile) {
$access = 0;
if (isset($context->employee->id_profile)) {
$access = ($profile['id_profile'] == $context->employee->id_profile) ? 1 : 0;
$query .= ', ('.(int)$profile['id_profile'].', '.(int)$idHotel.', '.(int)$access.')';
}
$query .= ' ('.(int)$profile['id_profile'].', '.(int)$idHotel.', '.(int)$access.'),';
}
$query = trim($query, ', ');
return Db::getInstance()->execute($query);
}
@@ -754,6 +751,7 @@ class HotelBranchInformation extends ObjectModel
while ($idCategory
&& !in_array($idCategory, $hotelCategories)
&& $idCategory != Configuration::get('PS_HOME_CATEGORY')
&& $idCategory != Configuration::get('PS_LOCATIONS_CATEGORY')
) {
if ($objCategory->delete()) {
// continue deleting the unused parent hotel categories
@@ -782,14 +780,18 @@ class HotelBranchInformation extends ObjectModel
} else {
$idsHotel = array($idsHotel);
}
$restriction = ' AND ';
if (count($idsHotel)) {
if ($alias) {
$alias .= '.';
}
if ($alias) {
$alias .= '.';
$identifier = "`$identifier`";
$restriction .= $alias.$identifier.' IN ('.implode(', ', $idsHotel).') ';
} else {
$restriction .= 1;
}
$identifier = "`$identifier`";
$restriction = ' AND '.$alias.$identifier.' IN ('.implode(', ', $idsHotel).') ';
return $restriction;
}

View File

@@ -24,17 +24,17 @@ class HotelHelper
{
$objModule = new HotelreservationSystem();
$jsVars = array(
'display_name' => $objModule->l('Display', 'HotelHelper', fasle, true),
'records_name' => $objModule->l('records per page', 'HotelHelper', fasle, true),
'no_product' => $objModule->l('No records found', 'HotelHelper', fasle, true),
'show_page' => $objModule->l('Showing page', 'HotelHelper', fasle, true),
'show_of' => $objModule->l('of', 'HotelHelper', fasle, true),
'no_record' => $objModule->l('No records available', 'HotelHelper', fasle, true),
'filter_from' => $objModule->l('filtered from', 'HotelHelper', fasle, true),
't_record' => $objModule->l('total records', 'HotelHelper', fasle, true),
'search_item' => $objModule->l('Search', 'HotelHelper', fasle, true),
'p_page' => $objModule->l('Previous', 'HotelHelper', fasle, true),
'n_page' => $objModule->l('Next', 'HotelHelper', fasle, true),
'display_name' => $objModule->l('Display', 'HotelHelper', false, true),
'records_name' => $objModule->l('records per page', 'HotelHelper', false, true),
'no_product' => $objModule->l('No records found', 'HotelHelper', false, true),
'show_page' => $objModule->l('Showing page', 'HotelHelper', false, true),
'show_of' => $objModule->l('of', 'HotelHelper', false, true),
'no_record' => $objModule->l('No records available', 'HotelHelper', false, true),
'filter_from' => $objModule->l('filtered from', 'HotelHelper', false, true),
't_record' => $objModule->l('total records', 'HotelHelper', false, true),
'search_item' => $objModule->l('Search', 'HotelHelper', false, true),
'p_page' => $objModule->l('Previous', 'HotelHelper', false, true),
'n_page' => $objModule->l('Next', 'HotelHelper', false, true),
);
Media::addJsDef($jsVars);

View File

@@ -157,6 +157,7 @@ class HotelOrderRefundRules extends ObjectModel
1,
1
);
$paidAmount = $objHtlBooking->total_paid_amount + $totalDemandsPrice + $totalServicesPrice;
if ($refundRules = $objHtlRefundRules->getHotelRefundRules($objHtlBooking->id_hotel, 0, 1)) {
$orderCurrency = $objOrder->id_currency;
@@ -175,7 +176,6 @@ class HotelOrderRefundRules extends ObjectModel
$ruleApplied = false;
foreach ($refundRules as $refRule) {
if ($daysBeforeCancel >= $refRule['days']) {
$paidAmount = $objHtlBooking->total_paid_amount + $totalDemandsPrice + $totalServicesPrice;
if ($objOrder->is_advance_payment) {
$refundValue = $refRule['deduction_value_adv_pay'];
} else {
@@ -218,12 +218,12 @@ class HotelOrderRefundRules extends ObjectModel
}
if (!$ruleApplied) {
$bookingCancellationDetail['cancelation_charge'] = ($objHtlBooking->total_price_tax_incl + $totalDemandsPrice);
$bookingCancellationDetail['cancelation_charge'] = $paidAmount;
$bookingCancellationDetail['reduction_type'] = HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE;
$bookingCancellationDetail['reduction_value'] = 100;
}
} else {
$bookingCancellationDetail['cancelation_charge'] = ($objHtlBooking->total_price_tax_incl + $totalDemandsPrice);
$bookingCancellationDetail['cancelation_charge'] = $paidAmount;
$bookingCancellationDetail['reduction_type'] = HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE;
$bookingCancellationDetail['reduction_value'] = 100;
}

View File

@@ -39,7 +39,7 @@ class HotelRoomType extends ObjectModel
'fields' => array(
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'id_hotel' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'adults' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'adults' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'default' => 2),
'children' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'max_adults' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'default' => 2),
'max_children' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),

View File

@@ -63,19 +63,21 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
$objRoomTypeServiceProductCartDetail->id_cart = $idCart;
}
$updateQty = $quantity - $objRoomTypeServiceProductCartDetail->quantity;
if ($updateQty = $quantity - $objRoomTypeServiceProductCartDetail->quantity) {
if (Product::getProductPriceCalculation($idProduct) == Product::PRICE_CALCULATION_METHOD_PER_DAY) {
$objHotelCartBookingData = new HotelCartBookingData($idHtlCartData);
$numdays = HotelHelper::getNumberOfDays($objHotelCartBookingData->date_from, $objHotelCartBookingData->date_to);
$updateQty *= $numdays;
if (Product::getProductPriceCalculation($idProduct) == Product::PRICE_CALCULATION_METHOD_PER_DAY) {
$objHotelCartBookingData = new HotelCartBookingData($idHtlCartData);
$numdays = HotelHelper::getNumberOfDays($objHotelCartBookingData->date_from, $objHotelCartBookingData->date_to);
$updateQty *= $numdays;
}
$way = $updateQty > 0 ? 'up' : 'down';
$objRoomTypeServiceProductCartDetail->quantity = $quantity;
if ($objRoomTypeServiceProductCartDetail->save()) {
$objCart = new Cart($idCart);
return $objCart->updateQty((int)abs($updateQty), $idProduct, null, false, $way);
}
$way = $updateQty > 0 ? 'up' : 'down';
$objRoomTypeServiceProductCartDetail->quantity = $quantity;
if ($objRoomTypeServiceProductCartDetail->save()) {
$objCart = new Cart($idCart);
return $objCart->updateQty((int)abs($updateQty), $idProduct, null, false, $way);
}
} else {
return true;
}
return false;

View File

@@ -445,9 +445,11 @@ class AdminAddHotelController extends ModuleAdminController
$objAddress->id_state = $state;
$objAddress->city = $city;
$objAddress->postcode = $zipcode;
$objAddress->alias = Tools::getValue('hotel_name_'.$defaultLangId);
$objAddress->lastname = Tools::getValue('hotel_name_'.$defaultLangId);
$objAddress->firstname = Tools::getValue('hotel_name_'.$defaultLangId);
$hotelName = $objHotelBranch->hotel_name[$defaultLangId];
$objAddress->alias = $hotelName;
$hotelName = preg_replace('/[0-9!<>,;?=+()@#"°{}_$%:]*$/u', '', $hotelName);
$objAddress->lastname = $hotelName;
$objAddress->firstname = $hotelName;
$objAddress->address1 = $address;
$objAddress->phone = $phone;
@@ -515,6 +517,7 @@ class AdminAddHotelController extends ModuleAdminController
foreach ($unusedCategs as $idCategory) {
if (!in_array($idCategory, $hotelCategories)
&& $idCategory != Configuration::get('PS_HOME_CATEGORY')
&& $idCategory != Configuration::get('PS_LOCATIONS_CATEGORY')
) {
$objCategory = new Category($idCategory);
$objCategory->delete();

View File

@@ -113,6 +113,8 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
1
);
$id_hotel = reset($htl_info)['id'];
} else {
$id_hotel = 0;
}
}
@@ -280,13 +282,15 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
'id_guest' => $this->context->cookie->id_guest,
);
$this->initSearchFormData();
if ($this->booking_product) {
$this->assignRoomBookingForm();
} else {
$this->assignServiceProductsForm();
}
if (count($this->tpl_view_vars['hotel_list'])) {
if ($this->booking_product) {
$this->assignRoomBookingForm();
} else {
$this->assignServiceProductsForm();
}
$this->initCartData();
$this->initCartData();
}
return parent::renderView();
}
@@ -615,8 +619,10 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
$date_from = Tools::getValue('date_from');
$date_to = Tools::getValue('date_to');
$occupancy = Tools::getValue('occupancy');
if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
if (Configuration::get('PS_BACKOFFICE_ROOM_BOOKING_TYPE') == HotelBookingDetail::PS_ROOM_UNIT_SELECTION_TYPE_OCCUPANCY) {
if (!Validate::isOccupancy($occupancy)) {
$occupancy = array();
}
}
$date_from = date("Y-m-d", strtotime($date_from));

View File

@@ -164,7 +164,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
}
$this->fields_list = array(
'id_order_return' => array(
'title' => $this->l('Refund ID'),
'title' => $this->l('Request ID'),
'align' => 'center',
'class' => 'fixed-width-xs',
),
@@ -254,7 +254,8 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
'refundStatuses' => $refundStatuses,
'isRefundCompleted' => $objOrderReturn->hasBeenCompleted(),
'paymentMethods' => $paymentMethods,
'name_controller' => Tools::getValue('controller')
'name_controller' => Tools::getValue('controller'),
'info_icon_path' => $this->context->link->getMediaLink(_MODULE_DIR_.'hotelreservationsystem/views/img/Slices/icon-info.svg')
)
);
@@ -627,6 +628,10 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
public function setMedia()
{
parent::setMedia();
$this->addJqueryUI('ui.tooltip', 'base', true);
$this->addJs(_MODULE_DIR_.$this->module->name.'/views/js/admin/wk_refund_request.js');
$this->addCSS(_MODULE_DIR_.$this->module->name.'/views/css/admin/wk_refund_request.css');
}
}

View File

@@ -0,0 +1,29 @@
/**
* 2010-2023 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-2023 Webkul IN
* @license LICENSE.txt
*/
body.adminorderrefundrequests .ui-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;
}

View File

@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="8" cy="8" r="8" fill="#7EC77B"/>
<path d="M8.06536 3C8.30937 3 8.51561 3.07032 8.6841 3.21097C8.85839 3.34693 8.94553 3.51336 8.94553 3.71027C8.94553 3.90717 8.85839 4.07595 8.6841 4.2166C8.51561 4.35724 8.30937 4.42757 8.06536 4.42757C7.82135 4.42757 7.6122 4.35724 7.43791 4.2166C7.26362 4.07595 7.17647 3.90717 7.17647 3.71027C7.17647 3.51336 7.26071 3.34693 7.42919 3.21097C7.60349 3.07032 7.81554 3 8.06536 3ZM8.78867 6.3685V11.5443C8.78867 11.9475 8.82353 12.2171 8.89325 12.353C8.96877 12.4843 9.07625 12.5827 9.21569 12.6484C9.36093 12.714 9.62237 12.7468 10 12.7468V13H6.122V12.7468C6.51126 12.7468 6.77269 12.7164 6.90632 12.6554C7.03994 12.5945 7.14452 12.4937 7.22004 12.353C7.30138 12.2124 7.34205 11.9428 7.34205 11.5443V9.06188C7.34205 8.36334 7.3159 7.91092 7.26362 7.70464C7.22295 7.55462 7.15904 7.45148 7.0719 7.39522C6.98475 7.33427 6.86565 7.3038 6.7146 7.3038C6.55192 7.3038 6.35439 7.33896 6.122 7.40928L6 7.15612L8.40523 6.3685H8.78867Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -18,6 +18,46 @@
*/
$(document).ready(function() {
// initialize tootip for room price
if ($('#rooms_refund_info .price_info').length) {
$('#rooms_refund_info .price_info').each(function (i, element) {
$(this).find('img').tooltip({
content: $(this).closest('td').find('.price_info_container').html(),
items: "span",
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();
});
});
}
});
});
}
$(document).on('change', '#refundTransactionAmount', function() {
if ($(this).is(':checked')) {
$(".refund_transaction_fields").show(200);

View File

@@ -1,109 +1,139 @@
<div class="row">
<div class="col-sm-4">
<div class="panel">
<div class="panel-heading">
<i class="icon-info"></i> {l s='Booking Form' mod='hotelreservationsystem'}
</div>
<div class="panel-body">
<form method="post" action="">
<div class="row">
{* <div class="form-group col-sm-12">
<label for="booking_product" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Product type' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<select name="booking_product" class="form-control" id="booking_product">
<option value="1" {if isset($booking_product) && $booking_product == 1}selected{/if}>{l s='Rooms'}</option>
<option value="0" {if isset($booking_product) && $booking_product == 0}selected{/if}>{l s='Service Products'}</option>
</select>
</div>
</div> *}
<div class="form-group col-sm-12">
<label for="date_from" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Check-In' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<input type="text" name="from_date" class="form-control" id="from_date" {if isset($date_from)}value="{$date_from|escape:'htmlall':'UTF-8'|date_format:"%d-%m-%Y"}"{/if}>
<input type="hidden" name="date_from" id="date_from" {if isset($date_from)}value="{$date_from|escape:'htmlall':'UTF-8'}"{/if}>
<input type="hidden" name="search_date_from" id="search_date_from" {if isset($date_from)}value="{$date_from|escape:'htmlall':'UTF-8'}"{/if}>
</div>
</div>
<div class="form-group col-sm-12">
<label for="to_date" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Check-Out' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<input type="text" name="to_date" class="form-control" id="to_date" {if isset($date_to)}value="{$date_to|escape:'htmlall':'UTF-8'|date_format:"%d-%m-%Y"}"{/if}>
<input type="hidden" name="date_to" id="date_to" {if isset($date_to)}value="{$date_to|escape:'htmlall':'UTF-8'}"{/if}>
<input type="hidden" name="search_date_to" id="search_date_to" {if isset($date_to)}value="{$date_to|escape:'htmlall':'UTF-8'}"{/if}>
</div>
</div>
<div class="form-group col-sm-12">
<label for="id_hotel" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Hotel Name' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<select name="id_hotel" class="form-control" id="id_hotel">
{if isset($hotel_list) && $hotel_list}
{foreach $hotel_list as $name_val}
<option value="{$name_val['id']|escape:'htmlall':'UTF-8'}" {if isset($id_hotel) && ($name_val['id'] == $id_hotel)}selected{/if}>{$name_val['hotel_name']|escape:'htmlall':'UTF-8'}</option>
{/foreach}
{else}
{l s='No hotels available' mod='hotelreservationsystem'}
{/if}
</select>
<input type="hidden" name="search_id_hotel" id="search_id_hotel" {if isset($id_hotel)}value="{$id_hotel|escape:'htmlall':'UTF-8'}"{/if}>
</div>
</div>
{if $is_occupancy_wise_search}
<div class="form-group col-sm-12">
<label for="occupancy" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Occupancy' mod='hotelreservationsystem'}</span>
{if $hotel_list|count > 0}
<div class="col-sm-4">
<div class="panel">
<div class="panel-heading">
<i class="icon-info"></i> {l s='Booking Form' mod='hotelreservationsystem'}
</div>
<div class="panel-body">
<form method="post" action="">
<div class="row">
{* <div class="form-group col-sm-12">
<label for="booking_product" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Product type' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<div class="dropdown">
<button class="booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy" id="search_occupancy" type="button">
<span class="">{if (isset($occupancy_adults) && $occupancy_adults)}{$occupancy_adults} {if $occupancy_adults > 1}{l s='Adults'}{else}{l s='Adult'}{/if}, {if isset($occupancy_children) && $occupancy_children}{$occupancy_children} {if $occupancy_children > 1} {l s='Children'}{else}{l s='Child'}{/if}, {/if}{$occupancy|count} {if $occupancy|count > 1}{l s='Rooms'}{else}{l s='Room'}{/if}{else}{l s='1 Adult, 1 Room'}{/if}</span>
</button>
<input type="hidden" class="max_avail_type_qty" value="{if isset($total_available_rooms)} {$total_available_rooms|escape:'html':'UTF-8'}{/if}">
<div class="dropdown-menu booking_occupancy_wrapper well well-sm">
<div class="booking_occupancy_inner row">
{if isset($occupancy) && $occupancy}
{assign var=countRoom value=1}
<hr class="occupancy-info-separator col-sm-12">
{foreach from=$occupancy key=key item=$room_occupancy name=occupancyInfo}
<div class="occupancy_info_block" occ_block_index="{$key|escape:'htmlall':'UTF-8'}">
<div class="occupancy_info_head col-sm-12"><label class="room_num_wrapper">{l s='Room'} - {$countRoom|escape:'htmlall':'UTF-8'} </label>{if !$smarty.foreach.occupancyInfo.first}<a class="remove-room-link pull-right" href="#">{l s='Remove'}</a>{/if}</div>
<select name="booking_product" class="form-control" id="booking_product">
<option value="1" {if isset($booking_product) && $booking_product == 1}selected{/if}>{l s='Rooms'}</option>
<option value="0" {if isset($booking_product) && $booking_product == 0}selected{/if}>{l s='Service Products'}</option>
</select>
</div>
</div> *}
<div class="form-group col-sm-12">
<label for="date_from" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Check-In' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<input type="text" name="from_date" class="form-control" id="from_date" {if isset($date_from)}value="{$date_from|escape:'htmlall':'UTF-8'|date_format:"%d-%m-%Y"}"{/if}>
<input type="hidden" name="date_from" id="date_from" {if isset($date_from)}value="{$date_from|escape:'htmlall':'UTF-8'}"{/if}>
<input type="hidden" name="search_date_from" id="search_date_from" {if isset($date_from)}value="{$date_from|escape:'htmlall':'UTF-8'}"{/if}>
</div>
</div>
<div class="form-group col-sm-12">
<label for="to_date" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Check-Out' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<input type="text" name="to_date" class="form-control" id="to_date" {if isset($date_to)}value="{$date_to|escape:'htmlall':'UTF-8'|date_format:"%d-%m-%Y"}"{/if}>
<input type="hidden" name="date_to" id="date_to" {if isset($date_to)}value="{$date_to|escape:'htmlall':'UTF-8'}"{/if}>
<input type="hidden" name="search_date_to" id="search_date_to" {if isset($date_to)}value="{$date_to|escape:'htmlall':'UTF-8'}"{/if}>
</div>
</div>
<div class="form-group col-sm-12">
<label for="id_hotel" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Hotel Name' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<select name="id_hotel" class="form-control" id="id_hotel">
{if isset($hotel_list) && $hotel_list}
{foreach $hotel_list as $name_val}
<option value="{$name_val['id']|escape:'htmlall':'UTF-8'}" {if isset($id_hotel) && ($name_val['id'] == $id_hotel)}selected{/if}>{$name_val['hotel_name']|escape:'htmlall':'UTF-8'}</option>
{/foreach}
{else}
{l s='No hotels available' mod='hotelreservationsystem'}
{/if}
</select>
<input type="hidden" name="search_id_hotel" id="search_id_hotel" {if isset($id_hotel)}value="{$id_hotel|escape:'htmlall':'UTF-8'}"{/if}>
</div>
</div>
{if $is_occupancy_wise_search}
<div class="form-group col-sm-12">
<label for="occupancy" class="control-label col-sm-4 required">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Occupancy' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<div class="dropdown">
<button class="booking_guest_occupancy btn btn-default btn-left btn-block input-occupancy" id="search_occupancy" type="button">
<span class="">{if (isset($occupancy_adults) && $occupancy_adults)}{$occupancy_adults} {if $occupancy_adults > 1}{l s='Adults'}{else}{l s='Adult'}{/if}, {if isset($occupancy_children) && $occupancy_children}{$occupancy_children} {if $occupancy_children > 1} {l s='Children'}{else}{l s='Child'}{/if}, {/if}{$occupancy|count} {if $occupancy|count > 1}{l s='Rooms'}{else}{l s='Room'}{/if}{else}{l s='1 Adult, 1 Room'}{/if}</span>
</button>
<input type="hidden" class="max_avail_type_qty" value="{if isset($total_available_rooms)} {$total_available_rooms|escape:'html':'UTF-8'}{/if}">
<div class="dropdown-menu booking_occupancy_wrapper well well-sm">
<div class="booking_occupancy_inner row">
{if isset($occupancy) && $occupancy}
{assign var=countRoom value=1}
<hr class="occupancy-info-separator col-sm-12">
{foreach from=$occupancy key=key item=$room_occupancy name=occupancyInfo}
<div class="occupancy_info_block" occ_block_index="{$key|escape:'htmlall':'UTF-8'}">
<div class="occupancy_info_head col-sm-12"><label class="room_num_wrapper">{l s='Room'} - {$countRoom|escape:'htmlall':'UTF-8'} </label>{if !$smarty.foreach.occupancyInfo.first}<a class="remove-room-link pull-right" href="#">{l s='Remove'}</a>{/if}</div>
<div class="col-sm-12">
<div class="row">
<div class="form-group col-xs-6 occupancy_count_block">
<label>{l s='Adults'}</label>
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][adults]" value="{$room_occupancy['adults']|escape:'htmlall':'UTF-8'}" min="1">
</div>
<div class="form-group col-xs-6 occupancy_count_block">
<label>{l s='Children'} <span class="label-desc-txt"></span></label>
<input type="number" class="form-control num_occupancy num_children" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][children]" value="{$room_occupancy['children']|escape:'htmlall':'UTF-8'}" min="0" {if $max_child_in_room}max="{$max_child_in_room}"{/if}>
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
</div>
</div>
<div class="row children_age_info_block" {if !$room_occupancy['children']}style="display:none"{/if}>
<div class="form-group col-sm-12">
<label class="">{l s='All Children'}</label>
<div class="">
<div class="row children_ages">
{if isset($room_occupancy['child_ages']) && $room_occupancy['child_ages']}
{foreach $room_occupancy['child_ages'] as $childAge}
<div class="form-group col-xs-12 col-sm-12 col-md-6 col-lg-6">
<select class="guest_child_age room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][child_ages][]">
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select age'}</option>
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1'}</option>
{for $age=1 to ($max_child_age-1)}
<option value="{$age|escape:'htmlall':'UTF-8'}" {if $childAge == $age}selected{/if}>{$age|escape:'htmlall':'UTF-8'}</option>
{/for}
</select>
</div>
{/foreach}
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="occupancy-info-separator col-sm-12">
{assign var=countRoom value=$countRoom+1}
{/foreach}
{else}
<div class="occupancy_info_block col-sm-12" occ_block_index="0">
<div class="occupancy_info_head col-sm-12"><label class="room_num_wrapper">{l s='Room - 1'}</label></div>
<div class="col-sm-12">
<div class="row">
<div class="form-group col-xs-6 occupancy_count_block">
<label>{l s='Adults'}</label>
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][adults]" value="{$room_occupancy['adults']|escape:'htmlall':'UTF-8'}" min="1">
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="1" min="1">
</div>
<div class="form-group col-xs-6 occupancy_count_block">
<label>{l s='Children'} <span class="label-desc-txt"></span></label>
<input type="number" class="form-control num_occupancy num_children" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][children]" value="{$room_occupancy['children']|escape:'htmlall':'UTF-8'}" 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" {if $max_child_in_room}max="{$max_child_in_room}"{/if}>
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
</div>
</div>
<div class="row children_age_info_block" {if !$room_occupancy['children']}style="display:none"{/if}>
<div class="row children_age_info_block" style="display:none">
<div class="form-group col-sm-12">
<label class="">{l s='All Children'}</label>
<div class="">
<div class="row children_ages">
{if isset($room_occupancy['child_ages']) && $room_occupancy['child_ages']}
{foreach $room_occupancy['child_ages'] as $childAge}
<div class="form-group col-xs-12 col-sm-12 col-md-6 col-lg-6">
<select class="guest_child_age room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][child_ages][]">
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select age'}</option>
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1'}</option>
{for $age=1 to ($max_child_age-1)}
<option value="{$age|escape:'htmlall':'UTF-8'}" {if $childAge == $age}selected{/if}>{$age|escape:'htmlall':'UTF-8'}</option>
{/for}
</select>
</div>
{/foreach}
{/if}
</div>
</div>
</div>
@@ -111,97 +141,73 @@
</div>
</div>
<hr class="occupancy-info-separator col-sm-12">
{assign var=countRoom value=$countRoom+1}
{/foreach}
{else}
<div class="occupancy_info_block col-sm-12" occ_block_index="0">
<div class="occupancy_info_head col-sm-12"><label class="room_num_wrapper">{l s='Room - 1'}</label></div>
<div class="col-sm-12">
<div class="row">
<div class="form-group col-xs-6 occupancy_count_block">
<label>{l s='Adults'}</label>
<input type="number" class="form-control num_occupancy num_adults" name="occupancy[0][adults]" value="1" min="1">
</div>
<div class="form-group col-xs-6 occupancy_count_block">
<label>{l s='Children'} <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}>
({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})
</div>
</div>
<div class="row children_age_info_block" style="display:none">
<div class="form-group col-sm-12">
<label class="">{l s='All Children'}</label>
<div class="">
<div class="row children_ages">
</div>
</div>
</div>
</div>
</div>
</div>
<hr class="occupancy-info-separator col-sm-12">
{/if}
</div>
<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>
{/if}
</div>
<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>
</div>
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="form-group col-sm-12">
<label for="id_room_type" class="control-label col-sm-4">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Room Type' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<select class="form-control" name="id_room_type" id="id_room_type">
{if isset($id_room_type)}
<option value='0' {if ($id_room_type == 0)}selected{/if}>{l s='All Types' mod='hotelreservationsystem'}</option>
{if (isset($all_room_type) && $all_room_type)}
{foreach $all_room_type as $val_type}
<option value="{$val_type['id_product']|escape:'htmlall':'UTF-8'}" {if ($val_type['id_product'] == $id_room_type)}selected{/if}>{$val_type['room_type']|escape:'htmlall':'UTF-8'}</option>
{/foreach}
{/if}
<div class="form-group col-sm-12">
<label for="id_room_type" class="control-label col-sm-4">
<span title="" data-toggle="tooltip" class="label-tooltip">{l s='Room Type' mod='hotelreservationsystem'}</span>
</label>
<div class="col-sm-8">
<select class="form-control" name="id_room_type" id="id_room_type">
{if isset($id_room_type)}
<option value='0' {if ($id_room_type == 0)}selected{/if}>{l s='All Types' mod='hotelreservationsystem'}</option>
{if (isset($all_room_type) && $all_room_type)}
{foreach $all_room_type as $val_type}
<option value="{$val_type['id_product']|escape:'htmlall':'UTF-8'}" {if ($val_type['id_product'] == $id_room_type)}selected{/if}>{$val_type['room_type']|escape:'htmlall':'UTF-8'}</option>
{/foreach}
{/if}
{/if}
{/if}
</select>
<input type="hidden" name="search_id_room_type" id="search_id_room_type" value="{$id_room_type}">
</select>
<input type="hidden" name="search_id_room_type" id="search_id_room_type" value="{$id_room_type}">
</div>
</div>
<div class="col-sm-12">
<button id="search_hotel_list" name="search_hotel_list" type="submit" class="btn btn-primary pull-right">
<i class="icon-search"></i>&nbsp;&nbsp;{l s='Search' mod='hotelreservationsystem'}
</button>
</div>
</div>
<div class="col-sm-12">
<button id="search_hotel_list" name="search_hotel_list" type="submit" class="btn btn-primary pull-right">
<i class="icon-search"></i>&nbsp;&nbsp;{l s='Search' mod='hotelreservationsystem'}
</button>
</div>
</div>
</form>
</div>
</div>
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
<div class="panel">
{include file="./_partials/search-stats.tpl"}
</div>
{/if}
</div>
<div class="col-sm-8">
<div class="panel">
<div class="panel-heading">
<i class="icon-info"></i> {if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if }
<button type="button" class="btn btn-primary" id="cart_btn" data-toggle="modal" data-target="#cartModal"><i class="icon-shopping-cart"></i> {l s='Cart' mod='hotelreservationsystem'} <span class="badge" id="cart_record">{$total_products_in_cart}</span></button>
</form>
</div>
</div>
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
<div id='fullcalendar'></div>
{else}
<div class="panel-body">
{include file="./_partials/service-products.tpl"}
<div class="panel">
{include file="./_partials/search-stats.tpl"}
</div>
{/if}
</div>
</div>
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
{if isset($booking_data) && $booking_data}
{include file="./_partials/booking-rooms.tpl"}
<div class="col-sm-8">
<div class="panel">
<div class="panel-heading">
<i class="icon-info"></i> {if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if }
<button type="button" class="btn btn-primary" id="cart_btn" data-toggle="modal" data-target="#cartModal"><i class="icon-shopping-cart"></i> {l s='Cart' mod='hotelreservationsystem'} <span class="badge" id="cart_record">{$total_products_in_cart}</span></button>
</div>
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
<div id='fullcalendar'></div>
{else}
<div class="panel-body">
{include file="./_partials/service-products.tpl"}
</div>
{/if}
</div>
</div>
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
{if isset($booking_data) && $booking_data}
{include file="./_partials/booking-rooms.tpl"}
{/if}
{/if}
{else}
<p class="alert alert-warning">
{l s='No hotels available for booking'}
</p>
{/if}
</div>

View File

@@ -109,7 +109,7 @@
</label>
</div>
<div class="col-sm-12">
<table class="table">
<table class="table" id="rooms_refund_info">
<tr>
{if !$isRefundCompleted}
<th></th>
@@ -118,9 +118,8 @@
<th>{l s='Room type' mod='hotelreservationsystem'}</th>
<th>{l s='Hotel' mod='hotelreservationsystem'}</th>
<th>{l s='Duration' mod='hotelreservationsystem'}</th>
<th>{l s='Total room cost (tax incl.)'}</th>
<th>{l s='Room amount paid (tax incl.)'}</th>
<th>{l s='Additional services amount paid (tax incl.)'}</th>
<th>{l s='Total cost (tax incl.)'}</th>
<th>{l s='Total paid amount (tax incl.)'}</th>
{if !$isRefundCompleted}
<th>{l s='Rooms cancelation charges' mod='hotelreservationsystem'}</th>
{/if}
@@ -137,14 +136,43 @@
<td>{$booking['room_type_name']|escape:'htmlall':'UTF-8'}</td>
<td>{$booking['hotel_name']|escape:'htmlall':'UTF-8'}</td>
<td>{$booking['date_from']|date_format:"%d-%m-%Y"} {l s='To' mod='hotelreservationsystem'} {$booking['date_to']|date_format:"%d-%m-%Y"}</td>
<td>{displayPrice price=$booking['total_price_tax_incl'] currency=$orderCurrency['id']}</td>
<td>{displayPrice price=$booking['room_paid_amount'] currency=$orderCurrency['id']}</td>
<td>{displayPrice price=$booking['extra_service_total_paid_amount'] currency=$orderCurrency['id']}</td>
<td>
{displayPrice price=($booking['total_price_tax_incl'] + $booking['extra_service_total_price_tax_incl']) currency=$orderCurrency['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 cost:'}</label>
<span class="pull-right">{displayPrice price=$booking['total_price_tax_incl'] currency=$orderCurrency['id']}</span>
</div>
<div>
<label>{l s='Services cost:'}</label>
<span class="pull-right">{displayPrice price=$booking['extra_service_total_price_tax_incl'] currency=$orderCurrency['id']}</span>
</div>
</div>
</td>
<td>
{displayPrice price=($booking['room_paid_amount'] + $booking['extra_service_total_paid_amount']) currency=$orderCurrency['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 paid amount:'}</label>
<span class="pull-right">{displayPrice price=$booking['room_paid_amount'] currency=$orderCurrency['id']}</span>
</div>
<div>
<label>{l s='Services paid amount:'}</label>
<span class="pull-right">{displayPrice price=$booking['extra_service_total_paid_amount'] currency=$orderCurrency['id']}</span>
</div>
</div>
</td>
{if !$isRefundCompleted}
<td>
{displayPrice price=$booking['cancelation_charge'] currency=$orderCurrency['id']}
{if $booking['reduction_type'] == HotelOrderRefundRules::WK_REFUND_RULE_PAYMENT_TYPE_PERCENTAGE}
<p class="help-block">{Tools::ps_round($booking['reduction_value'])}{l s='% of'} {displayPrice price=$booking['total_price_tax_incl'] currency=$orderCurrency['id']}</p>
<p class="help-block">{Tools::ps_round($booking['reduction_value'], 2)}{l s='% of'} {displayPrice price=($booking['total_price_tax_incl'] + $booking['extra_service_total_price_tax_incl']) currency=$orderCurrency['id']}</p>
{/if}
</td>
{/if}
@@ -155,7 +183,7 @@
{displayPrice price=$booking['refunded_amount'] currency=$orderCurrency['id']}
{else}
<span class="input-group-addon">{$orderCurrency['sign']|escape:'html':'UTF-8'}</span>
<input placeholder="" type="text" name="refund_amounts[{$booking['id_order_return_detail']|escape:'html':'UTF-8'}]" value="{$booking['room_paid_amount'] + $booking['extra_service_total_paid_amount'] - $booking['cancelation_charge']}">
<input placeholder="" type="text" name="refund_amounts[{$booking['id_order_return_detail']|escape:'html':'UTF-8'}]" value="{if ($booking['room_paid_amount'] + $booking['extra_service_total_paid_amount'] - $booking['cancelation_charge']) > 0}{Tools::ps_round(($booking['room_paid_amount'] + $booking['extra_service_total_paid_amount'] - $booking['cancelation_charge']), 2)}{else}0{/if}">
<span class="input-group-addon">{l s='tax incl.' mod='hotelreservationsystem'}</span>
{/if}
</div>

View File

@@ -212,7 +212,7 @@
#search_occupancy_wrapper {
border: none;
max-height: 400px;
min-width: 250px;
min-width: 280px;
overflow: auto;
box-shadow: 0 8px 25px -4px rgba(0,0,0,0.39);
left: 0px;
@@ -249,15 +249,6 @@
font-size: 12px;
color: #FF4343;
text-align: right;}
#search_occupancy_wrapper .occupancy_info_block {
display: grid;
grid-template-columns: repeat(2, 1fr); }
#search_occupancy_wrapper .occupancy_info_block .occupancy_count_block{
display: grid;}
#search_occupancy_wrapper .occupancy_info_block .occupancy_count_block > div{
align-self: end;}
#search_occupancy_wrapper .occupancy_info_block .children_age_info_block {
grid-column: 1 / 3}
#search_occupancy_wrapper .occupancy_info_block .occupancy_count {
padding: 14px;
border: 1px solid #E1E3E7;
@@ -286,7 +277,7 @@
#search_occupancy_wrapper .children_ages {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 5px;
gap: 8px;
justify-content: space-between;
}
#search_occupancy_wrapper .children_ages select {

View File

@@ -349,43 +349,48 @@ $(document).ready(function() {
occupancy_block += '<div class="occupancy-room-block">';
occupancy_block += '<div class="occupancy_info_head"><span class="room_num_wrapper">'+ room_txt + ' - ' + countRooms + '</span><a class="remove-room-link pull-right" href="#">' + remove_txt + '</a></div>';
occupancy_block += '<div class="occupancy_info_block" occ_block_index="'+roomBlockIndex+'">';
occupancy_block += '<div class="form-group occupancy_count_block">';
occupancy_block += '<label>' + adults_txt + '</label>';
occupancy_block += '<div>';
occupancy_block += '<input type="hidden" class="num_occupancy num_adults room_occupancies" name="occupancy['+roomBlockIndex+'][adults]" value="1">';
occupancy_block += '<div class="occupancy_count pull-left">';
occupancy_block += '<span>1</span>';
occupancy_block += '</div>';
occupancy_block += '<div class="qty_direction pull-left">';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">';
occupancy_block += '<span><i class="icon-plus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">';
occupancy_block += '<span><i class="icon-minus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '<div class="row">';
occupancy_block += '<div class="form-group occupancy_count_block col-sm-5 col-xs-6">';
occupancy_block += '<label>' + adults_txt + '</label>';
occupancy_block += '<div>';
occupancy_block += '<input type="hidden" class="num_occupancy num_adults room_occupancies" name="occupancy['+roomBlockIndex+'][adults]" value="1">';
occupancy_block += '<div class="occupancy_count pull-left">';
occupancy_block += '<span>1</span>';
occupancy_block += '</div>';
occupancy_block += '<div class="qty_direction pull-left">';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">';
occupancy_block += '<span><i class="icon-plus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">';
occupancy_block += '<span><i class="icon-minus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '<div class="form-group occupancy_count_block">';
occupancy_block += '<label>' + children_txt + '<p class="label-desc-txt"> (' + below_txt + ' ' + max_child_age + ' ' + years_txt + ')</p></label>';
occupancy_block += '<div>';
occupancy_block += '<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy['+roomBlockIndex+'][children]" value="0">';
occupancy_block += '<div class="occupancy_count pull-left">';
occupancy_block += '<span>0</span>';
occupancy_block += '</div>';
occupancy_block += '<div class="qty_direction pull-left">';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">';
occupancy_block += '<span><i class="icon-plus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">';
occupancy_block += '<span><i class="icon-minus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '<div class="form-group occupancy_count_block col-sm-7 col-xs-6">';
occupancy_block += '<label>' + children_txt + '</label>';
occupancy_block += '<div class="clearfix">';
occupancy_block += '<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy['+roomBlockIndex+'][children]" value="0">';
occupancy_block += '<div class="occupancy_count pull-left">';
occupancy_block += '<span>0</span>';
occupancy_block += '</div>';
occupancy_block += '<div class="qty_direction pull-left">';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">';
occupancy_block += '<span><i class="icon-plus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">';
occupancy_block += '<span><i class="icon-minus"></i></span>';
occupancy_block += '</a>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '<p class="label-desc-txt"> (' + below_txt + ' ' + max_child_age + ' ' + years_txt + ')</p>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '<div class="form-group children_age_info_block">';
occupancy_block += '<label>' + all_children_txt + '</label>';
occupancy_block += '<div class="children_ages">';
occupancy_block += '<div class="row">';
occupancy_block += '<div class="form-group children_age_info_block col-sm-12">';
occupancy_block += '<label>' + all_children_txt + '</label>';
occupancy_block += '<div class="children_ages">';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '</div>';

View File

@@ -75,56 +75,61 @@
<div class="occupancy-room-block">
<div class="occupancy_info_head"><span class="room_num_wrapper">{l s='Room' mod='wkroomsearchblock'} - {$countRoom|escape:'htmlall':'UTF-8'} </span>{if !$smarty.foreach.occupancyInfo.first}<a class="remove-room-link pull-right" href="#">{l s='Remove' mod='wkroomsearchblock'}</a>{/if}</div>
<div class="occupancy_info_block" occ_block_index="{$key|escape:'htmlall':'UTF-8'}">
<div class="form-group occupancy_count_block">
<label>{l s='Adults' mod='wkroomsearchblock'}</label>
<div>
<input type="hidden" class="num_occupancy num_adults room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][adults]" value="{$occupancy['adults']|escape:'htmlall':'UTF-8'}">
<div class="occupancy_count pull-left">
<span>{$occupancy['adults']|escape:'htmlall':'UTF-8'}</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span><i class="icon-plus"></i></span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span><i class="icon-minus"></i></span>
</a>
<div class="row">
<div class="form-group occupancy_count_block col-sm-5 col-xs-6">
<label>{l s='Adults' mod='wkroomsearchblock'}</label>
<div>
<input type="hidden" class="num_occupancy num_adults room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][adults]" value="{$occupancy['adults']|escape:'htmlall':'UTF-8'}">
<div class="occupancy_count pull-left">
<span>{$occupancy['adults']|escape:'htmlall':'UTF-8'}</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span><i class="icon-plus"></i></span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span><i class="icon-minus"></i></span>
</a>
</div>
</div>
</div>
</div>
<div class="form-group occupancy_count_block">
<label>{l s='Children' mod='wkroomsearchblock'}<span class="label-desc-txt"> ({l s='Below' mod='wkroomsearchblock'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years' mod='wkroomsearchblock'})</span></label>
<div>
<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][children]" value="{$occupancy['children']|escape:'htmlall':'UTF-8'}">
<div class="occupancy_count pull-left">
<span>{$occupancy['children']|escape:'htmlall':'UTF-8'}</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span><i class="icon-plus"></i></span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span><i class="icon-minus"></i></span>
</a>
<div class="form-group occupancy_count_block col-sm-7 col-xs-6">
<label>{l s='Children' mod='wkroomsearchblock'}</label>
<div class="clearfix">
<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][children]" value="{$occupancy['children']|escape:'htmlall':'UTF-8'}">
<div class="occupancy_count pull-left">
<span>{$occupancy['children']|escape:'htmlall':'UTF-8'}</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span><i class="icon-plus"></i></span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span><i class="icon-minus"></i></span>
</a>
</div>
</div>
<p class="label-desc-txt">({l s='Below' mod='wkroomsearchblock'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years' mod='wkroomsearchblock'})</p>
</div>
</div>
<div class="form-group children_age_info_block" {if isset($occupancy['child_ages']) && $occupancy['child_ages']}style="display:block;"{/if}>
<label>{l s='All Children' mod='wkroomsearchblock'}</label>
<div class="children_ages">
{if isset($occupancy['child_ages']) && $occupancy['child_ages']}
{foreach $occupancy['child_ages'] as $childAge}
<div>
<select class="guest_child_age room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][child_ages][]">
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select 1' mod='wkroomsearchblock'}</option>
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1' mod='wkroomsearchblock'}</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>
</div>
{/foreach}
{/if}
<div class="row">
<div class="form-group children_age_info_block col-sm-12" {if isset($occupancy['child_ages']) && $occupancy['child_ages']}style="display:block;"{/if}>
<label>{l s='All Children' mod='wkroomsearchblock'}</label>
<div class="children_ages">
{if isset($occupancy['child_ages']) && $occupancy['child_ages']}
{foreach $occupancy['child_ages'] as $childAge}
<div>
<select class="guest_child_age room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][child_ages][]">
<option value="-1" {if $childAge == -1}selected{/if}>{l s='Select 1' mod='wkroomsearchblock'}</option>
<option value="0" {if $childAge == 0}selected{/if}>{l s='Under 1' mod='wkroomsearchblock'}</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>
</div>
{/foreach}
{/if}
</div>
</div>
</div>
</div>
@@ -136,51 +141,56 @@
<div class="occupancy-room-block">
<div class="occupancy_info_head"><span class="room_num_wrapper">{l s='Room - 1' mod='wkroomsearchblock'}</span></div>
<div class="occupancy_info_block" occ_block_index="0">
<div class="form-group occupancy_count_block">
<label>{l s='Adults' mod='wkroomsearchblock'}</label>
<div>
<input type="hidden" class="num_occupancy num_adults room_occupancies" name="occupancy[0][adults]" value="1">
<div class="occupancy_count pull-left">
<span>1</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span>
<i class="icon-plus"></i>
</span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span>
<i class="icon-minus"></i>
</span>
</a>
<div class="row">
<div class="form-group occupancy_count_block col-sm-5 col-xs-6">
<label>{l s='Adults' mod='wkroomsearchblock'}</label>
<div>
<input type="hidden" class="num_occupancy num_adults room_occupancies" name="occupancy[0][adults]" value="1">
<div class="occupancy_count pull-left">
<span>1</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span>
<i class="icon-plus"></i>
</span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span>
<i class="icon-minus"></i>
</span>
</a>
</div>
</div>
</div>
</div>
<div class="form-group occupancy_count_block">
<label>{l s='Children' mod='wkroomsearchblock'} <p class="label-desc-txt">({l s='Below' mod='wkroomsearchblock'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years' mod='wkroomsearchblock'})</p></label>
<div>
<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy[0][children]" value="0">
<div class="occupancy_count pull-left">
<span>0</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span>
<i class="icon-plus"></i>
</span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span>
<i class="icon-minus"></i>
</span>
</a>
<div class="form-group occupancy_count_block col-sm-7 col-xs-6">
<label>{l s='Children' mod='wkroomsearchblock'}</label>
<div class="clearfix">
<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy[0][children]" value="0">
<div class="occupancy_count pull-left">
<span>0</span>
</div>
<div class="qty_direction pull-left">
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_up">
<span>
<i class="icon-plus"></i>
</span>
</a>
<a href="#" data-field-qty="qty" class="btn btn-default occupancy_quantity_down">
<span>
<i class="icon-minus"></i>
</span>
</a>
</div>
</div>
<p class="label-desc-txt">({l s='Below' mod='wkroomsearchblock'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years' mod='wkroomsearchblock'})</p>
</div>
</div>
<div class="form-group children_age_info_block">
<label>{l s='All Children' mod='wkroomsearchblock'}</label>
<div class="children_ages">
<div class="row">
<div class="form-group children_age_info_block col-sm-12">
<label>{l s='All Children' mod='wkroomsearchblock'}</label>
<div class="children_ages">
</div>
</div>
</div>
</div>

View File

@@ -38,7 +38,7 @@
{l s='Extra Services Cost (tax excl.)' pdf='true'}
</td>
<td class="white" width="30%">
{displayPrice currency=$order->id_currency price=($footer.additional_service_price_tax_excl - $footer.total_convenience_fee_te)}
{displayPrice currency=$order->id_currency price=($footer.additional_service_price_tax_excl)}
</td>
</tr>
{/if}
@@ -52,6 +52,16 @@
</td>
</tr>
{/if}
{if $footer.product_discounts_tax_excl > 0}
<tr>
<td class="grey" width="70%">
{l s='Total Discounts' pdf='true'}
</td>
<td class="white" width="30%">
- {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_excl}
</td>
</tr>
{/if}
{* {if isset($footer.product_taxes) && $footer.product_taxes}
<tr>
<td class="grey" width="70%">
@@ -92,6 +102,7 @@
</td>
</tr>
{/if} *}
<tr class="bold">
<td class="grey">
{l s='Total (Tax excl.)' pdf='true'}
@@ -110,16 +121,7 @@
</td>
</tr>
{/if}
{if $footer.product_discounts_tax_excl > 0}
<tr>
<td class="grey" width="70%">
{l s='Total Discounts' pdf='true'}
</td>
<td class="white" width="30%">
- {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_excl}
</td>
</tr>
{/if}
<tr class="bold big">
<td class="grey">

View File

@@ -63,7 +63,7 @@
</div>
<div class="form-group col-sm-7 col-xs-6 occupancy_count_block">
<div class="row">
<label class="col-sm-12">{l s='Children'}<span class="label-desc-txt"> ({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})</span></label>
<label class="col-sm-12 clearfix">{l s='Children'}</label>
<div class="col-sm-12">
<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][children]" max="{}" value="{$occupancy['children']|escape:'htmlall':'UTF-8'}">
<div class="occupancy_count pull-left">
@@ -78,16 +78,19 @@
</a>
</div>
</div>
<div class="col-sm-12">
<span class="label-desc-txt">({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})</span>
</div>
</div>
</div>
</div>
<div class="form-group row children_age_info_block" {if isset($occupancy['child_ages']) && $occupancy['child_ages']}style="display:block;"{/if}>
<label class="col-sm-12">{l s='All Children'}</label>
<div class="col-sm-12">
<div class="row children_ages">
<div class="children_ages">
{if isset($occupancy['child_ages']) && $occupancy['child_ages']}
{foreach $occupancy['child_ages'] as $childAge}
<div class="col-xs-4 col-sm-12 col-md-6 col-lg-4">
<div>
<select class="guest_child_age room_occupancies" name="occupancy[{$key|escape:'htmlall':'UTF-8'}][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>
@@ -134,8 +137,8 @@
</div>
<div class="form-group col-sm-7 col-xs-6 occupancy_count_block">
<div class="row">
<label class="col-sm-12">{l s='Children'} <span class="label-desc-txt">({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})</span></label>
<div class="col-sm-12">
<label class="col-sm-12">{l s='Children'}</label>
<div class="col-sm-12 clearfix">
<input type="hidden" class="num_occupancy num_children" name="num_children[]" value="0">
<div class="occupancy_count pull-left">
<span>0</span>
@@ -153,13 +156,16 @@
</a>
</div>
</div>
<div class="col-sm-12">
<span class="label-desc-txt">({l s='Below'} {$max_child_age|escape:'htmlall':'UTF-8'} {l s='years'})</span>
</div>
</div>
</div>
</div>
<div class="form-group row children_age_info_block">
<label class="col-sm-12">{l s='All Children'}</label>
<div class="col-sm-12">
<div class="row children_ages">
<div class="children_ages">
</div>
</div>
</div>

View File

@@ -23,6 +23,11 @@
* International Registered Trademark & Property of PrestaShop SA
*}
{capture name=path}{l s='Your address'}{/capture}
{if isset($smarty.get.updated) && $smarty.get.updated}
<p class="alert alert-success">
{l s='Your address has been successfully updated.'}
</p>
{/if}
<div class="box">
<h1 class="page-subheading">{l s='Your address'}</h1>
<p class="info-title">

View File

@@ -9145,3 +9145,10 @@ a.open_rooms_extra_services_panel {
height: 10px;
}
/* skeleton loading animations - end */
a.link {
font-weight: 700;
color: #0000ff;
text-decoration: none;
}

View File

@@ -35,6 +35,11 @@
.booking_occupancy_wrapper .children_age_info_block label {
font-size: 12px;
color: #777777;}
.booking_occupancy_wrapper .children_age_info_block .children_ages{
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
justify-content: space-between;}
.booking_occupancy_wrapper .label-desc-txt {
font-size: 12px;
color: #777777;}
@@ -97,7 +102,6 @@
height: 37px;
border-radius: 4px;
padding: 3px 5px;
margin-bottom: 10px;
font-size: 12px;
color: #333;
border: 1px solid #E1E3E7;

View File

@@ -64,7 +64,7 @@ $(document).ready(function(){
let roomBlockIndex = parseInt($(this).closest('.occupancy_info_block').attr('occ_block_index'));
let childAgeSelect = '<div class="col-xs-6 col-sm-12 col-md-6">';
let childAgeSelect = '<div>';
childAgeSelect += '<select class="guest_child_age room_occupancies" name="occupancy[' +roomBlockIndex+ '][child_ages][]">';
childAgeSelect += '<option value="-1">' + select_age_txt + '</option>';
childAgeSelect += '<option value="0">' + under_1_age + '</option>';
@@ -228,8 +228,8 @@ $(document).ready(function(){
occupancy_block += '</div>';
occupancy_block += '<div class="form-group col-sm-7 col-xs-6 occupancy_count_block">';
occupancy_block += '<div class="row">';
occupancy_block += '<label class="col-sm-12">' + children_txt + '<span class="label-desc-txt">(' + below_txt + ' ' + max_child_age + ' ' + years_txt + ')</span></label>';
occupancy_block += '<div class="col-sm-12">';
occupancy_block += '<label class="col-sm-12">' + children_txt + '</label>';
occupancy_block += '<div class="col-sm-12 clearfix">';
occupancy_block += '<input type="hidden" class="num_occupancy num_children room_occupancies" name="occupancy['+roomBlockIndex+'][children]" value="0">';
occupancy_block += '<div class="occupancy_count pull-left">';
occupancy_block += '<span>0</span>';
@@ -243,13 +243,14 @@ $(document).ready(function(){
occupancy_block += '</a>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '<div class="col-sm-12"><span class="label-desc-txt">(' + below_txt + ' ' + max_child_age + ' ' + years_txt + ')</span></div>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '<div class="form-group row children_age_info_block">';
occupancy_block += '<label class="col-sm-12">' + all_children_txt + '</label>';
occupancy_block += '<div class="col-sm-12">';
occupancy_block += '<div class="row children_ages">';
occupancy_block += '<div class="children_ages">';
occupancy_block += '</div>';
occupancy_block += '</div>';
occupancy_block += '</div>';

View File

@@ -509,8 +509,14 @@ $(document).ready(function()
var newQuantity = parseInt(qtyfield.val()) + 1;
if (qtyfield.data('max_quantity') && qtyfield.data('max_quantity') < newQuantity) {
newQuantity = qtyfield.data('max_quantity');
}
qtyfield.val(newQuantity).trigger('focusout');
if (qtyfield.val() != qtyfield.data('max_quantity')) {
qtyfield.trigger('focusout');
} else {
showErrorMessage(txtMaxQuantityAdded);
}
} else {
qtyfield.val(newQuantity).trigger('focusout');
}
});
$(document).on('click', '#rooms_extra_services .qty_down', function(e) {
@@ -520,7 +526,10 @@ $(document).ready(function()
if (!isNaN(currentVal) && currentVal > 1) {
qtyfield.val(currentVal - 1).trigger('focusout');
} else {
qtyfield.val(1).trigger('focusout');
qtyfield.val(1);
if (currentVal != 1) {
qtyfield.trigger('focusout');
}
}
});

View File

@@ -1255,7 +1255,11 @@ $(document).ready(function() {
$(that).closest('.service_product_action_block').find('input.service_product_qty').val(1);
$(that).closest('.service_product_action_block').find('.qty_count span').text(1);
if (result.msg) {
showSuccessMessage(result.msg);
if (result.add) {
showSuccessMessage(result.msg);
} else {
showErrorMessage(result.msg);
}
}
BookingForm.refresh();
} else {

View File

@@ -658,7 +658,9 @@
<select name="id_product" class="form-control">
<option value="0">{l s='-- Choose --'}</option>
{foreach from=$products item=product name=products}
<option value="{$product.product_id}">{$product.product_name|escape:'html':'UTF-8'}</option>
{if $product.is_booking_product}
<option value="{$product.product_id}">{$product.product_name|escape:'html':'UTF-8'}</option>
{/if}
{/foreach}
</select>
</p>

View File

@@ -506,6 +506,7 @@
{capture}<a class="button button-small btn btn-default" href="{$smarty.capture.addressUrlAdd}" title="{l s='Update' js=1}"><span>{l s='Update' js=1}<i class="icon-chevron-right right"></i></span></a>{/capture}
{addJsDefL name=liUpdate}{$smarty.capture.default|@addcslashes:'\''}{/addJsDefL}
{addJsDefL name=txtExtraDemandSucc}{l s='Updated Successfully' js=1}{/addJsDefL}
{addJsDefL name=txtMaxQuantityAdded}{l s='Maximum quantity of service added' js=1}{/addJsDefL}
{addJsDefL name=txtExtraDemandErr}{l s='Some error occurred while updating demands' js=1}{/addJsDefL}
{/strip}
{/if}

View File

@@ -148,22 +148,22 @@
{if $orderReturnInfo['return_type'] == OrderReturn::RETURN_TYPE_CART_RULE}
<div class="form-group row">
<div class="col-md-2 col-sm-3">
<strong>{l s='Voucher ID:' mod='hotelreservationsystem'}</strong>
<strong>{l s='Voucher' mod='hotelreservationsystem'}</strong>
</div>
<div class="col-sm-9 col-md-10">
<a class="btn btn-default btn-sm" href="{$link->getPageLink('discount')}" target="_blank">
{l s='View your vouchers'}
<a class="link" href="{$link->getPageLink('discount')}" target="_blank">
{$voucher|escape:'html':'UTF-8'}
</a>
</div>
</div>
{elseif $orderReturnInfo['return_type'] == OrderReturn::RETURN_TYPE_ORDER_SLIP}
<div class="form-group row">
<div class="col-md-2 col-sm-3">
<strong>{l s='Credit Slip:' mod='hotelreservationsystem'}</strong>
<strong>{l s='Credit Slip' mod='hotelreservationsystem'}</strong>
</div>
<div class="col-sm-9 col-md-10">
<a class="btn btn-default btn-sm" href="{$link->getPageLink('order-slip')}">
{l s='View your creadit slips' mod='hotelreservationsystem'}
<a class="link" href="{$link->getPageLink('order-slip')}" target="_blank">
#{Configuration::get('PS_CREDIT_SLIP_PREFIX', $lang_id)}{$orderReturnInfo['id_return_type']|string_format:"%06d"}
</a>
</div>
</div>