Changes

Jump to navigation Jump to search

Template Variables

2,902 bytes added, 11:08, 15 August 2022
[LEAVINGDAYAVAIL] - returns yes or no, can be used to trigger an Auto Action
 
[NUMROOMSAVAIL] - returns the number of available rooms (-1 if overbooked), can be used to trigger an Auto Action
[ROOMRACKRATENUM] - Rack Rate from {{#fas:cog}} (SETTINGS) CHANNEL MANAGER > PROPERTY CONTENT > ROOM CONTENT
[GUESTMOBILENUM] - guests mobile number with all non-numeric characters removed
 
[MOBILELAST1] last digit of the guests mobile number, if mobile is empty the guests phone number will be used.
 
[MOBILELAST2] last 2 digits of the guests mobile number, if mobile is empty the guests phone number will be used.
 
[MOBILELAST3] last 3 digits of the guests mobile number, if mobile is empty the guests phone number will be used.
 
[MOBILELAST4] last 4 digits of the guests mobile number, if mobile is empty the guests phone number will be used.
 
[MOBILELAST5] last 5 digits of the guests mobile number, if mobile is empty the guests phone number will be used.
 
[MOBILELAST6] last 6 digits of the guests mobile number, if mobile is empty the guests phone number will be used.
[PHONELAST1] - last digit of the guests phone number if guest phone is empty it will use the guests mobile number
[INVOICEDATE:+1day{%A, %e %B, %Y}] - optional date offset and display format. The offset can be any plus or minus any number of days and the display can be any valid PHP strftime format string.
[INVOICEDATES:+1day{%A, %e %B, %Y}] - optional date offset and display format - invoice date invoice number if invoicees are involved, The offset can be any plus or minus any number of days and the display can be any valid PHP strftime format string.
=== Invoice Values ===
==== Custom Invoice Values====
You have the option to create a custom invoice variable to display a value from an invoice. Available content [INVOICEVAL with a selection of the following variables arespecifies the calculation:
CHA - charges
DP4 - 4 decimal places
DES - used as "DESsome description " - gives the sum of values with containing the description "some description"
INV - invoicee, add the invoicee number at the end. Example: INV20 to show invoicee number 20, INV0 will show items not assigned to an invoicee, INV-1 will show all items from the booking regardless of invoicee. You can combine INV[BOOKINGINVOICEEID]] to add the invoicee from the booking
[INVOICE:PRI_QTY_CUA_TOT_VAT_QTY_PAY_GRT_AMO_VAA] will create an invoice table with more information.
 
[INVOICE:SIN TRANSPORT] will create an invoice table with the Invoice item description for any items with the Status = Transport.
== Invoicee Variables ==
[REPLACE|searchForThisText|replaceWithThisText|textToSearch] - replace "searchForThisText" with "replaceWithThisText" within the text "textToSearch"
 
[SUBSTR|startCharacterNumber|numberOfCharacters|textToGetSubstringFrom] - get a sub string from "textToGetSubstringFrom" starting at character "startCharacterNumber" (integer, 0 is the first char) with a length of "numberOfCharacters" (integer)
 
 
1. [SUBSTR|0|4|[GUESTPHONENUM]]
 
This will test for the first 4 characters of the Guest phone number.
 
[TRIM| string to trim ] - remove whitespace from the start and end of " string to trim "
[INVOICECHARGESNUM][*]0.2[-][INVOICESECONDITEMNUM][*]0.2[-][COMMISSIONNUM][*]0.2
 
<span style="color: #f3e504; font-size: 150%;" >{{#fas:lightbulb}} </span> Property Template 1-8 and Room Template 1-8 can be used to set calculations. If using Room Templates to make a calculation, then use Room Template 8 before Room Template 7.
 
If you want to see the value 10.
Set Room template 6 = [ROOMTEMPLATE7][+][ROOMTEMPLATE8] and enter 4 in Room template 7 and 6 in Room template 8.
 
You can set a calculation in Room Templates to show in Property Templates, but not the other way around. So "Property Template1" could pull the calculation of [ROOMTEMPLATE6] and the result = 10.
 
=== Rounding and controlling decimal places ===
You can use IF variables inside other IF variables to create complex logic but the internal IF: must be processed before the external IF
 
There are special versions of each IF constructed with ^ and ~ separators like [IF=^this^this^same~different]
 
<span style="color: #f3e504; font-size: 150%;" >{{#fas:lightbulb}} </span>Only one IF of each type can be used to create complex logic.
 
The special versions are processed first so should be used as the internal IF so it's result can be processed by the outer if.
 
The special versions can also be used if you expect : or | characters within your data.
 
 
IF's are processed in the following order.
14. [<span style="color: #019cde">IF>:[VACANTDAYS]:1:</span><span style="color: #75d5ad">yes|</span><span style="color: #fe746c">no</span>]
You want to test if there is 1 day from the previous checkout to check in of current booking. Could be used for offering Early Checkouts or additional days to the guest where there is a gap between bookings. 15. [<span style="color: #019cde">IF=:[LEAVINGDAY:{%a}]:Sun:|[IF>=^[TURNOVERDAYS]^1</span><span style="color: #75d5ad">^yes</span><span style="color: #fe746c">~no]</span>] You want to test if the leaving date is a Sunday and it there is a gap for 1 or more days between the current booking and the next booking. 16. [<span style="color: #019cde">[IF=:[LEAVINGDAY:{%u}]:1:yes|[IF=^[LEAVINGDAY:{%u}]^3</span><span style="color: #75d5ad">^yes</span><span style="color: #fe746c">]</span>] You want to test if the leaving date is a Monday or a Wednesday to send a specific message to the guest, for example a reminder that it is bin collection day. 17. [<span style="color: #019cde">[IF=:[LEAVINGDAY:{%u}]:1:yes|[IF=^[LEAVINGDAY:{%u}]^3^yes][IF=^[LEAVINGDAY:{%u}]^6</span><span style="color: #75d5ad">^yes</span><span style="color: #fe746c">]</span>] You have different cleaning teams for different days of the week, and you want to send a message to the appropriate team if leaving date is a Monday, Wednesday or Saturday.
== Write out the number in Words. ==
Expamles:
[INWORDS] 10 will write out then"ten"
[INWORDS] [INVOICEPAYMENTSNUM] will write out the invoice sum of all payments
2,819

edits

Navigation menu