Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Prevent selection of already cancelled rooms during cancellation from front office #1072

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion controllers/front/OrderDetailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ public function displayAjaxSubmitRefundRequest()
break;
}

if (OrderReturn::getOrdersReturnDetail($objOrder->id, 0, $idHtlBooking)) {
if (($objHotelBookingDetail->is_cancelled || $objHotelBookingDetail->is_refunded)
|| (OrderReturn::getOrdersReturnDetail($objOrder->id, 0, $idHtlBooking))
) {
$this->errors[] = Tools::displayError('Some selected rooms have already been requested for cancellation.');
break;
}
Expand Down
2 changes: 1 addition & 1 deletion themes/hotel-reservation-theme/order-detail.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
</div>
<div class="rooms-summary">
{foreach from=$rm_v['hotel_booking_details'] item=$hotel_booking_detail name=foreachRefundRooms}
{assign var=is_room_cancelled value=(isset($refundReqBookings) && in_array($hotel_booking_detail.id_htl_booking, $refundReqBookings))}
{assign var=is_room_cancelled value=((isset($refundReqBookings) && in_array($hotel_booking_detail.id_htl_booking, $refundReqBookings)) || ($hotel_booking_detail.is_refunded || $hotel_booking_detail.is_cancelled))}
<div class="room-details {if $is_room_cancelled}cancelled{/if} clearfix">
<div class="occupancy-wrap">
<div class="checkbox">
Expand Down