How can I restrict property bookings based on arrival and departure dates?

How can I restrict property bookings based on arrival and departure dates?

In the following code, the Property_Bookings form restricts bookings based on the Arrival and Departure dates for a specific property. For instance, if a booking is made for property named C54 between 1st and 9th Jan, the form validation should check if there is no other booking for property C54 between 1st and 9th Jan.  The code is added to the Form Actions -> on add -> on validate block of the Script tab.

           if (count(Property_Booking[((Arrival <= input.Departure && Departure >= input.Arrival) 
&& Property == Sinput.Property)]) > 0)
{
alert "Booking DENIED - property already booked for the specific date ";
cancel submit;
}
    • Related Articles

    • How can I restrict travel bookings based on place and trip date?

      In the following code, added to the on add -> validate block of the Script tab, the Booking_Form restricts entries based on the following conditions: Only four bookings allowed for a specific place on a day. If the number of bookings (with Place & ...
    • Introduction to Zoho Bookings

      What is Zoho Bookings? Zoho Bookings, at its core, is an online tool your clients can use to book appointments with you. It gives you complete control over managing those scheduled events. Any service, such as a salon or clinic, requires a mutually ...
    • Can I log hours for past dates?

      Yes, you can log hours for the past dates only for the active sprints in your project. You cannot log hours for the upcoming and completed sprints. Logging hours is based on the sprint's start and end date. Say for example, your sprint starts ...
    • Online meeting integration with Zoho Bookings

      Zoho Bookings is online booking software that helps small businesses manage appointments with customers and clients efficiently. With the online meeting integration of Zoho Meeting in Zoho Bookings, you can create and share booking links with your ...
    • Property Tweaker for Orchestly

      Every extension holds key-value pairs (properties). Property Tweaker can be used to add new values or edit these values and view dynamic modifications in the extension.  Business Scenarios Add the email address of all your clients to your campaign ...