Adding right-click menu items for +1W and +1M

Top  Previous  Next

There are buttons on the Reservation Details dialog for easily adding 1 week or 1 month to the reservation, but it could be even more convenient to put these functions on the right-click menu in the Rack.  This can be done by adding a Menu customization (version 4.0 required).

 

1. The first step is to add a custom Menu definition.  Go to Maintenance / Advanced Customizations / Menus, and click "Add menu definition".

 

2. Enter a name, such as "+1's for Rack".

 

3. Select "Right-click, Reservation, on Rack" for the Base Menu.

 

4. To put the new selections in a suitable place, enter 21 for the Insert position

 

5. Click "Add menu item", and leave the default selections "Execute Action" and "Enter as static text".

 

6. Select "Reservations" for the access level (optional but recommended).

 

7. For the Selection name, enter "+1 Week".

 

8. For the Action expression, enter this expression to make the Last Night 7 days later:

 

 SetFieldDate(Resv(), "Resv_Last_Date", Resv:Resv_Last_Date + 7)

 

9. Save that item, then "Add menu item" again for the next one (repeat steps 5 and 6 above).

 

10. Enter "+1 Month" for the selection name.

 

11. Enter this for the Action expression (note the use of the handy GoMonth function, since months are different lengths):

 

 SetFieldDate(Resv(), "Resv_Last_Date", GoMonth(Resv:Resv_Last_Date, 1))

 

We're finished -- Save/Close all of the dialogs.  Now if you right-click a reservation on the Rack you'll see these new entries.

 

NOTE: This simple example does not offer any confirmation prompts or check for conflicts (these things could be added but would be much more complex) -- it will immediately change the reservation date, so be sure to double-check the site availability before using it.  Neither will it re-calculate the charges automatically (assuming you have that Auto-rates option enabled).  This is presented as an example of modifying the menus, not necessarily as a complete new function, so use it with care.

 

 


Page URL http://CampgroundMaster.com/help/addingright-clickmenuitems.html

Campground Master Home