Merge pull request #294 from shreesh-webkul/gli-628

Resolve order edit issues, also added hooks in the order edit process
This commit is contained in:
Rohit Jain
2022-01-31 16:35:26 +05:30
committed by GitHub
2 changed files with 22 additions and 0 deletions

View File

@@ -1031,6 +1031,15 @@ class HotelBookingDetail extends ObjectModel
$data['room_num'] = $room_num;
}
if ($result2 = Db::getInstance()->update($table2, $data, $where)) {
Hook::exec(
'actionRoomReAllocateAfter',
array(
'room_id' => $current_room_id,
'realloc_room_id' => $swapped_room_id,
'date_from' => $date_from,
'date_to' => $date_to,
)
);
return true;
}
return false;
@@ -1086,6 +1095,15 @@ class HotelBookingDetail extends ObjectModel
if ($result = Db::getInstance()->execute($sql)) {
$result2 = Db::getInstance()->execute($sql1);
if ($result2) {
Hook::exec(
'actionRoomSwapAfter',
array(
'room_id' => $current_room_id,
'swapped_room_id' => $swapped_room_id,
'date_from' => $date_from,
'date_to' => $date_to,
)
);
return true;
}
return false;