From c67ba818592e9313995bf1920c3e2712a7f7d75d Mon Sep 17 00:00:00 2001 From: amit sharma Date: Thu, 24 Sep 2026 17:24:47 +0530 Subject: [PATCH] Fixed: Add validation for minimum and maximum length of stay Co-authored-by: Name --- .../classes/HotelRoomTypeRestrictionDateRange.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hotelreservationsystem/classes/HotelRoomTypeRestrictionDateRange.php b/modules/hotelreservationsystem/classes/HotelRoomTypeRestrictionDateRange.php index 9f6277aac..b8105b628 100644 --- a/modules/hotelreservationsystem/classes/HotelRoomTypeRestrictionDateRange.php +++ b/modules/hotelreservationsystem/classes/HotelRoomTypeRestrictionDateRange.php @@ -136,7 +136,8 @@ class HotelRoomTypeRestrictionDateRange extends ObjectModel $errors[] = $objModule->l('Maximum length of stay is invalid.', 'HotelRoomTypeLosDateRanges'). ' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]'; } elseif ($minDay && $maxDay > 0 && ($minDay > $maxDay)) { - $this->errors[] = Tools::displayError('Value of global maximum length of stay must be greater than global minimum length of stay.'); + $errors[] = $objModule->l('Maximum length of stay must be greater than minimum length of stay.', 'HotelRoomTypeLosDateRanges'). + ' [ '.$objModule->l('LOS for date range in row no.', 'HotelRoomTypeLosDateRanges').' : '.($dateFromKey+1).' ]'; } if (!$dateFrom || $dateFrom == '') {