Make sure that rescheduling from the public page will not throw an error due to the same appointment existing in the calendar

This commit is contained in:
Alex Tselegidis 2024-05-17 10:12:35 +02:00
parent ec3ec699a9
commit c407bf50a7
1 changed files with 1 additions and 0 deletions

View File

@ -385,6 +385,7 @@ class Booking extends EA_Controller
$customer['id'] = $this->customers_model->find_record_id($customer);
$existing_appointments = $this->appointments_model->get([
'id !=' => $manage_mode ? $appointment['id'] : null,
'id_users_customer' => $customer['id'],
'start_datetime <=' => $appointment['start_datetime'],
'end_datetime >=' => $appointment['end_datetime'],