Documents - Invoice

Discuss here how to configure hoteldruid and better use its features.

Moderator: marco

Post Reply
ashish
Posts: 7
Joined: Thu Dec 18, 2014 4:49 pm

Documents - Invoice

Post by ashish »

Hi

I am trying to add the cost of Extra Bed to the base rate before moving ahead with the rest of the calculations.

The steps I want to use is:
1. Deduct Discount from Base Rate
2. If extra bed is present add the value of to 1 above
3. Check if the rate needs special treatment (ie. check if a specific 0 cost "extra cost" exists), if yes then make some logical calculations. If no then overlook

I am trying to do this via extra variables and conditions and am able to perform upto step 1. But I am not able to get the value of that specific extra cost to add to 1.
Also how do we check (in conditions) if an extra cost exists or not?

Also, we need separate invoices for room + extra bed and the rest of the extra costs. Basically we need to bill restaurant charges separately. So if there was a way to generate invoice for restaurant per order, it would be great - is this possible?

Can someone please help

Ashish
marco
Posts: 1332
Joined: Tue Jul 05, 2005 6:00 pm
Location: Roma, Italia

Re: Documents - Invoice

Post by marco »

Hello Ashish,
you can add an emtpy (with at leat a space) repetition of extra costs in your document, before the variable with the price with rate + bed is displayed:

[r3] [/r3]

Then go in the custom variables and conditions of that document and add a custom variable [base_rate_and_bed]. Then insert the conditions:

if [extra_cost_name] is equal to "" then equate [base_rate_and_bed] with [rate_price]
if [extra_cost_name] is equal to "" then equate [base_rate_and_bed] equal to [base_rate_and_bed] - [discount]
if [extra_cost_name] is equal to "Extra Bed" then put [base_rate_and_bed] equal to [base_rate_and_bed] + [extra_cost_value]

If the document has other conditions not related with extra costs, you must place the above conditions before the others and also add this one (after the ones above and before the others):

if [extra_cost_name] is different from "" then do not evaluate subsequent conditions.

You can create 2 separate invoices for rooms and restaurants. The default documents can be duplicated from the documents backup page (copy default file and then restore the document you want to duplicate) and then each one customized separately.

Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Post Reply