 # Calculation formulas

## Calculation formulas

Calculation formulas are extension of price templates. Main difference is that in basic price templates you set all prices in aboslute value. Calculation formulas work with reference price which is the base for all other other prices.

Long story short your entire pricelist can be derived from the reference price which can be changed during time. All you need to do is set correct calculation formulas for other prices.

#### Creating of calculation formula

Start by clicking on Templates button and then create a new template by clicking on the green plus button. Set the template name, abbreviation and color and proceed to the settings. Select that you want to “Use calculation formulas”. After this new column will be added to the table on the right side of the window. Now select and set the reference price. A value which will be reference price for all other prices. Reference value can be only one in the template.

In following case we will derive the prices from the reference price which will be the price for Single room. I will set its price and at the same time REF in the same row will automatically turn yellow which will assign this price as reference value for this particular template. After selecting reference value, calculator icons will be displayed next to other values. Click on one of them and you can set the calculation formula. Simply select if you want to increase / decrease the price and if the change will be set in absolute value or in percentage. Set calculation formula will be then visible in the particular cell. Formula can be set through the calculator icon but there are also other ways of setting it. In the “calculator” window you can also copy the set formula and paste it to other cells. Also formula can be written down manually (similar to formula for increasing/decreasing current prices in group settings).

(Manually set)Formula must always contain “equals” (=), then REF (stands for reference value) and the formula for price change:

• =REF+500 (price will be increased by 500 Kč from reference value)
• =REF-1000 (price will be decreased by 1000 Kč from reference value)
• =REF+50% (price will be increased by 50% from reference value)
• =REF-25% (price will be decreased by 25% from reference value)

Final price from the calculation formula can be easily checked by hoovering the mouse over the particular cell. Hint will contain final price for particular calculation. Reference value and calculation formulas can be also edited later in Templates list by editing particular template with calculation formulas.

#### Use of the calculation formulas

Template with calculation formulas can be applied in the upper part of the pricelist in Template row or using the group setting.

There are few differences when using the standard template and template with calculation formulas. Most visible change is that the reference price is highlighted in pricelist by the color of the template. Second big difference is how you work with these templates. For classic templates you set all prices in absolute value directly in the template settings. Change of price then cancels the connections to the template.

Templates with calculation formulas can be adjusted by changing the reference (highlighted) price directly in the pricelist (or by changing it using the Group set function). Change of the reference value will not cancel the connection to the template, in fact it will cause recalculation of the other values according to the new reference value.

You can check the following example. We are using template with calculation formula (double room is + 500 and +1000) for 4 days and we will change the reference value in one of them. Other values for this day will be automatically adjusted (because the change of reference value) according to the same calculation formula. Other (automatically calculated) values can be also adjusted and changed manually but it will cause lost of connection to template and its calculation formula (already set values by formula will be preserved but change of price based on the change of reference value wont be working anymore).

In group setting you are also able to select and use the template. When using the classic template (with absolute values) you are not able to edit any of the values because they are strictly set by the template.

Using the template with calculation formulas you are able to change only the reference value and by this cause the recalculation of other non-editable values (automatically calculted ones from the reference value). Saving the group settings will connect the template to the day/season and also the new value of reference price will be used. 