Updated the max booking offset to max checkout date

This commit is contained in:
vishalsingh.qlo325
2025-05-15 10:18:31 +05:30
parent 6018276fd2
commit 4d806ec8c8
10 changed files with 96 additions and 96 deletions

View File

@@ -148,8 +148,8 @@ class AdminImportControllerCore extends AdminController
'policies' => array('label' => $this->l('Hotel Policies')),
'active_refund' => array('label' => $this->l('Allow Refund (0 = No, 1 = Yes)')),
'refund_ids' => array('label' => $this->l('Refund IDs (x,y,z...)')),
'max_booking_offset' => array('label' => $this->l('Max booking offset')),
'min_booking_offset' => array('label' => $this->l('Min booking offset')),
'max_checkout_offset' => array('label' => $this->l('Maximum checkout offset')),
'min_booking_offset' => array('label' => $this->l('Minimum booking offset')),
'image' => array('label' => $this->l('Image URLs (x,y,z...)')),
'delete_existing_images' => array(
'label' => $this->l('Delete existing images (0 = No, 1 = Yes)')
@@ -1410,20 +1410,20 @@ class AdminImportControllerCore extends AdminController
}
$objHotelOrderRestrictDate->id_hotel = $objHotelBranch->id;
$objHotelOrderRestrictDate->use_global_max_booking_offset = true;
$objHotelOrderRestrictDate->use_global_max_checkout_offset = true;
$objHotelOrderRestrictDate->use_global_min_booking_offset = true;
if (isset($info['max_booking_offset'])
&& (Configuration::get('PS_MIN_BOOKING_OFFSET') < $info['max_booking_offset']
|| isset($info['min_booking_offset']) && $info['min_booking_offset'] < $info['max_booking_offset'])
if (isset($info['max_checkout_offset'])
&& (Configuration::get('PS_MIN_BOOKING_OFFSET') < $info['max_checkout_offset']
|| isset($info['min_booking_offset']) && $info['min_booking_offset'] < $info['max_checkout_offset'])
) {
$objHotelOrderRestrictDate->use_global_max_booking_offset = false;
$objHotelOrderRestrictDate->max_booking_offset = $info['max_booking_offset'];
$objHotelOrderRestrictDate->use_global_max_checkout_offset = false;
$objHotelOrderRestrictDate->max_checkout_offset = $info['max_checkout_offset'];
}
if (isset($info['min_booking_offset'])
&& (Configuration::get('PS_MAX_BOOKING_OFFSET') > $info['min_booking_offset']
|| isset($info['max_booking_offset']) && $info['max_booking_offset'] > $info['min_booking_offset'])
&& (Configuration::get('PS_MAX_CHECKOUT_OFFSET') > $info['min_booking_offset']
|| isset($info['max_checkout_offset']) && $info['max_checkout_offset'] > $info['min_booking_offset'])
) {
$objHotelOrderRestrictDate->use_global_min_booking_offset = false;
$objHotelOrderRestrictDate->min_booking_offset = $info['min_booking_offset'];