Fixed: Make status optional in Bulk Update Rooms in back-office

Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
azhar bhat
2026-07-02 16:02:55 +05:30
parent a000f7e711
commit 5c73a8ea4b
2 changed files with 5 additions and 2 deletions

View File

@@ -343,6 +343,7 @@
</label>
<div class="col-lg-6">
<select class="form-control bulk_update_room_status" name="bulk_update_room_status">
<option value="0">{l s='Select Status'}</option>
{foreach from=$rm_status item=room_stauts}
<option value="{$room_stauts['id']}">{$room_stauts['status']|escape:'htmlall':'UTF-8'}</option>
{/foreach}
@@ -1027,7 +1028,7 @@
$('#bulkUpdateRoomModal').on('show.bs.modal', function(e){
if (!$(e.relatedTarget).attr('disabled')) {
$('#bulkUpdateRoomModal table tbody').html('');
$('.bulk_update_room_status').val(rm_status.STATUS_ACTIVE.id).closest('.modal-body').find('.rooms-disable-dates').parent().hide();
$('.bulk_update_room_status').val('0').closest('.modal-body').find('.rooms-disable-dates').parent().hide();
$('[name="bulk_update_room_comment"]').val('');
$('[name="bulk_update_room_floor"]').val('');
$('#page-loader').show();

View File

@@ -5506,7 +5506,9 @@ class AdminProductsControllerCore extends AdminController
if (empty($this->errors)) {
foreach ($roomsInfo as $roomInfo) {
$objHotelRoomInfo = new HotelRoomInformation($roomInfo['id']);
$objHotelRoomInfo->id_status = $roomInfo['id_status'];
if (!empty($roomInfo['id_status'])) {
$objHotelRoomInfo->id_status = $roomInfo['id_status'];
}
if (isset($roomInfo['floor']) && $roomInfo['floor'] != '') {
$objHotelRoomInfo->floor = $roomInfo['floor'];
}