document
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
document [2020/03/14 14:25] – ddam | document [2020/03/14 16:29] – ddam | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Document templates | + | Document templates are used by Hoteldruid to generate all kinds of records that might be needed for daily operations (reports, invoices, contracts, guest communication, etc.). |
+ | Thanks to the use of variables, repetitions and conditions, documents are a powerful tool that can save a lot of time once properly set up. | ||
+ | |||
+ | ====== Editing documents ====== | ||
+ | |||
+ | It's important to understand the logic of how documents function, which can be a little offsetting at first. There is two sides to documents: the first side is the visual part of the document, i.e. which data to display where inside the generated record. This happens on the main document modification page. The second side is the creation of the content itself, where you can use variables and rules that set those variables, as the record is being generated. This happens on the " | ||
+ | |||
+ | ===== Document modification page ===== | ||
- | === Open the Documents section === | ||
As administrator, | As administrator, | ||
- | On the lowest part of the Document modification page, you will find a button called " | ||
- | Documents can be created in HTML, RTF, e-mail and text format. Here's an [[example]] of an invoice using HTML. | + | ==== Document formats ==== |
- | You'll find more examples of already usable documents after a fresh install of Hoteldruid. | + | |
+ | Documents can be created in HTML, RTF, e-mail and text format. Here's an [[example]] of an invoice using HTML. Please note that the officially supported format is HTML (for support provided when subscribed to the hosted version). | ||
+ | You'll find more examples of already usable documents after a fresh install of Hoteldruid, or by restoring them from the Documents backup page. | ||
- | === RTF Documents | + | |
- | To easily create an RTF document, you can write the text in your preferred word processing software (like Microsoft Word or LibreOffice/ | + | === RTF/HTML documents |
+ | To easily create an RTF or HTML document, you can write the text in your preferred word processing software (like Microsoft Word or LibreOffice/ | ||
=== Variables (all document formats) === | === Variables (all document formats) === | ||
Inside documents, you can use predefined variables that will take the corresponding value when the document is generated by Hoteldruid. Combined with repetitions, | Inside documents, you can use predefined variables that will take the corresponding value when the document is generated by Hoteldruid. Combined with repetitions, | ||
- | If you choose to edit your document directly on the document | + | |
+ | == Inline document editing == | ||
+ | For simple documents created for internal use (mainly text format documents), | ||
+ | |||
+ | == Available built-in variables == | ||
Some available variables that can be inserted are (the complete list is in the | Some available variables that can be inserted are (the complete list is in the | ||
- | drop-down menu of the document | + | drop-down menu of the Document |
Client' | Client' | ||
Line 57: | Line 68: | ||
respective values | respective values | ||
[sel_extra_cost_name] name of the extra cost selected before | [sel_extra_cost_name] name of the extra cost selected before | ||
- | viewing the document | + | viewing the record |
[sel_extra_cost_value] value of the extra cost selected before | [sel_extra_cost_value] value of the extra cost selected before | ||
- | viewing the document | + | viewing the record |
[today] today date | [today] today date | ||
[price_tot_p], | [price_tot_p], | ||
Line 70: | Line 81: | ||
< | < | ||
- | is not added to the document | + | is not added to the record |
[email_already_sent] 1 if an email with the same subject has | [email_already_sent] 1 if an email with the same subject has | ||
already been sent to client, otherwise 0 | already been sent to client, otherwise 0 | ||
Line 76: | Line 87: | ||
instead of the document</ | instead of the document</ | ||
+ | == Custom variables == | ||
+ | You may create and use custom variables as you see fit. Please refer to the " | ||
=== Repetitions === | === Repetitions === | ||
Line 84: | Line 97: | ||
will display surnames for all reservations from the current view (e.g. " | will display surnames for all reservations from the current view (e.g. " | ||
The document parts that are enclosed in [r][/r] tags will be | The document parts that are enclosed in [r][/r] tags will be | ||
- | repeated for each reservation | + | repeated for each reservation. Inside these parts, other lists |
- | whole document will be repeated). Inside these parts, other lists | + | |
can be inserted with tags [r2][/r2] (for guests) or [r3][/ | can be inserted with tags [r2][/r2] (for guests) or [r3][/ | ||
- | (for extra costs).\\ | + | (for extra costs). |
+ | You can use the '' | ||
+ | on the Document modification page to easily add repetitions inside your documents.\\ | ||
== Caveats when using repetitions == | == Caveats when using repetitions == | ||
- | __**Use | + | __Use specific variables |
*r2 repetitions: | *r2 repetitions: | ||
*r6 repetitions: | *r6 repetitions: | ||
- | __**Special cases**__ | + | __Special cases__ |
*r4 repetitions: | *r4 repetitions: | ||
- | *nesting of conditions: all rule conditions are repeated inside each repetition, unless you use exclusive rule conditions (in that case, only that set of rule conditions will be repeated) | ||
*The tags for reservations repetition ([r][/r]) are forbidden in multilingual mode (i.e. the whole document is repeated for each reservation).\\ | *The tags for reservations repetition ([r][/r]) are forbidden in multilingual mode (i.e. the whole document is repeated for each reservation).\\ | ||
- | You can use the '' | ||
- | on the document modification page to easily add repetitions inside your documents. | ||
- | ---- | ||
+ | ===== " | ||
+ | On the lowest part of the Document modification page, you will find a button called " | ||
+ | |||
+ | *nesting conditions: all rule conditions are repeated inside each repetition, unless you use exclusive rule conditions (in that case, only that set of rule conditions will be repeated) | ||
Rules to consider when editing a document: | Rules to consider when editing a document: | ||
* you can compare dates with format YYYY-MM-DD in " | * you can compare dates with format YYYY-MM-DD in " |
document.txt · Last modified: 2020/03/14 22:53 by ddam