Skip to main content

RateTotalStay

  • RATETOTALSTAY(column,parm)

column A column number OR column name in the SQL query results which contain the Rate Code and where the result will be

parm 1A column number OR column name for the Room Type
parm 2A column number OR column name for the Date (Date Format)
parm 3A column number OR column name for Adults (optional / can be blank for 1)
parm 4A column number OR column name for Child (optional / can be blank for 0)
parm 5A column number OR column name for Number of Rooms (optional / can be blank for 1)
parm 6A numeric value to indicate the number of nights from start date. (optional / can be blank for 1)

For example: If you want the Rate to appear in column 4 of the results, the RATE CODE must be retrieved in column 4.

SELECT BEDTYPE,FOREDATE,2 as 'Adults','RACK' as 'RoomRate' FROM FORECAST

The RateTotalStay extension will then convert that Rate Code to the Rate Value for that Rate Code/Room Type/Date/Adults combination.

SELECT BEDTYPE,FOREDATE,2 AS 'Adults','RACK' as 'RoomRate' FROM FORECAST

WHERE FOREDATE BETWEEN CURRENT DATE AND CURRENT DATE + 31

AND SUBSTR(BEDTYPE,1,1) <> ')'

RATETOTALSTAY(4,1,2,3)

SETREPORTFOOTER 'Rates for RACK'



SELECT BEDTYPE,FOREDATE,2 AS 'Adults','RACK' as 'RoomRate' FROM FORECAST

WHERE FOREDATE BETWEEN CURRENT DATE AND CURRENT DATE + 31

AND SUBSTR(BEDTYPE,1,1) <> ')'

RATETOTALSTAY(ROOMRATE,BEDTYPE,FOREDATE,ADULTS)

SETREPORTFOOTER 'Rates for RACK'