Generate UDF Functions
Generate Based on Adults
Description
This function accepts a number (for example, a package price or allowance) and multiplies it against the number of adults associated with the reservation.
Function
generate_on_adults (RESV_NAME_ID,number)
Parameter
Parameter | Description |
---|---|
RESV_NAME_ID |
System-assigned reservation ID. Provided by the function. |
number |
A number (for example, a package price or allowance) |
Example
Assume that a meal allowance on a transaction code is based on the number of adults on the reservation. If the meal allowance is 140 per adult, use this function as follows to determine the allowance:
generate_on_adults
(RESV_NAME_ID,140)
GEN Tax UDF
Description
This function calculates an accommodation tax that depends on the net room rate per adult as described below.
-
If the net room rate per adult (excluding tax, service charge, and package elements) is less than 10,000, there is zero tax.
-
If the net room rate per adult (excluding tax, service charge, and package elements) is between 10,000 and 15,000, the tax is 100 per adult.
-
If the net room rate per adult (excluding tax, service charge, and package elements) is above 15,000, the tax is 200 per adult.
-
In the event of sharing guests, the function calculates based on the rate per adult in the room.
-
When routing room rate to a PM room, the number of adults is taken from the originating room rather than from the PM room.
Note:
When the room charge is routed, the Cashiering > Tax Type Calculation application setting must be set to Reservation for the number of adults to be based on the source reservation rather than the target (PM) reservation.
Function
gen_tax_udf(RESV_NAME_ID,
BASE)
Parameters
Parameter | Description |
---|---|
RESV_NAME_ID |
System-assigned reservation ID. Provided by the function. |
BASE |
Net room rate per adult (excluding tax, service charges, package elements). |
Example 1
Two guests are sharing a room, each with a (split) rate of 8000 (total 16,000). Zero tax is applicable since the rate per person (16,000/2) is less than 10,000. If the sharing guest has a zero rate (the primary guest has a 16,000 rate and the sharer has a 0 rate), the rate per adult is still less than 10,000 (16,000/2) and the tax is 0.
Example 2
If the net room rate is 12,500 for each of 2 sharing guests (the per-adult rate is between 10,000 and 15,000), a tax of 100 would be posted to each guest. If the sharing guest has a zero rate (the primary guest has a 25,000 rate and the sharer has a 0 rate), the rate per adult is 12,500 (25,000/2) the tax is 200.
Calculate Tax (General Excise Tax) on Rate Code if Package is Included
Description
This function calculates a tax on the full amount of a rate code if (and only if) a reservation has a package attached either to the rate code or directly on the reservation. The function checks whether a package exists on the reservation and, if so, calculates the specified percentage over the full amount. This function should be configured as a generate on the lodging transaction code.
Function
gen_tax_udf_full(RESV_NAME_ID,BASE,get_tax)
Parameters
Parameter | Description |
---|---|
RESV_NAME_ID |
System-assigned reservation ID. Provided by the function. |
BASE |
Rate amount (excluding other taxes and service charges). Rate amount includes packages. |
get_tax |
Tax to be applied to full amount of the rate code. |
Example 1
All generates are configured as Tax Exclusive.
Rate for Rate Code TEST for 1 person is 500.00 (which includes a package for Breakfast for 20.00). Sales tax is 7.25% and TAT (Transient Accommodation Tax) is 7.25% on Room only. GET (General Excise Tax) is 4.166%.
The Sales tax, TAT and GET are configured using generates on their transaction codes.
GET generate employs gen_tax_udf_full function to calculate 4.166% over 500.
gen_tax_udf_full(resv_name_id,base,4.166)
-
Lodging 480.00 + 7.25% TAT tax (34.80)
-
Food 20.00 + 7.25% Sales tax (1.45)
-
GET calculated over 500.00 = 20.83
Parent topic: About Transaction Generates