Merge branch 'develop' into gli-2152

This commit is contained in:
vishalsingh.qlo325
2025-05-07 17:03:34 +05:30
32 changed files with 372 additions and 138 deletions

View File

@@ -1696,7 +1696,7 @@
headers: {
"cache-control": "no-cache"
},
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
dataType: 'JSON',
cache: false,
data: {
@@ -1722,7 +1722,6 @@
</script>
<div class="leadin">{block name="leadin"}{/block}</div>
{include file='controllers/orders/_current_cart_details_data.tpl'}
{* If cart has errors the do not allow to proceed with this cart *}
<div class="panel form-horizontal" id="customer_part" {if isset($is_order_created) && $is_order_created}style="display:none;"{/if}>
<div class="panel-heading">
@@ -1812,6 +1811,7 @@
</div>
</div> -->*}<!-- by webkul to hide unnessesary content -->
</div>
{include file='controllers/orders/_current_cart_details_data.tpl'}
<form class="form-horizontal" action="{$link->getAdminLink('AdminOrders')|escape:'html':'UTF-8'}&amp;addorder=1&amp;cart_id={$cart->id}" method="post" style="display:none" id="cart_detail_form">
<div class="panel" id="products_part" style="display:none;">
@@ -2198,6 +2198,19 @@
{else}
{assign var=is_full_payment value=true}
{/if}
<div class="form-group">
<label class="control-label col-lg-3">{l s="Send mails"}</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="send_mails" id="send_mails_on" value="1" checked="checked">
<label for="send_mails_on">{l s="Yes"}</label>
<input type="radio" name="send_mails" id="send_mails_off" value="0">
<label for="send_mails_off">{l s="No"}</label>
<a class="slide-button btn"></a>
</span>
<p class="help-block">{l s='If disabled, no mail related to this order will be sent during order creation.'}</p>
</div>
</div>
<div class="form-group" {if $order_total <= 0}style="display: none;"{/if}>
<label class="control-label col-lg-3">{l s="Full payment"}</label>
<div class="col-lg-9">

View File

@@ -124,17 +124,21 @@
</div>
</td>
<td>
<div class="fixed-width-xl">
<select class="service_product_id_tax_rules_group" name="{$inputs_prefix}id_tax_rules_group">
<option value="0">{l s='No Tax'}</option>
{foreach from=$tax_rules_groups item=tax_rules_group}
<option value="{$tax_rules_group.id_tax_rules_group}" {if isset($smarty.post["{$inputs_prefix}id_tax_rules_group"])}{if $tax_rules_group.id_tax_rules_group == $smarty.post["{$inputs_prefix}id_tax_rules_group"]}{/if}{elseif $tax_rules_group.id_tax_rules_group == $service_product.id_tax_rules_group}selected{/if}>
{$tax_rules_group['name']|htmlentitiesUTF8}
</option>
{/foreach}
</select>
</div>
<div class="help-block">{l s='Default tax rule: %s' sprintf=$service_product.tax_rules_group_name}</div>
{if $service_product.auto_add_to_cart&& $service_product.price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
{l s='-'}
{else}
<div class="fixed-width-xl">
<select class="service_product_id_tax_rules_group" name="{$inputs_prefix}id_tax_rules_group">
<option value="0">{l s='No Tax'}</option>
{foreach from=$tax_rules_groups item=tax_rules_group}
<option value="{$tax_rules_group.id_tax_rules_group}" {if isset($smarty.post["{$inputs_prefix}id_tax_rules_group"])}{if $tax_rules_group.id_tax_rules_group == $smarty.post["{$inputs_prefix}id_tax_rules_group"]}{/if}{elseif $tax_rules_group.id_tax_rules_group == $service_product.id_tax_rules_group}selected{/if}>
{$tax_rules_group['name']|htmlentitiesUTF8}
</option>
{/foreach}
</select>
</div>
<div class="help-block">{l s='Default tax rule: %s' sprintf=$service_product.tax_rules_group_name}</div>
{/if}
</td>
</tr>
{/foreach}

View File

@@ -296,7 +296,10 @@ class MailCore extends ObjectModel
}
/* Create mail and attach differents parts */
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;
if (Configuration::get('PS_MAIL_SUBJECT_PREFIX')) {
$subject = '[' . strip_tags($configuration['PS_SHOP_NAME']) . '] ' . $subject;
}
$message->setSubject($subject);
$message->setCharset('utf-8');

