CREATE PROCEDURE [dbo].[OnlineGetAvailabilityCalendar21]
(
	@StartDate datetime
	,@EndDate datetime
	,@HotelNumber int
	,@ProductNumber int 
	,@NoAdults int
	,@NoChildren1 int
	,@NoChildren2 int
	,@NoOfDays int
	,@NoOfRooms int
	,@IncludePrices bit
	,@CountryNumber int = 1
	,@CustomerRateNumber int = 0
	,@CustomerNumber int = 0
	,@CampaignCodeText varchar(50) = ''
	,@RoomTypeNumber int = NULL
	,@ProductGroupID int = NULL
	,@ProductGroupIDs varchar(MAX) = NULL
  ,@GetDayPricesInCalendarMode bit = 0
)
AS
BEGIN
	-- Change history:
	-- 2024-08-15 MLJ V48 Added @GetDayPricesInCalendarMode
	-- 2022-01-13 MLJ Added parameter @ProductGroupIDs
	-- 2022-01-10 MLJ Added @ProductGroupID parameter
	-- 2021-12-30 MLJ Added @RoomTypeNumber parameter
	-- 2021-12-03 MLJ Functionality moved to OnlineGetAvailabilityBase21
	-- 2021-11-26 MLJ Changed status for 1-day stays to "no arrival" instead of "fully booked" when no availability is caused by restrictions
	-- 2021-11-22 MLJ Fixed errors in support for Yield (2)
	-- 2021-11-22 MLJ Fixed errors in support for Yield
	-- 2021-11-22 MLJ Added support for Yield
	-- 2021-11-15 MLJ Fixed error when RestrictionLength was NULL
	--

	EXEC dbo.OnlineGetAvailabilityBase21
		@StartDate 
		,@EndDate 
		,@HotelNumber 
		,@NoAdults 
		,@NoChildren1 
		,@NoChildren2
		,@NoOfDays 
		,@NoOfRooms
		,@IncludePrices 
		,1 -- @CalendarMode 
		,@CountryNumber
		,@CustomerRateNumber 
		,@CustomerNumber 
		,@CampaignCodeText
		,@RoomTypeNumber
		,@ProductNumber
		,@ProductGroupID
		,@ProductGroupIDs 
    ,@GetDayPricesInCalendarMode
END
