Condier unavailable time periods that span into multiple days (#880).

This commit is contained in:
Alex Tselegidis 2021-10-18 12:43:40 +02:00
parent cbd9e9e41b
commit cf19ea717c

View file

@ -341,7 +341,8 @@ class Availability {
{ {
$unavailability_events = $this->CI->appointments_model->get_batch([ $unavailability_events = $this->CI->appointments_model->get_batch([
'is_unavailable' => TRUE, 'is_unavailable' => TRUE,
'DATE(start_datetime)' => $date, 'DATE(start_datetime) <=' => $date,
'DATE(end_datetime) >=' => $date,
'id_users_provider' => $provider['id'] 'id_users_provider' => $provider['id']
]); ]);