Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello.
Is a way to programmatically change the booking end date with calendar update?
Trying create a custom function "express close" when guest decide leave before booking "end_date".
So i load booking, change booking's "end_date", save booking, but unit availability calendar not update.
function hz_hotel_service_express_close_booking ($bid) {
$close_date = Date('Y-m-d');
$plus_one = Date('Y-m-d',strtotime($close_date . ' + 1 day'));
$booking = rooms_booking_load($bid);
$booking->end_date = $plus_one;
$booking->field_rooms_booking_auto_renew['und'][0]['value'] = 0;
$booking->booking_status = 1;
rooms_booking_save($booking);
}
Please help.