Updated: Changed the max order date with maximum booking offset
This commit is contained in:
@@ -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_order_date' => array('label' => $this->l('Max Order Date')),
|
||||
'preparation_time' => array('label' => $this->l('Prepration Time')),
|
||||
'max_booking_offset' => array('label' => $this->l('Max booking offset')),
|
||||
'min_booking_offset' => array('label' => $this->l('Min 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,19 +1410,19 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$objHotelOrderRestrictDate->id_hotel = $objHotelBranch->id;
|
||||
$objHotelOrderRestrictDate->use_global_max_order_date = true;
|
||||
if (isset($info['max_order_date'])
|
||||
&& strtotime('now') < strtotime($info['max_order_date'])
|
||||
$objHotelOrderRestrictDate->use_global_max_booking_offset = true;
|
||||
if (isset($info['max_booking_offset'])
|
||||
&& strtotime('now') < strtotime($info['max_booking_offset'])
|
||||
) {
|
||||
$objHotelOrderRestrictDate->use_global_max_order_date = false;
|
||||
$date = date('Y-m-d', strtotime($info['max_order_date']));
|
||||
$objHotelOrderRestrictDate->max_order_date = $date;
|
||||
$objHotelOrderRestrictDate->use_global_max_booking_offset = false;
|
||||
$date = date('Y-m-d', strtotime($info['max_booking_offset']));
|
||||
$objHotelOrderRestrictDate->max_booking_offset = $date;
|
||||
}
|
||||
|
||||
$objHotelOrderRestrictDate->use_global_preparation_time = true;
|
||||
if (isset($info['preparation_time']) && $info['preparation_time']) {
|
||||
$objHotelOrderRestrictDate->use_global_preparation_time = false;
|
||||
$objHotelOrderRestrictDate->preparation_time = $info['preparation_time'];
|
||||
$objHotelOrderRestrictDate->use_global_min_booking_offset = true;
|
||||
if (isset($info['min_booking_offset']) && $info['min_booking_offset']) {
|
||||
$objHotelOrderRestrictDate->use_global_min_booking_offset = false;
|
||||
$objHotelOrderRestrictDate->min_booking_offset = $info['min_booking_offset'];
|
||||
}
|
||||
|
||||
$objHotelOrderRestrictDate->save();
|
||||
|
||||
Reference in New Issue
Block a user