document
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
document [2020/03/14 16:29] – ddam | document [2020/03/14 22:53] (current) – ddam | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | 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.). This page will use the following terminology: | + | Document templates are used by Hoteldruid to generate all kinds of records that might be needed for daily operations (reports, invoices, contracts, guest letters, etc.). This page will use the following terminology: |
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. | 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. | ||
Line 17: | Line 17: | ||
=== RTF/HTML documents === | === RTF/HTML documents === | ||
- | To easily create an RTF or HTML document, you can write the text in your preferred word processing | + | To easily create an RTF or HTML document, you can write the text in your preferred word processing |
=== Variables (all document formats) === | === Variables (all document formats) === | ||
- | Inside documents, you can use predefined variables that will take the corresponding value when the document | + | Inside documents, you can use predefined variables that will take the corresponding value when the record |
== Inline document editing == | == Inline document editing == | ||
Line 113: | Line 113: | ||
===== " | ===== " | ||
- | On the lowest part of the Document modification page, you will find a button called " | + | On the lowest part of the Document modification page, you will find a button called " |
- | *nesting conditions: all rule conditions | + | === Custom variables and arrays === |
+ | You can create whichever variable you want, valid for just this document, or usable in all.\\ | ||
+ | **WARNING:** when deleting a variable, | ||
- | Rules to consider when editing | + | Arrays are variables of variables. They are key/value pairs: at each key (or index, or position) inside the array, is stored |
+ | You can create arrays of any existing variable (custom or built-in). They can be useful when working with periods (e.g. arrays of days (r4)), or when you don't know exactly how many variables your document | ||
+ | For instance, let's assume you want to count your guests by nationality: the number of variables needed to count all present nationalities varies from one period to another. But you can create an array of the nationality_guest variables, like [arr_nationalities(nationality_guest)], | ||
+ | ==== (Rule) conditions ==== | ||
+ | Rule conditions are at the heart of documents. By configuring them, ordering them, and nesting them (i.e. deciding inside which kind of repetition they should be used), you can set all your custom variables to the values you need, and then have those values appear inside the record. | ||
+ | |||
+ | **Caveat:** When nesting a repetition inside another one, e.g. an extra-costs repetition inside a reservation repetition, like: < | ||
+ | |||
+ | ------ | ||
+ | |||
+ | TBC | ||
* you can compare dates with format YYYY-MM-DD in " | * you can compare dates with format YYYY-MM-DD in " | ||
+ |
document.1584203350.txt.gz · Last modified: 2020/03/14 16:29 by ddam