From c407bf50a7662fca76616c66b07929c5216bb1c2 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 17 May 2024 10:12:35 +0200 Subject: [PATCH] Make sure that rescheduling from the public page will not throw an error due to the same appointment existing in the calendar --- application/controllers/Booking.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/Booking.php b/application/controllers/Booking.php index 59d06e11..860c5aa0 100755 --- a/application/controllers/Booking.php +++ b/application/controllers/Booking.php @@ -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'],