Merge pull request #435 from lakshya-webkul/minimum-length-of-stay
Added feature: minimum and maximum length of stay restriction for room types
This commit is contained in:
@@ -0,0 +1,284 @@
|
||||
{if isset($product->id)}
|
||||
<div id="product-lengthofstay" class="panel product-tab">
|
||||
<h3 class="tab"><i class="icon-calendar"></i> {l s='Length Of Stay'}</h3>
|
||||
<input type="hidden" name="submitted_tabs[]" value="LengthOfStay" />
|
||||
|
||||
<div class="panel-content">
|
||||
<div class="alert alert-info">
|
||||
{l s='Please read below important points regarding length of stay management'}
|
||||
<ul>
|
||||
<li>{l s='Set 1 day for setting no limit on Minimum length of stay'}</li>
|
||||
<li>{l s='Set 0 day for setting no limit on Maximum length of stay'}</li>
|
||||
<li>{l s='Enable "Length of stay for date ranges" for setting values of \"Minimum length of stay\" and \"Maximum length of stay\" according to different date ranges'}</li>
|
||||
<li>{l s='Length of stays (minimum|maximum) of all the dates which does not fall under the date ranges of \"Length of stay for date ranges\", will be taken from the global values of length of stays of this room type.'}</li>
|
||||
<li>{l s='\"Date to\" will not be included in the date range of \"Length of stay for date ranges\".'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3 required" for="min_los">
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Enter minimum length of stay for the hotel. set 1 day for setting no limit on minimum length of stay.'}">{l s='Minimum length of stay'}</span>
|
||||
</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<input type="text" id="min_los" name="min_los" value="{if isset($smarty.post.min_los)}{$smarty.post.min_los|escape:'html':'UTF-8'}{elseif isset($roomTypeInfo['min_los']) && $roomTypeInfo['min_los']}{$roomTypeInfo['min_los']|escape:'html':'UTF-8'}{else}1{/if}">
|
||||
<span class="input-group-addon">{l s='Day(s)'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3 required" for="max_los">
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Enter maximum length of stay for the hotel. set 0 day for setting no limit on maximum length of stay.'}">{l s='Maximum length of stay'}</span>
|
||||
</label>
|
||||
<div class="col-sm-2">
|
||||
<div class="input-group">
|
||||
<input type="text" id="max_los" name="max_los" value="{if isset($smarty.post.max_los)}{$smarty.post.max_los|escape:'html':'UTF-8'}{elseif isset($roomTypeInfo['max_los'])}{$roomTypeInfo['max_los']|escape:'html':'UTF-8'}{else}0{/if}">
|
||||
<span class="input-group-addon">{l s='Day(s)'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="active_restriction_dates" class="control-label col-sm-3">
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Enable, if you want set minimum|maximum length of stay according to different date ranges.'}">{l s='Length of stay for date ranges'}</span>
|
||||
</label>
|
||||
<div class="col-sm-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" value="1" id="active_restriction_dates_on" name="active_restriction_dates" {if isset($smarty.post.active_restriction_dates) && $smarty.post.active_restriction_dates}checked="checked"{elseif isset($roomTypeInfo['restrictionDataRange']) && $roomTypeInfo['restrictionDataRange']}checked="checked"{/if}>
|
||||
<label for="active_restriction_dates_on">{l s='Yes'}</label>
|
||||
|
||||
<input type="radio" value="0" id="active_restriction_dates_off" name="active_restriction_dates" {if isset($smarty.post.active_restriction_dates)}{if !$smarty.post.active_restriction_dates}checked="checked"{/if}{elseif isset($roomTypeInfo['restrictionDataRange'])}{if !$roomTypeInfo['restrictionDataRange']}checked="checked"{/if}{else}checked="checked"{/if}>
|
||||
<label for="active_restriction_dates_off">{l s='No'}</label>
|
||||
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="restriction_dates_container" class="form-group table-responsive" {if isset($smarty.post.active_restriction_dates)}{if !$smarty.post.active_restriction_dates}style="display:none;"{/if}{elseif isset($roomTypeInfo['restrictionDataRange'])}{if !$roomTypeInfo['restrictionDataRange']}style="display:none;"{/if}{/if}>
|
||||
<table id="restriction_dates_table" class="table table-striped">
|
||||
<thead>
|
||||
<th>{l s='Date From'}</th>
|
||||
<th>{l s='Date To'}</th>
|
||||
<th>{l s='Minimum length of stay'}</th>
|
||||
<th>{l s='Maximum length of stay'}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($smarty.post.active_restriction_dates) && $smarty.post.active_restriction_dates && isset($smarty.post.restriction_date_from) && $smarty.post.restriction_date_from}
|
||||
{assign var="restrictionDataRange" value=[]}
|
||||
{foreach from=$smarty.post.restriction_date_from item=restrictionDateFromVal key=restrictionKey}
|
||||
{assign var="restrictionDataRangeTemp" value=['date_from' => $restrictionDateFromVal, 'date_to' => $smarty.post.restriction_date_to[$restrictionKey], 'min_los' => $smarty.post.restriction_min_los[$restrictionKey], 'max_los' => $smarty.post.restriction_max_los[$restrictionKey]]}
|
||||
|
||||
{if isset($smarty.post.id_rt_restriction) && isset($smarty.post.id_rt_restriction[$restrictionKey])}
|
||||
{$restrictionDataRangeTemp['id_rt_restriction'] = $smarty.post.id_rt_restriction[$restrictionKey]}
|
||||
{/if}
|
||||
|
||||
{$restrictionDataRange[] = $restrictionDataRangeTemp}
|
||||
{/foreach}
|
||||
{elseif isset($roomTypeInfo['restrictionDataRange']) && $roomTypeInfo['restrictionDataRange']}
|
||||
{assign var="restrictionDataRange" value=$roomTypeInfo['restrictionDataRange']}
|
||||
{else}
|
||||
{assign var="restrictionDataRange" value=[['date_from' => '', 'date_to' => '', 'min_los' => '', 'max_los' => '']]}
|
||||
{/if}
|
||||
|
||||
{foreach from=$restrictionDataRange item=restrictionInfo}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<input class="form-control restriction_date date_from_restriction" type="text" name="restriction_date_from[]" value="{$restrictionInfo['date_from']|date_format:'%d-%m-%Y'}" readonly>
|
||||
<span class="input-group-addon"><i class="icon-calendar"></i></span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<input class="form-control restriction_date date_to_restriction" type="text" name="restriction_date_to[]" value="{$restrictionInfo['date_to']|date_format:'%d-%m-%Y'}" readonly>
|
||||
<span class="input-group-addon"><i class="icon-calendar"></i></span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="restriction_min_los[]" value="{$restrictionInfo['min_los']}">
|
||||
<span class="input-group-addon">{l s='day(s)'}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="restriction_max_los[]" value="{$restrictionInfo['max_los']}">
|
||||
<span class="input-group-addon">{l s='day(s)'}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{if isset($restrictionInfo['id_rt_restriction'])}
|
||||
<input type="hidden" name="id_rt_restriction[]" value="{$restrictionInfo['id_rt_restriction']}">
|
||||
{/if}
|
||||
<a href="#" class="btn btn-default delete_date_restriction" {if isset($restrictionInfo['id_rt_restriction'])}data-id-rt-restriction="{$restrictionInfo['id_rt_restriction']}"{/if}><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<a href="#" id="add_los_restriction" class="btn btn-default"><i class="icon icon-plus"></i> {l s='Add more length of stays'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}{if isset($smarty.request.page) && $smarty.request.page > 1}&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>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
var days_txt = "{l s='day(s)' js=1}";
|
||||
var adminProductLink = "{$link->getAdminlink('AdminProducts')}";
|
||||
var someErrorText = "{l s='Something went wrong. Please try again.' js=1}";
|
||||
|
||||
// console.log($.datepicker.parseDate( "dd-mm-yy", "15-06-2022" ));
|
||||
|
||||
$(document).ready(function() {
|
||||
$("input[name='active_restriction_dates']").on('change', function () {
|
||||
if (parseInt($(this).val())) {
|
||||
$("#restriction_dates_container").show(200);
|
||||
} else {
|
||||
$("#restriction_dates_container").hide(200);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".delete_date_restriction",function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (typeof $(this).attr('data-id-rt-restriction') !== 'undefined' && $(this).attr('data-id-rt-restriction') !== false) {
|
||||
var currentElement = $(this);
|
||||
$.ajax({
|
||||
url: adminProductLink,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
ajax: true,
|
||||
action:'deleteRoomTypeLengthOfStayRestriction',
|
||||
id_rt_restriction: currentElement.attr('data-id-rt-restriction'),
|
||||
},
|
||||
success: function (result) {
|
||||
if (typeof result.success !== 'undefined' && result.success !== false) {
|
||||
showSuccessMessage(result.success);
|
||||
currentElement.closest('tr').remove();
|
||||
} else if (typeof result.error !== 'undefined' && result.error !== false) {
|
||||
showErrorMessage(result.error);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
showErrorMessage(someErrorText);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(this).closest('tr').remove();
|
||||
}
|
||||
});
|
||||
|
||||
$('#add_los_restriction').on('click',function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var html = '';
|
||||
html += '<tr>';
|
||||
html += '<td>';
|
||||
html += '<div class="input-group">';
|
||||
html += '<input class="form-control restriction_date date_from_restriction" type="text" name="restriction_date_from[]" value="" readonly>';
|
||||
html += '<span class="input-group-addon"><i class="icon-calendar"></i></span>';
|
||||
html += '</div>';
|
||||
html += '</td>';
|
||||
html += '<td>';
|
||||
html += '<div class="input-group">';
|
||||
html += '<input class="form-control restriction_date date_to_restriction" type="text" name="restriction_date_to[]" value="" readonly>';
|
||||
html += '<span class="input-group-addon"><i class="icon-calendar"></i></span>';
|
||||
html += '</div>';
|
||||
html += '</td>';
|
||||
html += '<td>';
|
||||
html += '<div class="input-group">';
|
||||
html += '<input class="form-control" type="text" name="restriction_min_los[]" value="">';
|
||||
html += '<span class="input-group-addon">'+ days_txt +'</span>';
|
||||
html += '</div>';
|
||||
html += '</td>';
|
||||
html += '<td>';
|
||||
html += '<div class="input-group">';
|
||||
html += '<input class="form-control" type="text" name="restriction_max_los[]" value="">';
|
||||
html += '<span class="input-group-addon">'+ days_txt +'</span>';
|
||||
html += '</div>';
|
||||
html += '</td>';
|
||||
html += '<td>';
|
||||
html += '<a href="#" class="btn btn-default delete_date_restriction"><i class="icon-trash"></i></a>';
|
||||
html += '</td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#restriction_dates_table tbody').append(html);
|
||||
$(this).blur();
|
||||
});
|
||||
|
||||
$(document).on('focus', '.restriction_date', function() {
|
||||
var dateFormat = "dd-mm-yy";
|
||||
$(this).datepicker({
|
||||
defaultDate: new Date(),
|
||||
dateFormat: dateFormat,
|
||||
minDate: 0,
|
||||
beforeShow: function (input, instance) {
|
||||
if ($(input).hasClass('date_to_restriction') ) {
|
||||
var dateFrom = $(this).closest('tr').find('td div input.date_from_restriction').val();
|
||||
if (typeof dateFrom !== 'undefined' && dateFrom !== false && dateFrom != '') {
|
||||
// This can also work but more testing needed: var date = new Date($.datepicker.parseDate(dateFormat, dateFrom));
|
||||
var minDateTo = new Date($.datepicker.formatDate('yy-mm-dd', $.datepicker.parseDate(dateFormat, dateFrom)));
|
||||
minDateTo.setDate(minDateTo.getDate() + 1);
|
||||
|
||||
$(this).datepicker("option", "minDate", minDateTo);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeShowDay: function (currentDate) {
|
||||
let dateRange = [];
|
||||
|
||||
$(this).closest('tr').siblings().each(function( index ) {
|
||||
var dateFrom = $(this).find('td div input.date_from_restriction').val();
|
||||
var dateTo = $(this).find('td div input.date_to_restriction').val();
|
||||
if ((typeof dateFrom !== 'undefined' && dateFrom !== false && dateFrom != '') && (typeof dateTo !== 'undefined' && dateTo !== false && dateTo != '')) {
|
||||
for (let index = $.datepicker.parseDate(dateFormat, dateFrom); index < $.datepicker.parseDate(dateFormat, dateTo); index.setDate(index.getDate() + 1)) {
|
||||
dateRange.push($.datepicker.formatDate(dateFormat, index));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let dateString = $.datepicker.formatDate(dateFormat, currentDate);
|
||||
return [dateRange.indexOf(dateString) == -1];
|
||||
},
|
||||
onClose: function (dateText, instance) {
|
||||
if ($(this).hasClass('date_from_restriction')) {
|
||||
if (dateText != "") {
|
||||
var dateFrom = $.datepicker.parseDate(dateFormat, dateText);
|
||||
|
||||
var dateTo = $(this).closest('tr').find('td div input.date_to_restriction').val();
|
||||
dateTo = $.datepicker.parseDate(dateFormat, dateTo);
|
||||
|
||||
if (dateFrom >= dateTo) {
|
||||
// In this case empty date_to, so that user have to again select the date for date_to field
|
||||
$(this).closest('tr').find('td div input.date_to_restriction').val("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -108,6 +108,14 @@ class AdminPPreferencesControllerCore extends AdminController
|
||||
'cast' => 'intval',
|
||||
'required' => false,
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_LOS_RESTRICTION_BO' => array(
|
||||
'title' => $this->l('Apply Min and Max lenght of stay restrictions for back-office bookings'),
|
||||
'hint' => $this->l('While creating bookings from back-office, apply minimum and maximum lenght of stay restrictions'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'required' => false,
|
||||
'type' => 'bool'
|
||||
)
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
|
||||
@@ -112,6 +112,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
'Warehouses' => $this->l('Warehouses'),
|
||||
'Configuration' => $this->l('Configuration'),
|
||||
'Occupancy' => $this->l('Occupancy'),
|
||||
'LengthOfStay' => $this->l('Length of Stay'),
|
||||
'Booking' => $this->l('Booking Information'),
|
||||
);
|
||||
|
||||
@@ -133,7 +134,8 @@ class AdminProductsControllerCore extends AdminController
|
||||
//'Suppliers' => 13,
|
||||
'Configuration' => 14,
|
||||
'Occupancy' => 15,
|
||||
'Booking' => 16,
|
||||
'LengthOfStay' => 16,
|
||||
'Booking' => 17,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -2225,6 +2227,9 @@ class AdminProductsControllerCore extends AdminController
|
||||
if ($this->isTabSubmitted('Occupancy')) {
|
||||
$this->processOccupancy();
|
||||
}
|
||||
if ($this->isTabSubmitted('LengthOfStay')) {
|
||||
$this->processLengthOfStay();
|
||||
}
|
||||
if ($this->isTabSubmitted('Configuration')) {
|
||||
$this->processConfiguration();
|
||||
}
|
||||
@@ -3473,6 +3478,141 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
// send information for the length of stay tab
|
||||
public function initFormLengthOfStay($product)
|
||||
{
|
||||
$data = $this->createTemplate($this->tpl_form);
|
||||
if ($product->id) {
|
||||
if ($this->product_exists_in_shop) {
|
||||
// Check if any hotel is created or not
|
||||
$objRoomType = new HotelRoomType();
|
||||
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($product->id)) {
|
||||
if ($roomTypeInfo['id_hotel']) {
|
||||
// send length of stay date ranges for this room type
|
||||
$objRoomTypeRestrictionDates = new HotelRoomTypeRestrictionDateRange();
|
||||
$roomTypeInfo['restrictionDataRange'] = $objRoomTypeRestrictionDates->getRoomTypeLengthOfStayRestriction($product->id);
|
||||
$smartyVars['roomTypeInfo'] = $roomTypeInfo;
|
||||
} else {
|
||||
$this->displayWarning($this->l('No hotel is attached to this room type.'));
|
||||
}
|
||||
} else {
|
||||
$this->displayWarning($this->l('Room type information is missing.'));
|
||||
}
|
||||
} else {
|
||||
$this->displayWarning($this->l('You must save room type before managing length of stay.'));
|
||||
}
|
||||
} else {
|
||||
$this->displayWarning($this->l('You must save room type before managing length of stay.'));
|
||||
}
|
||||
|
||||
$smartyVars['product'] = $product;
|
||||
$data->assign($smartyVars);
|
||||
$this->tpl_form_vars['custom_form'] = $data->fetch();
|
||||
}
|
||||
|
||||
public function processLengthOfStay()
|
||||
{
|
||||
if ($this->tabAccess['edit'] == 1) {
|
||||
|
||||
$idProduct = Tools::getValue('id_product');
|
||||
if (Validate::isLoadedObject($product = new Product((int)$idProduct))) {
|
||||
$objRoomType = new HotelRoomType();
|
||||
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($idProduct)) {
|
||||
$roomTypeMinLos = Tools::getValue('min_los');
|
||||
$roomTypeMaxLos = Tools::getValue('max_los');
|
||||
|
||||
// validate length of stay global values for room type
|
||||
if (!$roomTypeMinLos || $roomTypeMinLos == null) {
|
||||
$this->errors[] = Tools::displayError('Global minimum length of stay is a required field.');
|
||||
} elseif (!Validate::isUnsignedInt($roomTypeMinLos)) {
|
||||
$this->errors[] = Tools::displayError('Global minimum length of stay value is invalid. Please enter integer value. Set 1 day incase of setting no limit on global minimum length of stay.');
|
||||
}
|
||||
|
||||
if ($roomTypeMaxLos == null) {
|
||||
$this->errors[] = Tools::displayError('Global maximum length of stay is a required field.');
|
||||
} elseif (!Validate::isUnsignedInt($roomTypeMaxLos)) {
|
||||
$this->errors[] = Tools::displayError('Invalid value entered for global maximum length of stay field. Please enter integer value. Set 0 day incase of setting no limit on maximum length of stay.');
|
||||
} elseif ($roomTypeMinLos && $roomTypeMaxLos > 0 && ($roomTypeMinLos > $roomTypeMaxLos)) {
|
||||
$this->errors[] = Tools::displayError('Value of global maximum length of stay must be greater than global minimum length of stay.');
|
||||
}
|
||||
|
||||
if (Tools::getValue('active_restriction_dates')) {
|
||||
if (Tools::getValue('restriction_date_from') && Tools::getValue('restriction_date_to')) {
|
||||
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange();
|
||||
$dateFromRestriction = Tools::getValue('restriction_date_from');
|
||||
$dateToRestriction = Tools::getValue('restriction_date_to');
|
||||
$minLosDays = Tools::getValue('restriction_min_los');
|
||||
$maxLosDays = Tools::getValue('restriction_max_los');
|
||||
|
||||
$this->errors = array_merge($this->errors, $objRoomTypeRestrictDateRange->validateRoomTypeLengthOfStayRestriction($dateFromRestriction, $dateToRestriction, $minLosDays, $maxLosDays));
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Please add at least one Minimum & maximum length of stay restriction for date range if \'Length of stay for date ranges\' option is enable.');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->errors) {
|
||||
$objRoomType = new HotelRoomType($roomTypeInfo['id']);
|
||||
$objRoomType->min_los = $roomTypeMinLos;
|
||||
$objRoomType->max_los = $roomTypeMaxLos;
|
||||
if ($objRoomType->save()) {
|
||||
if (Tools::getValue('active_restriction_dates') && Tools::getValue('restriction_date_from')) {
|
||||
// @ToDo: we should validate this room type restriction ids belongs to this room type
|
||||
$idRoomTypeRestriction = Tools::getValue('id_rt_restriction');
|
||||
|
||||
foreach ($dateFromRestriction as $restrictionKey => $dateFrom) {
|
||||
// change into database compatible format
|
||||
$dateFrom = date('Y-m-d', strtotime($dateFrom));
|
||||
$dateTo = date('Y-m-d', strtotime($dateToRestriction[$restrictionKey]));
|
||||
|
||||
if ($idRoomTypeRestriction[$restrictionKey]) {
|
||||
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange($idRoomTypeRestriction[$restrictionKey]);
|
||||
} else {
|
||||
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange();
|
||||
}
|
||||
|
||||
$objRoomTypeRestrictDateRange->id_product = $idProduct;
|
||||
$objRoomTypeRestrictDateRange->date_from = $dateFrom;
|
||||
$objRoomTypeRestrictDateRange->date_to = $dateTo;
|
||||
$objRoomTypeRestrictDateRange->min_los = $minLosDays[$restrictionKey];
|
||||
$objRoomTypeRestrictDateRange->max_los = $maxLosDays[$restrictionKey];
|
||||
$objRoomTypeRestrictDateRange->save();
|
||||
}
|
||||
} else {
|
||||
// if disabled length of stay for date ranges then delete all previously saved
|
||||
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange();
|
||||
if ($losRestrictions = $objRoomTypeRestrictDateRange->getRoomTypeLengthOfStayRestriction($idProduct)) {
|
||||
foreach ($losRestrictions as $losDate) {
|
||||
$objRoomTypeRestrictDateRange = new HotelRoomTypeRestrictionDateRange($losDate['id_rt_restriction']);
|
||||
$objRoomTypeRestrictDateRange->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Something went wrong while saving global minimum & maximum length of stay values. Please try again !!');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('You do not have the right permission.');
|
||||
}
|
||||
}
|
||||
|
||||
// delete the rows of length of stay on date range
|
||||
public function ajaxProcessDeleteRoomTypeLengthOfStayRestriction()
|
||||
{
|
||||
if ($this->tabAccess['edit'] == 1) {
|
||||
$objRoomTypeRestrictionDates = new HotelRoomTypeRestrictionDateRange(Tools::getValue('id_rt_restriction'));
|
||||
if ($objRoomTypeRestrictionDates->delete()) {
|
||||
die(json_encode(array('success' => $this->l('Successfully deleted'))));
|
||||
} else {
|
||||
die(json_encode(array('error' => $this->l('Something went wrong. Please reload the page and try again !!'))));
|
||||
}
|
||||
} else {
|
||||
die(json_encode(array('error' => $this->l('You do not have the right permission'))));
|
||||
}
|
||||
}
|
||||
|
||||
public function validateDisableDateRanges($disableDates)
|
||||
{
|
||||
if (count($disableDates)) {
|
||||
|
||||
@@ -225,6 +225,7 @@ class HotelBookingDetail extends ObjectModel
|
||||
*/
|
||||
public function getBookingData($params)
|
||||
{
|
||||
$this->context = Context::getContext();
|
||||
// extract all keys and values of the array [$params] into variables and values
|
||||
extract($this->getBookingDataParams($params));
|
||||
if ($date_from && $date_to && $hotel_id) {
|
||||
@@ -248,12 +249,19 @@ class HotelBookingDetail extends ObjectModel
|
||||
$num_cart = 0;
|
||||
$new_part_arr = array();
|
||||
$booking_data = array();
|
||||
$applyLosRestriction = true;
|
||||
|
||||
if ($search_partial) {
|
||||
$this->partAvaiDates = array();
|
||||
$this->allReqDates = $this->createDateRangeArray($date_from, $date_to, 1);
|
||||
}
|
||||
|
||||
if (isset(Context::getContext()->employee->id)) {
|
||||
if (!Configuration::get('PS_LOS_RESTRICTION_BO')) {
|
||||
$applyLosRestriction = false;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($room_types as $key => $room_type) {
|
||||
if ($search_partial) {
|
||||
$this->dltDates = array();
|
||||
@@ -261,6 +269,10 @@ class HotelBookingDetail extends ObjectModel
|
||||
|
||||
$total_rooms += $obj_room_info->getHotelRoomInfo($room_type['id_product'], $hotel_id, 1);
|
||||
|
||||
// Get min & max LOS
|
||||
$objRoomTypeRestriction = new HotelRoomTypeRestrictionDateRange();
|
||||
$losRestriction = $objRoomTypeRestriction->getRoomTypeLengthOfStay($room_type['id_product'], $date_from);
|
||||
|
||||
$obj_product = new Product((int) $room_type['id_product']);
|
||||
$product_name = $obj_product->name[Configuration::get('PS_LANG_DEFAULT')];
|
||||
|
||||
@@ -309,7 +321,15 @@ class HotelBookingDetail extends ObjectModel
|
||||
if ($search_unavai) {
|
||||
$sql1 = 'SELECT `id_product`, `id_hotel`, `room_num`, `comment` AS `room_comment`
|
||||
FROM `'._DB_PREFIX_.'htl_room_information`
|
||||
WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product` ='.(int)$room_type['id_product'].' AND `id_status` = '. HotelRoomInformation::STATUS_INACTIVE;
|
||||
WHERE `id_hotel`='.(int)$hotel_id.' AND `id_product` ='.(int)$room_type['id_product'].' AND (`id_status` = '. HotelRoomInformation::STATUS_INACTIVE;
|
||||
if ($applyLosRestriction) {
|
||||
$sql1 .= ' OR ( DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') < '.(int)$losRestriction['min_los'];
|
||||
if ((int)$losRestriction['max_los']) {
|
||||
$sql1 .= ' OR DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') > '.(int)$losRestriction['max_los'];
|
||||
}
|
||||
$sql1 .= ')';
|
||||
}
|
||||
$sql1 .= ')';
|
||||
|
||||
$sql2 = 'SELECT hri.`id_product`, hri.`id_hotel`, hri.`room_num`, hri.`comment` AS `room_comment`
|
||||
FROM `'._DB_PREFIX_.'htl_room_information` AS hri
|
||||
@@ -357,7 +377,18 @@ class HotelBookingDetail extends ObjectModel
|
||||
|
||||
$joinAvailRoomSearch = '';
|
||||
|
||||
$whereAvailRoomSearch = 'WHERE ri.`id_hotel`='.(int)$hotel_id.' AND ri.`id_product`='.(int)$room_type['id_product'].' AND ri.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE .' AND ri.`id` NOT IN ('.$exclude_ids.')';
|
||||
$whereAvailRoomSearch = 'WHERE ri.`id_hotel`='.(int)$hotel_id.' AND ri.`id_product`='.(int)$room_type['id_product'].' AND ri.`id_status` != '. HotelRoomInformation::STATUS_INACTIVE;
|
||||
|
||||
// Check min & max LOS restrictions
|
||||
if ($applyLosRestriction) {
|
||||
$whereAvailRoomSearch .= ' AND DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') >= '.(int)$losRestriction['min_los'];
|
||||
// check max LOS restriction is greater than zero
|
||||
if ((int)$losRestriction['max_los']) {
|
||||
$whereAvailRoomSearch .= ' AND DATEDIFF(\''.$date_to.'\', \''.$date_from.'\') <= '.(int)$losRestriction['max_los'];
|
||||
}
|
||||
}
|
||||
|
||||
$whereAvailRoomSearch .= ' AND ri.`id` NOT IN ('.$exclude_ids.')';
|
||||
|
||||
$groupByAvailRoomSearch = '';
|
||||
$orderByAvailRoomSearch = '';
|
||||
|
||||
@@ -29,6 +29,8 @@ class HotelReservationSystemDb
|
||||
`id_hotel` int(11) NOT NULL,
|
||||
`adult` smallint(6) NOT NULL,
|
||||
`children` smallint(6) NOT NULL,
|
||||
`min_los` smallint(6) NOT NULL DEFAULT '1',
|
||||
`max_los` smallint(6) NOT NULL DEFAULT '0',
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
@@ -352,6 +354,18 @@ class HotelReservationSystemDb
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE="._MYSQL_ENGINE_." DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;",
|
||||
|
||||
"CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."htl_room_type_restriction_date_range` (
|
||||
`id_rt_restriction` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id_product` int(11) NOT NULL,
|
||||
`min_los` smallint(6) unsigned NOT NULL DEFAULT '1',
|
||||
`max_los` smallint(6) unsigned NOT NULL DEFAULT '0',
|
||||
`date_from` date NOT NULL,
|
||||
`date_to` date NOT NULL,
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_rt_restriction`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
|
||||
|
||||
"CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."htl_access` (
|
||||
`id_profile` int(10) unsigned NOT NULL,
|
||||
`id_hotel` int(10) unsigned NOT NULL,
|
||||
@@ -408,6 +422,7 @@ class HotelReservationSystemDb
|
||||
`'._DB_PREFIX_.'htl_room_type_demand_price`,
|
||||
`'._DB_PREFIX_.'htl_room_type_demand`,
|
||||
`'._DB_PREFIX_.'htl_room_disable_dates`,
|
||||
`'._DB_PREFIX_.'htl_room_type_restriction_date_range`,
|
||||
`'._DB_PREFIX_.'htl_access`'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ class HotelRoomType extends ObjectModel
|
||||
public $id_hotel;
|
||||
public $adult;
|
||||
public $children;
|
||||
public $min_los;
|
||||
public $max_los;
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
|
||||
@@ -36,6 +38,8 @@ class HotelRoomType extends ObjectModel
|
||||
'id_hotel' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
||||
'adult' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
||||
'children' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
||||
'min_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'default' => 1),
|
||||
'max_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'default' => 0),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
),
|
||||
@@ -211,14 +215,17 @@ class HotelRoomType extends ObjectModel
|
||||
*
|
||||
* @return [array|false] [If data found returns array containing information of the room type else returns false]
|
||||
*/
|
||||
public function getRoomTypeInfoByIdProduct($id_product)
|
||||
public function getRoomTypeInfoByIdProduct($id_product, $idLang = false)
|
||||
{
|
||||
$idLang = Context::getContext()->language->id;
|
||||
$sql = 'SELECT hrt.`id`,hrt.`id_hotel`, hrt.`adult`, hrt.`children`, hbl.`hotel_name`
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
}
|
||||
|
||||
$sql = 'SELECT hrt.`id`,hrt.`id_hotel`, hrt.`adult`, hrt.`children`, hbl.`hotel_name`, hrt.`min_los`, hrt.`max_los`
|
||||
FROM `'._DB_PREFIX_.'htl_room_type` AS hrt
|
||||
INNER JOIN `'._DB_PREFIX_.'htl_branch_info_lang` AS hbl
|
||||
ON (hbl.`id` = hrt.`id_hotel` AND hbl.`id_lang` = '.(int)$idLang.')
|
||||
WHERE `id_product` = '.(int)$id_product;
|
||||
WHERE hrt.`id_product` = '.(int)$id_product;
|
||||
|
||||
return Db::getInstance()->getRow($sql);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2021 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2021 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
class HotelRoomTypeRestrictionDateRange extends ObjectModel
|
||||
{
|
||||
public $id_rt_restriction;
|
||||
public $id_product;
|
||||
public $min_los;
|
||||
public $max_los;
|
||||
public $date_from;
|
||||
public $date_to;
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
|
||||
const WK_ROOM_TYPE_MIN_LOS = 1;
|
||||
const WK_ROOM_TYPE_MAX_LOS = 2;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'htl_room_type_restriction_date_range',
|
||||
'primary' => 'id_rt_restriction',
|
||||
'fields' => array(
|
||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'min_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true, 'default' => 1),
|
||||
'max_los' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true, 'default' => 0),
|
||||
'date_from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true),
|
||||
'date_to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'required' => true),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate')
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
'update' => 'updateWs',
|
||||
'delete' => 'deleteWs',
|
||||
),
|
||||
'objectsNodeName' => 'restriction_date_ranges',
|
||||
'objectNodeName' => 'restriction_date_range',
|
||||
'fields' => array(
|
||||
'id_product' => array(
|
||||
'xlink_resource' => array(
|
||||
'resourceName' => 'room_types',
|
||||
)
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public function getRoomTypeLengthOfStayRestriction($idRoomType)
|
||||
{
|
||||
$sql = 'SELECT * FROM `'._DB_PREFIX_.'htl_room_type_restriction_date_range` WHERE `id_product` = '.(int)$idRoomType;
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
}
|
||||
|
||||
public function getRoomTypeLengthOfStay($idRoomType, $date = false, $losRestrictionType = false)
|
||||
{
|
||||
$losRestriction = array();
|
||||
|
||||
// if date is given the return LOS for date range
|
||||
if ($date) {
|
||||
$date = date('Y-m-d', strtotime($date));
|
||||
|
||||
$sql = 'SELECT `min_los`, `max_los`
|
||||
FROM `'._DB_PREFIX_.'htl_room_type_restriction_date_range`
|
||||
WHERE `id_product` = '.(int) $idRoomType.' AND `date_from` <= \''.pSQL($date).'\' AND `date_to` > \''.pSQL($date).'\'';
|
||||
|
||||
$losRestriction = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
||||
}
|
||||
|
||||
// if no LOS for date range the find it for room type
|
||||
if (!$losRestriction) {
|
||||
$sql = 'SELECT `min_los`, `max_los`
|
||||
FROM `'._DB_PREFIX_.'htl_room_type`
|
||||
WHERE `id_product` = '.(int) $idRoomType;
|
||||
|
||||
$losRestriction = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
||||
}
|
||||
|
||||
if ($losRestriction) {
|
||||
if ($losRestrictionType) {
|
||||
if ($losRestrictionType == self::WK_ROOM_TYPE_MIN_LOS) {
|
||||
return $losRestriction['min_los'];
|
||||
} elseif ($losRestrictionType == self::WK_ROOM_TYPE_MAX_LOS) {
|
||||
return $losRestriction['max_los'];
|
||||
}
|
||||
}
|
||||
|
||||
return $losRestriction;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function validateRoomTypeLengthOfStayRestriction($dateFromRestriction, $dateToRestriction, $minLosDays, $maxLosDays)
|
||||
{
|
||||
$errors = array();
|
||||
$objModule = Module::getinstanceByName('hotelreservationsystem');
|
||||
foreach ($dateFromRestriction as $dateFromKey => $dateFrom) {
|
||||
$dateTo = $dateToRestriction[$dateFromKey];
|
||||
$minDay = $minLosDays[$dateFromKey];
|
||||
$maxDay = $maxLosDays[$dateFromKey];
|
||||
|
||||
// validate the fields before saving in the table
|
||||
if (!$minDay) {
|
||||
$errors[] = $objModule->l('Minimum length of stay is required.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} elseif (!Validate::isUnsignedInt($minDay)) {
|
||||
$errors[] = $objModule->l('Minimum length of stay is invalid.', 'HotelRoomTypeLosDateRanges').'
|
||||
[ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
}
|
||||
|
||||
if ($maxDay == null) {
|
||||
$errors[] = $objModule->l('Maximum length of stay is required.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} elseif (!Validate::isUnsignedInt($maxDay)) {
|
||||
$errors[] = $objModule->l('Maximum length of stay is invalid.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} elseif ($minDay && $maxDay > 0 && ($minDay > $maxDay)) {
|
||||
$this->errors[] = Tools::displayError('Value of global maximum length of stay must be greater than global minimum length of stay.');
|
||||
}
|
||||
|
||||
if (!$dateFrom || $dateFrom == '') {
|
||||
$errors[] = $objModule->l('Date from is required.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} else {
|
||||
$dateFrom = date('Y-m-d', strtotime($dateFrom));
|
||||
if (!Validate::isDate($dateFrom)) {
|
||||
$errors[] = $objModule->l('Date from is invalid.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$dateTo || $dateTo == '') {
|
||||
$errors[] = $objModule->l('Date to is required.', 'HotelRoomTypeLosDateRanges').'
|
||||
[ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} else {
|
||||
$dateTo = date('Y-m-d', strtotime($dateTo));
|
||||
if (!Validate::isDate($dateTo)) {
|
||||
$errors[] = $objModule->l('Date to is invalid.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} elseif (strtotime($dateTo) <= strtotime($dateFrom)) {
|
||||
$errors[] = $dateFrom.' and '.$dateTo . $objModule->l('\'Date to\' must be a greater than \'date from\'.', 'HotelRoomTypeLosDateRanges').
|
||||
' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]';
|
||||
} else {
|
||||
// validate date ranges from other date ranges
|
||||
foreach ($dateToRestriction as $dateToKey => $newDateTo) {
|
||||
if ($dateFromKey > $dateToKey) {
|
||||
if (!((strtotime($dateFrom) < strtotime($dateFromRestriction[$dateToKey]) && strtotime($dateTo) <= strtotime($dateFromRestriction[$dateToKey])) || (strtotime($dateFrom) >= strtotime($newDateTo) && strtotime($dateTo) > strtotime($newDateTo)))) {
|
||||
$errors[] = $objModule->l('Date ranges are conflicting with each other.', 'HotelRoomTypeLosDateRanges').' [ '.$objModule->l('Conflicting rows are', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).', '.($dateToKey+1).' ]';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
// Webservice :: webservice add function
|
||||
public function addWs($autodate = true, $null_values = false)
|
||||
{
|
||||
$objRoomType = new HotelRoomType();
|
||||
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($this->id_product)) {
|
||||
return $this->add($autodate, $null_values);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Webservice :: webservice update function
|
||||
public function updateWs($null_values = false)
|
||||
{
|
||||
$objRoomType = new HotelRoomType();
|
||||
if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($this->id_product)) {
|
||||
return $this->update($null_values);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Webservice :: webservice delete function
|
||||
public function deleteWs()
|
||||
{
|
||||
return $this->delete();
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ require_once 'classes/HotelRoomTypeGlobalDemand.php';
|
||||
require_once 'classes/HotelRoomTypeGlobalDemandAdvanceOption.php';
|
||||
require_once 'classes/HotelRoomTypeDemandPrice.php';
|
||||
require_once 'classes/HotelRoomTypeDemand.php';
|
||||
require_once 'classes/HotelRoomTypeRestrictionDateRange.php';
|
||||
|
||||
require_once 'classes/QloWebservice.php';
|
||||
require_once 'classes/QloRoomType.php';
|
||||
@@ -47,4 +48,4 @@ require_once 'classes/HotelBranchRefundRules.php';
|
||||
|
||||
// Web services classes
|
||||
require_once 'classes/WebserviceSpecificManagementQlo.php';
|
||||
require_once 'classes/WebserviceSpecificManagementHotelImages.php';
|
||||
require_once 'classes/WebserviceSpecificManagementHotelImages.php';
|
||||
|
||||
Reference in New Issue
Block a user