Reply To: Lock resources between a reservation

The only way to get that is to open the lib/classes/reservation.class.php, find the class checkAvailability and add an “- INTERVAL 1 DAY” behind every “arrival” in the MYSQL statements (in quotes).

Example:

Select Code
1
$count = $wpdb->get_var($wpdb->prepare("SELECT SUM(number+childs) FROM ".$wpdb->prefix."reservations WHERE approve='yes' AND $res_sql $res_number $idsql '$startdate' = arrival"));

to

Select Code
1
$count = $wpdb->get_var($wpdb->prepare("SELECT SUM(number+childs) FROM ".$wpdb->prefix."reservations WHERE approve='yes' AND $res_sql $res_number $idsql '$startdate' = arrival - INTERVAL 1 DAY"));

and

Select Code
1
$addstart = " AND HOUR(arrival) = HOUR('$startdate')";

to

Select Code
1
$addstart = " AND HOUR(arrival - INTERVAL 1 DAY) = HOUR('$startdate')";

But you need to do it after each update again…