From c91935a28d7eac3d08f5db3c00b0fe8e09858b32 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Tue, 21 May 2024 17:50:06 +0530 Subject: [PATCH 01/24] Fixed:The option to select children's age is not showing in the popup while editing occupancy on the order detail page. --- .../controllers/orders/modals/_edit_room_tab_content.tpl | 2 ++ js/admin/orders.js | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl index 444182bab..02d5ae38c 100644 --- a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl @@ -89,6 +89,8 @@ + +

diff --git a/js/admin/orders.js b/js/admin/orders.js index 8a551b4fa..25d8111a3 100644 --- a/js/admin/orders.js +++ b/js/admin/orders.js @@ -523,15 +523,12 @@ function initProductEvents() $(this).val(max_child_in_room); if (elementVal == 1) { showOccupancyError(no_children_allowed_txt, $(this).closest(".occupancy_info_block")); - haserror = true; } else { showOccupancyError(max_children_txt, $(this).closest(".occupancy_info_block")); - haserror = true; } } else if (elementVal > max_allowed_for_current) { $(this).val(max_allowed_for_current); showOccupancyError(max_occupancy_reached_txt, $(this).closest(".occupancy_info_block")); - haserror = true; } } else { max_adults_in_room = $(this).closest(".booking_occupancy_wrapper").find('.max_adults').val(); From f9ccc67a4e7ffb6da88e69210aafc75d9be14973 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Wed, 22 May 2024 12:23:38 +0530 Subject: [PATCH 02/24] Fixed:During addition of rooms in booking from backoffice, scrolling the page displaces the suggested room types from input in the modal --- admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss b/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss index 8240fa4ad..a126c3986 100644 --- a/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss +++ b/admin/themes/default/sass/vendor/bootstrap-sass/_modals.scss @@ -9,7 +9,7 @@ // Kill the scroll on the body .modal-open { - overflow-x: hidden; + overflow: hidden; } // Container that the modal scrolls within From c19a195d8b26ef134eb58d8206324f75e998f33e Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Wed, 22 May 2024 15:22:54 +0530 Subject: [PATCH 03/24] Fixed: Time is not shown with date for check-In and check-out status in Room Status section in back-office order detail page --- .../default/template/controllers/orders/helpers/view/view.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl index f28080e92..f20d03ea1 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -127,9 +127,9 @@ {if $data['id_status'] == $hotel_order_status['STATUS_ALLOTED']['id_status']} {l s='Alloted'} {elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']} - {l s='Checked in on'} {dateFormat date=$data['check_in']} + {l s='Checked in on'} {dateFormat date=$data['check_in'] full=1} {elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']} - {l s='Checked out on'} {dateFormat date=$data['check_out']} + {l s='Checked out on'} {dateFormat date=$data['check_out'] full=1} {/if} From e7f3fd1beb23b3fb8cb5d5b9f5009f075c85f9fd Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Wed, 22 May 2024 15:48:16 +0530 Subject: [PATCH 04/24] add scrollbar in Private note on order detail page --- admin/themes/default/sass/controllers/_order.sass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/themes/default/sass/controllers/_order.sass b/admin/themes/default/sass/controllers/_order.sass index c5315218e..c32768ed0 100644 --- a/admin/themes/default/sass/controllers/_order.sass +++ b/admin/themes/default/sass/controllers/_order.sass @@ -77,3 +77,6 @@ .room_status_info_form .room_status white-space: normal + +#noteContent + max-height: 200px \ No newline at end of file From e879c6638d58917c81d47198a71510865fb33da0 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Wed, 22 May 2024 18:40:30 +0530 Subject: [PATCH 05/24] Fixed:At the time of room edit mention price is tax included or excluded --- .../controllers/orders/modals/_add_room_booking.tpl | 4 ++-- .../controllers/orders/modals/_edit_room_tab_content.tpl | 2 +- .../modals/_extra_services_facilities_tab_content.tpl | 6 +++--- .../modals/_extra_services_service_products_tab_content.tpl | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl b/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl index 63d96c205..92beca110 100644 --- a/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_add_room_booking.tpl @@ -49,7 +49,7 @@
- +
{if $currency->format % 2}
{$currency->sign}
{/if} @@ -57,7 +57,7 @@
- +
{if $currency->format % 2}
{$currency->sign}
{/if} diff --git a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl index 02d5ae38c..932b0bc19 100644 --- a/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_edit_room_tab_content.tpl @@ -50,7 +50,7 @@
- +
{if $currency->format % 2}
{$currency->sign}
{/if} diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl index 1231752ca..4dee95332 100644 --- a/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_facilities_tab_content.tpl @@ -31,8 +31,8 @@ {l s='Name'} - {l s='Unit Price'} - {l s='Total Price'} + {l s='Unit Price (tax excl.)'} + {l s='Total Price (tax excl.)'} {l s='Action'} @@ -77,7 +77,7 @@ {l s='Name'} {l s='Option'} - {l s='Unit Price'} + {l s='Unit Price (tax excl.)'} diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index 67412d3fc..ac4ce1231 100644 --- a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -33,8 +33,8 @@ {l s='Name'} {l s='Quantity'} - {l s='Unit Price'} - {l s='Total Price'} + {l s='Unit Price (tax excl.)'} + {l s='Total Price (tax excl.)'} {l s='Action'} @@ -101,7 +101,7 @@ {l s='Name'} {l s='Quantity'} - {l s='Unit Price'} + {l s='Unit Price (tax excl.)'} From 2081d72d74a4377553bfd8cc064ca28414239159 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Wed, 22 May 2024 18:48:19 +0530 Subject: [PATCH 06/24] Fixed: Showing status booked on header even after all bookings are refunded on order detail page in back-office --- .../default/template/controllers/orders/helpers/view/view.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl index 74eb8d437..9f884e2b1 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -28,9 +28,9 @@ {block name=pageTitle}

{if is_array($title)}{$title|end|strip_tags}{else}{$title|strip_tags}{/if} - {if $currentState == Configuration::get('PS_OS_REFUND')} + {if $currentState->id == Configuration::get('PS_OS_REFUND')} {l s='Refunded'} - {elseif $currentState == Configuration::get('PS_OS_CANCELED')} + {elseif $currentState->id == Configuration::get('PS_OS_CANCELED')} {l s='Cancelled'} {else} {l s='Booked'} From 04132d354cc2c6cd2ccf14b07c3615318c58dae3 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Sat, 1 Jun 2024 13:57:13 +0530 Subject: [PATCH 07/24] Fixed: Text mentioned in the manual allotment is not visible on the order detail page in back-office --- .../controllers/orders/helpers/view/view.tpl | 6 ++- .../orders/modals/_room_allotment_comment.tpl | 28 +++++++++++ controllers/admin/AdminOrdersController.php | 24 ++++++++++ js/admin/orders.js | 46 +++++++++++++++++++ 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 admin/themes/default/template/controllers/orders/modals/_room_allotment_comment.tpl diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl index 9f884e2b1..ab8516fb5 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -125,7 +125,7 @@ {if $data['id_status'] == $hotel_order_status['STATUS_ALLOTED']['id_status']} - {l s='Alloted'} + {l s='Alloted'} {if $data['booking_type'] == HotelBookingDetail::ALLOTMENT_MANUAL}({l s='Manually'}){/if} {elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']} {l s='Checked in on'} {dateFormat date=$data['check_in'] full=1} {elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']} @@ -140,6 +140,10 @@ {/if} + + {if $data['booking_type'] == HotelBookingDetail::ALLOTMENT_MANUAL && $data['comment'] != ''} + + {/if} {/foreach} diff --git a/admin/themes/default/template/controllers/orders/modals/_room_allotment_comment.tpl b/admin/themes/default/template/controllers/orders/modals/_room_allotment_comment.tpl new file mode 100644 index 000000000..859ee5cb0 --- /dev/null +++ b/admin/themes/default/template/controllers/orders/modals/_room_allotment_comment.tpl @@ -0,0 +1,28 @@ +{* +* Since 2010 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 +* @copyright Since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} + + diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index c08b5f111..ef9e6ad44 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -779,6 +779,30 @@ class AdminOrdersControllerCore extends AdminController die(Tools::jsonEncode($response)); } + public function ajaxProcessInitRoomAllotmentCommentModal() + { + $response['hasError'] = 1; + if (Validate::isLoadedObject($objBookingDetail = new HotelBookingDetail(Tools::getValue('id_hotel_booking')))) { + if ($objBookingDetail->booking_type == HotelBookingDetail::ALLOTMENT_MANUAL) { + // get booking information by order + $this->context->smarty->assign('comment', $objBookingDetail->comment); + $modal = array( + 'modal_id' => 'room-allotment-comment-modal', + 'modal_class' => 'modal-md order_detail_modal', + 'modal_title' => '  '.$this->l('Room Manual Allotment Comment'), + 'modal_content' => $this->context->smarty->fetch('controllers/orders/modals/_room_allotment_comment.tpl'), + 'modal_actions' => array(), + ); + + $this->context->smarty->assign($modal); + $response['hasError'] = 0; + $response['modalHtml'] = $this->context->smarty->fetch('modal.tpl'); + } + } + + die(Tools::jsonEncode($response)); + } + public function ajaxProcessInitRoomReallocationModal() { // set modal details diff --git a/js/admin/orders.js b/js/admin/orders.js index 25d8111a3..4eaab342f 100644 --- a/js/admin/orders.js +++ b/js/admin/orders.js @@ -1705,6 +1705,18 @@ $(document).ready(function() { // End: RoomStatusModal: Processes // ====================================== + + // Start: RoomAllotmentCommentModal: Processes + $(document).on('click', '.manual_allotment_comment', function(e){ + e.preventDefault(); + + RoomAllotmentCommentModal.show(this); + }); + // End: RoomAllotmentCommentModal: Processes + // ====================================== + + + // Start: RoomReallocationModal: Processes // For processing room reallocation and swapping $(document).on('click', '.room_reallocate_swap', function(e) { @@ -2718,6 +2730,40 @@ const CancelRoomBookingModal = { } }; +// Modal object to handle comment on rooms for manual cancellation +const RoomAllotmentCommentModal = { + show: function(element) { + $(".loading_overlay").show(); + let idHtlBooking = parseInt($(element).attr('data-id_hotel_booking_detail')); + $.ajax({ + type: 'POST', + headers: { + "cache-control": "no-cache" + }, + url: admin_order_tab_link, + dataType: 'JSON', + cache: false, + data: 'ajax=true&id_hotel_booking='+idHtlBooking+'&action=initRoomAllotmentCommentModal', + success: function(result) { + if (result.hasError == 0 && result.modalHtml) { + $('#footer').next('.bootstrap').append(result.modalHtml); + + $('#room-allotment-comment-modal').modal('show'); + + } else { + showErrorMessage(txtSomeErr); + } + }, + complete: function() { + $(".loading_overlay").hide(); + } + }); + }, + close: function() { + $('#room-allotment-comment-modal').modal('hide'); + } +}; + function updateAdditionalServices(element) { var id_room_type_service_product_order_detail = $(element).data('id_room_type_service_product_order_detail'); From 0dbd6290480ccaaf7beae25b0282ee57fa51ba1f Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Sat, 1 Jun 2024 15:31:21 +0530 Subject: [PATCH 08/24] Fixed:Should have some gap between Refund status and refund amount on order detail page. --- admin/themes/default/sass/controllers/_order.sass | 5 ++++- .../template/controllers/orders/helpers/view/view.tpl | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/sass/controllers/_order.sass b/admin/themes/default/sass/controllers/_order.sass index c32768ed0..d061c8615 100644 --- a/admin/themes/default/sass/controllers/_order.sass +++ b/admin/themes/default/sass/controllers/_order.sass @@ -79,4 +79,7 @@ white-space: normal #noteContent - max-height: 200px \ No newline at end of file + max-height: 200px + +.panel-refund-request .refunded_amount + margin-top: 2px \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl index ab8516fb5..1ddf349a9 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -785,7 +785,7 @@

{/if} -
+
 {l s='Refund Requests'}
@@ -816,7 +816,7 @@ {$return_info.state_name} {if $return_info.refunded_amount > 0} -  {displayPrice price=$return_info.refunded_amount currency=$currency->id} +  {displayPrice price=$return_info.refunded_amount currency=$currency->id} {/if} From 4740b83032f86d0e95cc7bf6a6ef73103aacd77a Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Sat, 1 Jun 2024 15:58:26 +0530 Subject: [PATCH 09/24] Fixed: Children's age with Under 1 showing 0 in order detail page in back-office --- .../controllers/orders/_overbookings.tpl | 10 +++++++--- .../controllers/orders/_product_line.tpl | 6 +++++- .../classes/HotelBookingDetail.php | 16 ++++++++++------ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/admin/themes/default/template/controllers/orders/_overbookings.tpl b/admin/themes/default/template/controllers/orders/_overbookings.tpl index b2b89fa6c..154adbccf 100644 --- a/admin/themes/default/template/controllers/orders/_overbookings.tpl +++ b/admin/themes/default/template/controllers/orders/_overbookings.tpl @@ -43,15 +43,19 @@ {if $order->with_occupancy && $data['children']}