View File

@@ -1155,6 +1155,7 @@ class AdminControllerCore extends Controller
header('Cache-Control: no-store, no-cache');
header('Content-disposition: attachment; filename="'.$this->table.'_'.date('Y-m-d_His').'.csv"');
$fd = fopen('php://output', 'wb');
$headers = array();
foreach ($this->fields_list as $key => $datas) {
if ('PDF' === $datas['title']) {
@@ -1167,9 +1168,10 @@ class AdminControllerCore extends Controller
}
}
}
$content = array();
fputcsv($fd, $headers, ';', $text_delimiter);
foreach ($this->_list as $i => $row) {
$content[$i] = array();
$content = array();
$path_to_image = false;
foreach ($this->fields_list as $key => $params) {
$field_value = isset($row[$key]) ? Tools::htmlentitiesDecodeUTF8(Tools::nl2br($row[$key])) : '';
@@ -1189,21 +1191,16 @@ class AdminControllerCore extends Controller
$field_value = call_user_func_array(array($callback_obj, $params['callback']), array($field_value, $row));
}
}
$content[$i][] = $field_value;
$content[] = $field_value;
}
fputcsv($fd, $content, ';', $text_delimiter);
}
$this->context->smarty->assign(array(
'export_precontent' => "",
'export_headers' => $headers,
'export_content' => $content,
'text_delimiter' => $text_delimiter
)
);
$this->layout = 'layout-export.tpl';
@fclose($fd);
die;
}
/**
* Object Delete
*

View File

@@ -3146,14 +3146,14 @@ class WebserviceSpecificManagementBookingsCore Extends ObjectModel implements We
$totalPriceTaxExcl = $unitPriceTaxExcl * $quantity;
$totalPriceTaxIncl = $unitPriceTaxIncl * $quantity;
if (isset($service['unit_price_without_tax'])) {
$unitPriceTaxExcl = $service['unit_price_without_tax'];
if (isset($services[$product['id_product']]['unit_price_without_tax'])) {
$unitPriceTaxExcl = $services[$product['id_product']]['unit_price_without_tax'];
$unitPriceTaxIncl = $unitPriceTaxExcl * $oldTaxMultiplier;
$totalPriceTaxExcl = $unitPriceTaxExcl * $quantity;
$totalPriceTaxIncl = $unitPriceTaxIncl * $quantity;
} else if (isset($service['total_price_without_tax'])) {
$totalPriceTaxExcl = $service['total_price_without_tax'];
} else if (isset($services[$product['id_product']]['total_price_without_tax'])) {
$totalPriceTaxExcl = $services[$product['id_product']]['total_price_without_tax'];
$totalPriceTaxIncl = $totalPriceTaxExcl * $oldTaxMultiplier;
$unitPriceTaxExcl = $totalPriceTaxExcl / $quantity;

View File

@@ -1158,19 +1158,80 @@ class AdminCartsControllerCore extends AdminController
// Process when admin changes extra demands of any room while order creation process form.tpl
public function ajaxProcessChangeRoomDemands()
{
$response = array('status' => false);
if ($idCartBooking = Tools::getValue('id_cart_booking')) {
if (Validate::isLoadedObject($objCartbookingCata = new HotelCartBookingData($idCartBooking))) {
$roomDemands = Tools::getValue('room_demands');
$roomDemands = json_decode($roomDemands, true);
$roomDemands = json_encode($roomDemands);
$objCartbookingCata->extra_demands = $roomDemands;
if ($objCartbookingCata->save()) {
$response['status'] = true;
if ($this->tabAccess['edit'] === '1') {
$response = array('status' => false);
if ($idCartBooking = Tools::getValue('id_cart_booking')) {
if (Validate::isLoadedObject($objCartbookingCata = new HotelCartBookingData($idCartBooking))) {
$roomDemands = Tools::getValue('room_demands');
$roomDemands = json_decode($roomDemands, true);
$roomDemands = json_encode($roomDemands);
$objCartbookingCata->extra_demands = $roomDemands;
if ($objCartbookingCata->save()) {
$response['status'] = true;
}
}
}
$this->ajaxDie(json_encode($response));
}
}
public function ajaxProcessUpdateServiceProduct()
{
if ($this->tabAccess['edit'] === '1') {
$operator = Tools::getValue('operator', 'up');
$idServiceProduct = Tools::getValue('id_product');
$idCartBooking = Tools::getValue('id_cart_booking');
$qty = Tools::getValue('qty');
if (Validate::isLoadedObject($objHotelCartBookingData = new HotelCartBookingData($idCartBooking))) {
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
if ($operator == 'up') {
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
if ($objRoomTypeServiceProduct->isRoomTypeLinkedWithProduct($objHotelCartBookingData->id_product, $idServiceProduct)) {
// validate quanitity
if (Validate::isLoadedObject($objProduct = new Product($idServiceProduct))) {
if ($objProduct->allow_multiple_quantity) {
if (!Validate::isUnsignedInt($qty)) {
$this->errors[] = Tools::displayError('The quantity code you\'ve entered is invalid.');
// } elseif ($objProduct->max_quantity && $qty > $objProduct->max_quantity) {
// $this->errors[] = Tools::displayError(sprintf('cannot add more than %d quantity.', $objProduct->max_quantity));
}
} else {
$qty = 1;
}
} else {
$this->errors[] = Tools::displayError('This Service is not available.');
}
} else {
$this->errors[] = Tools::displayError('This Service is not available with selected room.');
}
}
if (empty($this->errors)) {
if ($objRoomTypeServiceProductCartDetail->updateCartServiceProduct(
$idCartBooking,
$idServiceProduct,
$qty,
$objHotelCartBookingData->id_cart,
$operator
)) {
$this->ajaxDie(json_encode(array(
'hasError' => false
)));
} else {
$this->errors[] = Tools::displayError('Unable to update services. Please try reloading the page.');
}
}
} else {
$this->errors[] = Tools::displayError('Room not found. Please try reloading the page.');
}
$this->ajaxDie(json_encode(array(
'hasError' => true,
'errors' => $this->errors
)));
}
$this->ajaxDie(json_encode($response));
}
public static function getOrderTotalUsingTaxCalculationMethod($id_cart)

View File

@@ -95,6 +95,12 @@ class AdminEmailsControllerCore extends AdminController
2 => $this->l('Set my own SMTP parameters (for advanced users ONLY)')
)
),
'PS_MAIL_SUBJECT_PREFIX' => array(
'title' => $this->l('Enable the website name as a prefix in the email\'s subject'),
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool',
),
'PS_MAIL_TYPE' => array(
'title' => '',
'validation' => 'isGenericName',
@@ -111,7 +117,7 @@ class AdminEmailsControllerCore extends AdminController
'validation' => 'isBool',
'cast' => 'intval',
'type' => 'bool'
),
)
),
'submit' => array('title' => $this->l('Save'))
),

View File

@@ -1674,7 +1674,7 @@ class AdminOrdersControllerCore extends AdminController
$this->errors[] = Tools::displayError('The invoice for edit note was unable to load. ');
}
} elseif (Tools::isSubmit('submitAddOrder') && ($id_cart = Tools::getValue('id_cart'))) {
if ($this->tabAccess['edit'] === '1') {
if ($this->tabAccess['add'] === '1') {
$objCart = new Cart($id_cart);
if (Validate::isLoadedObject($objCart)) {
$this->context->cart = $objCart;
@@ -1776,6 +1776,7 @@ class AdminOrdersControllerCore extends AdminController
$amountPaid = Tools::ps_round($amountPaid, 6);
$objEmployee = new Employee($this->context->cookie->id_employee);
$sendMails = Tools::getValue('send_mails', true);
$objPaymentModule->validateOrder(
$objCart->id,
@@ -1786,7 +1787,9 @@ class AdminOrdersControllerCore extends AdminController
$extraVars,
null,
false,
$objCart->secure_key
$objCart->secure_key,
null,
$sendMails
);
if (isset($this->context->cookie->id_cart)) {
@@ -2589,11 +2592,11 @@ class AdminOrdersControllerCore extends AdminController
$helper->id = 'box-today-stay-over';
$helper->icon = 'icon-user';
$helper->color = 'color4';
$helper->title = $this->l('Stay Overs', null, null, false);
$helper->title = $this->l('Occupied Rooms', null, null, false);
$helper->subtitle = $this->l('Today', null, null, false);
$helper->href = $this->context->link->getAdminLink('AdminOrders').'&submitResetorder&submitFilterorder=1&orderFilter_hbd!is_refunded=0&orderFilter_hbd!id_status='.HotelBookingDetail::STATUS_CHECKED_IN.'&orderFilter_hbd!date_to[]='.pSQL(date('Y-m-d', strtotime('+ 1 days'))).'&orderFilter_hbd!date_to[]=';
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=today_stay_over';
$helper->tooltip = $this->l('Total number of stay overs for today.', null, null, false);
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=occupied_rooms';
$helper->tooltip = $this->l('The count of rooms that are currently occupied by guests.', null, null, false);
$this->kpis[] = $helper;
$helper = new HelperKpi();
@@ -7118,63 +7121,6 @@ class AdminOrdersControllerCore extends AdminController
die(json_encode($response));
}
public function ajaxProcessUpdateServiceProduct()
{
$operator = Tools::getValue('operator', 'up');
$idServiceProduct = Tools::getValue('id_product');
$idCartBooking = Tools::getValue('id_cart_booking');
$qty = Tools::getValue('qty');
if (Validate::isLoadedObject($objHotelCartBookingData = new HotelCartBookingData($idCartBooking))) {
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
if ($operator == 'up') {
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
if ($objRoomTypeServiceProduct->isRoomTypeLinkedWithProduct($objHotelCartBookingData->id_product, $idServiceProduct)) {
// validate quanitity
if (Validate::isLoadedObject($objProduct = new Product($idServiceProduct))) {
if ($objProduct->allow_multiple_quantity) {
if (!Validate::isUnsignedInt($qty)) {
$this->errors[] = Tools::displayError('The quantity code you\'ve entered is invalid.');
// } elseif ($objProduct->max_quantity && $qty > $objProduct->max_quantity) {
// $this->errors[] = Tools::displayError(sprintf('cannot add more than %d quantity.', $objProduct->max_quantity));
}
} else {
$qty = 1;
}
} else {
$this->errors[] = Tools::displayError('This Service is not available.');
}
} else {
$this->errors[] = Tools::displayError('This Service is not available with selected room.');
}
}
if (empty($this->errors)) {
if ($objRoomTypeServiceProductCartDetail->updateCartServiceProduct(
$idCartBooking,
$idServiceProduct,
$qty,
$objHotelCartBookingData->id_cart,
$operator
)) {
$this->ajaxDie(json_encode(array(
'hasError' => false
)));
} else {
$this->errors[] = Tools::displayError('Unable to update services. Please try reloading the page.');
}
}
} else {
$this->errors[] = Tools::displayError('Room not found. Please try reloading the page.');
}
$this->ajaxDie(json_encode(array(
'hasError' => true,
'errors' => $this->errors
)));
}
// To change the status of the room
public function changeRoomStatus()
{

View File

@@ -785,6 +785,9 @@
<configuration id="PS_MAIL_METHOD" name="PS_MAIL_METHOD">
<value>1</value>
</configuration>
<configuration id="PS_MAIL_SUBJECT_PREFIX" name="PS_MAIL_SUBJECT_PREFIX">
<value>1</value>
</configuration>
<configuration id="PS_SHOP_ACTIVITY" name="PS_SHOP_ACTIVITY">
<value>Animaux</value>
</configuration>

View File

@@ -20,6 +20,10 @@
(function($) {
var dateRangePickerOrg = $.fn.dateRangePicker;
Object.assign($.dateRangePickerLanguages, {
zh: $.dateRangePickerLanguages.cn,
tw: $.dateRangePickerLanguages.tc
});
$.fn.dateRangePicker = function(opt) {
if(typeof opt === "object") {
let container = $(this).parent();

View File

@@ -80,4 +80,10 @@ class BankwirePaymentModuleFrontController extends ModuleFrontController
$this->setTemplate('payment_execution.tpl');
}
public function setMedia()
{
parent::setMedia();
$this->addJS($this->module->getLocalPath().'views/js/front/payment.js');
}
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,30 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
$(document).ready(function () {
$(document).on('click', '.confirm_order', function(e){
e.preventDefault();
$(this).attr('disabled', 'disabled');
$(this).closest('form').get(0).submit();
});
});

View File

@@ -0,0 +1,32 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -85,12 +85,12 @@
</p>
</div><!-- .cheque-box -->
<p class="cart_navigation clearfix" id="cart_navigation">
<a class="btn" href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}">
<i class="icon-chevron-left"></i>&nbsp;{l s='Other payment methods' mod='bankwire'}
</a>
<a href="{$link->getPageLink('order', true, NULL, "step=3")|escape:'html':'UTF-8'}" class="button-exclusive btn btn-default">
<i class="icon-chevron-left"></i>{l s='Other payment methods' mod='bankwire'}
</a>
{*By webkul To Check Order restrict condition before Payment by the customer*}
{if !$restrict_order}
<button class="btn pull-right button button-medium" type="submit">
<button class="btn pull-right button button-medium confirm_order" type="submit">
<span>{l s='I confirm my order' mod='bankwire'}&nbsp;<i class="icon-chevron-right right"></i></span>
</button>
{/if}

View File

@@ -83,4 +83,10 @@ class ChequePaymentModuleFrontController extends ModuleFrontController
$this->setTemplate('payment_execution.tpl');
}
public function setMedia()
{
parent::setMedia();
$this->addJS($this->module->getLocalPath().'views/js/front/payment.js');
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,29 @@
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
$(document).ready(function () {
$(document).on('click', '.confirm_order', function(e){
e.preventDefault();
$(this).attr('disabled', 'disabled');
$(this).closest('form').get(0).submit();
});
});

View File

@@ -0,0 +1,32 @@
<?php
/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -81,11 +81,11 @@
<i class="icon-chevron-left"></i>{l s='Other payment methods' mod='cheque'}
</a>
{*By webkul To Check Order restrict condition before Payment by the customer*}
{if !$restrict_order}
<button class="btn pull-right" type="submit">
<span>{l s='I confirm my order' mod='bankwire'}&nbsp;<i class="icon-chevron-right right"></i></span>
</button>
{/if}
{if !$restrict_order}
<button class="btn pull-right button button-medium confirm_order" type="submit">
<span>{l s='I confirm my order' mod='cheque'}&nbsp;<i class="icon-chevron-right right"></i></span>
</button>
{/if}
</p>
</form>
{/if}

View File

@@ -79,7 +79,7 @@ class DashGuestCycle extends Module
$dataValue['dgc_total_departures'] = sprintf('%02d', rand(100, 1000));
$dataValue['dgc_departed'] = sprintf('%02d', rand(0, $dataValue['dgc_total_departures']));
$dataValue['dgc_new_bookings'] = sprintf('%02d', rand(10, 500));
$dataValue['dgc_stay_overs'] = sprintf('%02d', rand(10, 500));
$dataValue['dgc_occupied'] = sprintf('%02d', rand(10, 500));
$dataValue['dgc_new_messages'] = sprintf('%02d', rand(0, 20));
$dataValue['dgc_cancelled_bookings'] = sprintf('%02d', rand(0, 20));
$dataValue['dgc_guests_adults'] = sprintf('%02d', rand(100, 1000));
@@ -94,7 +94,12 @@ class DashGuestCycle extends Module
$dataValue['dgc_departed'] = sprintf('%02d', $departuresData['departed']);
$dataValue['dgc_total_departures'] = sprintf('%02d', $departuresData['total_departures']);
$dataValue['dgc_new_bookings'] = sprintf('%02d', count(AdminStatsController::getNewBookingsInfoByDate($dateToday, $params['id_hotel'])));
$dataValue['dgc_stay_overs'] = sprintf('%02d', AdminStatsController::getStayOversByDate($dateToday, $params['id_hotel']));
$dataValue['dgc_occupied'] = sprintf('%02d', AdminStatsController::getDistinctRoomBookingsCount(
date('Y-m-d', strtotime('-1 day')),
$dateToday,
$params['id_hotel'],
HotelBookingDetail::STATUS_CHECKED_IN
));
$dataValue['dgc_new_messages'] = sprintf('%02d', CustomerMessage::getMessagesByDate($dateToday));
$dataValue['dgc_cancelled_bookings'] = sprintf('%02d', AdminStatsController::getCancelledBookingsByDate($dateToday, $params['id_hotel']));
$dataValue['dgc_guests_adults'] = sprintf('%02d', $guestsData['adults']);

View File

@@ -68,15 +68,15 @@
</div>
</div>
<div class="badge-wrapper">
<div class="badge-item label-tooltip" data-toggle="tooltip" data-original-title="{l s='The number of stay overs scheduled for today.' mod='dashguestcycle'}">
<div class="badge-item label-tooltip" data-toggle="tooltip" data-original-title="{l s='The count of rooms that are currently occupied by guests.' mod='dashguestcycle'}">
<div class="badge-strip" style="background-color: #FFC148;"></div>
<div class="badge-content-wrapper">
<div class="title-wrapper">
<p class="text-center">{l s="Stay Overs" mod='dashguestcycle'}</p>
<p class="text-center">{l s='Occupied Rooms' mod='dashguestcycle'}</p>
</div>
<div class="value-wrapper">
<p class="text-center">
<span id="dgc_stay_overs"></span>
<span id="dgc_occupied"></span>
</p>
</div>
</div>

View File

@@ -506,16 +506,14 @@ $(document).ready(function() {
opt: 0,
},
success: function(result) {
if (result) {
if (!(result.success)) {
$(".cart_booking_btn").attr('disabled', 'true');
}
if (!result.success) {
$(".cart_booking_btn").attr('disabled', 'true');
} else {
$("#htl_rooms_list").empty().append(result.data.room_tpl);
refreshCartData();
refreshStatsData();
calendar.refetchEvents();
initBookingList();
var panel_btn = $(".tab-pane tr td button[data-id-cart-book-data='" + id_cart_book_data + "']");
panel_btn.attr('data-id-cart', '');
@@ -527,7 +525,6 @@ $(document).ready(function() {
panel_btn.removeClass('part_delete_cart_data').addClass('par_add_cart');
panel_btn.removeClass('btn-danger').addClass('btn-primary').html(add_to_cart);
}
}
});

View File

@@ -85,7 +85,7 @@
<div class="dropdown">
<button class="form-control input-occupancy header-rmsearch-input {if isset($error) && $error == 1}error_border{/if}" type="button" data-toggle="dropdown" id="guest_occupancy">
<span class="pull-left">{if (isset($search_data['occupancy_adults']) && $search_data['occupancy_adults'])}{$search_data['occupancy_adults']} {if $search_data['occupancy_adults'] > 1}{l s='Adults' mod='wkroomsearchblock'}{else}{l s='Adult' mod='wkroomsearchblock'}{/if}, {if isset($search_data['occupancy_children']) && $search_data['occupancy_children']}{$search_data['occupancy_children']} {if $search_data['occupancy_children'] > 1}
{l s='Children' mod='wkroomsearchblock'}{else}{l s='Child' mod='wkroomsearchblock'}{/if}, {/if}{$search_data['occupancies']|count} {if $search_data['occupancies']|count > 1}{l s='Rooms' mod='wkroomsearchblock'}{else}{l s='Room'}{/if}{else}{l s='1 Adult, 1 Room' mod='wkroomsearchblock'}{/if}</span>
{l s='Children' mod='wkroomsearchblock'}{else}{l s='Child' mod='wkroomsearchblock'}{/if}, {/if}{$search_data['occupancies']|count} {if $search_data['occupancies']|count > 1}{l s='Rooms' mod='wkroomsearchblock'}{else}{l s='Room' mod='wkroomsearchblock'}{/if}{else}{l s='1 Adult, 1 Room' mod='wkroomsearchblock'}{/if}</span>
</button>
<div id="search_occupancy_wrapper" class="dropdown-menu">
<div id="occupancy_inner_wrapper">

View File

@@ -81,8 +81,7 @@
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="10">
<td colspan="12">
{$HOOK_DISPLAY_PDF}
</td>
</tr>

View File

@@ -294,8 +294,7 @@
<div style="line-height: 1pt">&nbsp;</div>
<table style="width: 100%">
<tr>
<td style="width: 15%"></td>
<td style="width: 85%">{$HOOK_DISPLAY_PDF}</td>
<td style="width: 100%">{$HOOK_DISPLAY_PDF}</td>
</tr>
</table>
{/if}

View File

@@ -131,8 +131,7 @@
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="10">
<td colspan="12">
{$HOOK_DISPLAY_PDF}
</td>
</tr>

View File

@@ -81,8 +81,7 @@
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="10">
<td colspan="12">
{$HOOK_DISPLAY_PDF}
</td>
</tr>

View File

@@ -103,8 +103,7 @@
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="10">
<td colspan="12">
{$HOOK_DISPLAY_PDF}
</td>
</tr>

View File

@@ -90,7 +90,7 @@
</a>
{*By webkul To Check Order restrict condition before Payment by the customer*}
{if !$restrict_order}
<button class="btn pull-right button button-medium" type="submit">
<button class="btn pull-right button button-medium confirm_order" type="submit">
<span>{l s='I confirm my order' mod='bankwire'}&nbsp;<i class="icon-chevron-right right"></i></span>
</button>
{/if}

View File

@@ -31,8 +31,8 @@
</button>
<ul class="dropdown-menu" aria-labelledby="user_info_acc">
<li><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}">{l s='Accounts' mod='blockuserinfo'}</a></li>
<li><a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='View my orders' mod='blockuserinfo'}">{l s='Orders'}</a></li>
<li><a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Logout'}</a></li>
<li><a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='View my orders' mod='blockuserinfo'}">{l s='Orders' mod='blockuserinfo'}</a></li>
<li><a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Logout' mod='blockuserinfo'}</a></li>
{block name='displayUserNavigationList'}
{hook h='displayUserNavigationList'}
{/block}

View File

@@ -82,7 +82,7 @@
</a>
{*By webkul To Check Order restrict condition before Payment by the customer*}
{if !$restrict_order}
<button class="btn pull-right button button-medium" type="submit">
<button class="btn pull-right button button-medium confirm_order" type="submit">
<span>{l s='I confirm my order' mod='cheque'}&nbsp;<i class="icon-chevron-right right"></i></span>
</button>
{/if}