Ensure that only valid appointments are being processed.

This commit is contained in:
Alex Tselegidis 2020-03-24 18:54:50 +01:00
parent 474453cf59
commit fff57ad3f3
1 changed files with 5 additions and 0 deletions

View File

@ -926,6 +926,11 @@ class Appointments extends CI_Controller {
{
$appointment_start = new DateTime($provider_appointment['start_datetime']);
$appointment_end = new DateTime($provider_appointment['end_datetime']);
if ($appointment_start >= $appointment_end) {
continue;
}
$period_start = new DateTime($selected_date . ' ' . $period['start']);
$period_end = new DateTime($selected_date . ' ' . $period['end']);