This documentation is for the implimentation of confirmation letters for AutoClerk version 57.
The template for confirmations letters is a text file called "CONTRACT.TXT. It may be modified from Configuration by choosing Edit Source and Help files. Expand the Config Files directory by clicking on the +. Next click on CONTRACT.TXT. AutoClerk will bring up the text file in a window on the right side of the screen. Make the desired changes. When finished save, by clicking on File and choosing Commit.
Attached are both samples of contract.txt and the printed confirmation.
Text, which is printed exactly as entered, is interspersed with variables. Information from the AutoClerk reservation is interpolated into the text by substituting values from the reservation for the reservation variables. A variable has the form $C or ${name[:arg][%opt]["format]}, where
Options change the way data is formatted. The effect of an option depends on the data type.
C is a single-character variable name name is the variable name, all lowercase arg modifies the variable; the modification depends on the variable opt selects a standard format for the variable format overrides the default format for the variable. Use with great care. [...] indicates an optional part
In the table below:
Printer pitch
CH is the variable's short name
A hyphen in this column indicates that the single-letter variable name is no longer available, generally because use of it conflicts with HTML or the extended variable naming scheme.NAME is the variable's full name
When this appears with an argument or option (e.g ${today%1}) then this indicates the argument or option which corresponds to the single-letter variable name. The variable can be specified without this option, in which case its formatting will be the default for that type of variable.C/F is the characters per field. An asterisk indicates a variable width field.
Treatment of rates per day:
${date} interpolates the current date, which is initially the
arrival date.
${rate} interpolates the rate for the current date, and increments
the current date.
If there are more days in the stay than allowed for in the contract
or regslip template, additional pages/slips are printed.
Lining up columns
There are two ways to make fields like first and last name on the same
line line up in columns:
The second will print lastname in a fixed width field of 24 characters, left justifying and truncating lastname to fit. This may be useful to you if you are trying to match the format of an exsisting letter and the new field size for lastname makes it too long to fit.
The "-" indicates left justification. The default for numbers is right justification.
The first 24 is minimum field width. If the string is less than that number, the string is padded with blanks on the left or right side depending on whether or not the "-" is present.
The second 24 is the max field size. If a string is longer than that size, it is truncated on the right or left depending on whether or not the "-" is present.
| CH | NAME | C/F | Description and Notes | ||||
| $$ | - | 1 | The dollar symbol | ||||
| $y | ${today%1} | 18 | Today's date with long month | ||||
| $D | - | 18 | Today's date with time and short month | ||||
| - | ${clock} | 7 | Current time | ||||
| - | ${day} | 2 | Today's day of week | ||||
| $L | ${lastname} | 14 | Last name | ||||
| $F | ${firstname} | 10 | First name | ||||
| - | ${names} | 26 | First and Last Name together | ||||
| $C | ${company} | 25 | Company; if using Specials See note (2) | ||||
| $A | ${contact"Attn: %s"} | 30 | Attention | ||||
| $S | ${street} | 25 | Street | ||||
| $T | ${citystate} | 27 | City and State | ||||
| $Z | ${zip} | 10 | Zip Code | ||||
| $p | ${phone} | 13 | Guest phone | ||||
| $t | ${ta_company} | 25 | TA company | ||||
| - | ${ta_iata} | 9 | IATA# | ||||
| $n | ${ta_agent} | 15 | TA Agent's Full Name | ||||
| - | ${ta_street} | 25 | TA street | ||||
| - | ${ta_citystate} | 27 | TA city and state | ||||
| - | ${ta_zip} | 10 | TA zip | ||||
| $z | ${ta_phone} | 21 | TA Phone TA Phone and Extension | ||||
| $r | ${ta_commission"%s%%"} | 7 | TA commission with % symbol | ||||
| - | ${rateclass} | 2 | Rate Class | ||||
| - | ${rate%1} | 12 | Room rate, right justified | ||||
| $d | ${ratehilow} | 6 |
Rate with weekday & weekend, if applicable to stay.
Left justified, no $ symbol, doesn't print thousands (3) Warning: If used, rate structure must fit weekday/weekend limitations. | ||||
| - | ${rate} | 8 |
Room rate compacted, left justified, no $ symbol
(if not extended rates, this is weekday rate). | ||||
| - | ${rateskip} | 8 | Prints the rate for the current date to the first day of a new range. rateskip and daterange must be used together and rateskip must appear after daterange. | ||||
| $i | ${arrival} | 8 | Checkin date as dd mmm'yy | ||||
| $o | ${depart} | 8 | Checkout date as dd mmm'yy | ||||
| $I | ${arrival%1} | 18 | Checkin date with full month name | ||||
| $O | ${depart%1} | 18 | Checkout date with full month name | ||||
| - | ${date} | 8 | The current date
Used with ratesperday. Incremented every time a rate is interpolated. | ||||
| - | ${daterange} | 8 | Prints the first and last dates of a date range
over which the room rate remains constant. The
default format is "%s to %s", where the %s are
replaced by the dates. See also, rateskip. | ||||
| $U | ${nights} | 3 | Number of nights | ||||
| $N | ${rooms} | 3 | Number of rooms | ||||
| $Y | ${roomtype} | 20 | Room type code | ||||
| - | ${roomtype%1} | 20 | Room type description | ||||
| $R | ${room} | 4 | Room number | ||||
| $W | ${folio} | 1 | Folio - is always A. | ||||
| - | ${paytype} | 12 | Payment type | ||||
| - | ${cc_number} | 25 | CC number | ||||
| $x | ${cc_number%1} | 25 | CC number xxxxed out | ||||
| - | ${cc_expiry} | 4 | CC expiry, no punctuation | ||||
| - | ${deposit} | 13 | Advance deposit compacted, no $ symbol, left justified | ||||
| - | ${deposit%1} | 15 | Deposit right justified | ||||
| $s | ${source:1} | 2 | Source | ||||
| $h | ${source:2} | 2 | Source 2 | ||||
| $j | ${source:3} | 2 | Source 3 | ||||
| $G | ${occupants} | 1 | Total number of occupants
(adults+children+infants) | ||||
| $P | ${adults} | 1 | Number of Adults | ||||
| $k | ${children} | 1 | Children | ||||
| $b | ${infants} | 1 | Infants | ||||
| - | ${status} | 12 | Reservation status Short form (GTD) | ||||
| - | ${status%1} | 12 | Reservation status spelled out (Guaranteed) | ||||
| - | ${conf} | 6 | Confirmation # 6 character code | ||||
| $K | ${license} | 11 | License plate Do Not Use!!!! | ||||
| $q | ${specials} | 33 | Specials | ||||
| - | ${f8note} | 30 | F8 Notes | ||||
| $Q | ${note} | 30 | The note field | ||||
| - | ${contact"%s:"} | 30 | Contact with a colon at the end. | ||||
| $X | ${include} | 0 | Insert file | ||||
| - | ${tab:nn} | 0 | Tabs to column nn. Because string fields are not automatically padded to the right with blanks, the ${tab} variable is necessary to make columns line up. | ||||
| - | ${pitch:nn%qual} | 0 | Set printer pitch
|