This is an old revision of the document!
In this page you can Change create or change the number of documents that your installation supports. Documents can be created in HTML, RTF, e-mail form and text. It has been proven that if you pick HTML supports Javascript and some CSS
Here's an example of an invoice using HTML
From “configure and customize”, clicking on their number, you can edit the texts of documents to be printed, saved or emailed. The texts must be inserted in HTML or RTF format, or in simple text to send emails. You'll find some examples of alredy usable documents after intalling php-residence. To easily insert an RTF document you can write the text in your preferred program (like Word or OpenOffice), save it in RTF format and reopen it with a text editor, then copy all the text and paste it in the document. In the documents you can use predefined variables that, if left empty, will be replaced by spaces to be filled up by hand. The document parts that are enclosed in [r][/r] tags will be repeated for each reservation (if these tags are not present the whole document will be repeated). Inside these parts other lists can be inserted with tags [r2][/r2] (for guests) or [r3][/r3] (for extra costs). For example for the list with guests data the variables end all with the “_guest” suffix. Some available variables that can be inserted are (the complete list is in the page where you modify the document):
Client's data:
[surname] surname [name] name [birthdate] birthday [Mr] '' (if male) or 's' (if female) [nation] origin nation [city] residence city [street] street [street2] the same as $street but if it's not defined it inserts the word street before the spaces [street_number] street number [postal_code] postal code [telephone] telephone number [telephone2] second telephone [telephone3] third telephone [fax] fax number
Reservation's data:
[people_num] number of people [extra_beds_num] number of extra beds from the costs [people_num_tot] number of people + extra beds [price_tot] complete price [deposit] deposit [deposit_rest] complete price - deposit [starting_date] starting date [ending_date] departure date [rate_name] rate name [rate_price] price without extra costs and discount [discount] discount [comment] comment [apartment] apartment number [apartment_list] list of apartments that can be assigned separated by commas [paid] what has been paid until now [all_extra_costs] list with all the extra costs and their respective values [sel_extra_cost_name] name of the extra cost selected before viewing the document [sel_extra_cost_value] value of the extra cost selected before viewing the document [today] today date [price_tot_p], as the previous ones without final _p [deposit_p],[paid_p], but formatted with points or commas [deposit_rest_p], between thousands and decimals [rate_price_p], [discount_p], [all_extra_costs_p], [sel_extra_cost_value_p]
[repetition_error] when not empty the current reservation is not added to the document [email_already_sent] 1 if an email with the same subject has already been sent to client, otherwise 0 [error_message] when not empty its contents are shown instead of the document
Rules to consider when editing a document:
- when you have a repetition of reservations ([r][/r]) inside a repetition of dates ([r4 array=“dates_array”][/r4]), then only reservations that are present in current date will be repeated.
- you can compare dates with format YYYY-MM-DD in “if” conditions, then the date format is changed when they are displayed or assigned to other variables