Ensure that only valid appointments are being processed.
This commit is contained in:
parent
474453cf59
commit
fff57ad3f3
1 changed files with 5 additions and 0 deletions
|
@ -926,6 +926,11 @@ class Appointments extends CI_Controller {
|
||||||
{
|
{
|
||||||
$appointment_start = new DateTime($provider_appointment['start_datetime']);
|
$appointment_start = new DateTime($provider_appointment['start_datetime']);
|
||||||
$appointment_end = new DateTime($provider_appointment['end_datetime']);
|
$appointment_end = new DateTime($provider_appointment['end_datetime']);
|
||||||
|
|
||||||
|
if ($appointment_start >= $appointment_end) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$period_start = new DateTime($selected_date . ' ' . $period['start']);
|
$period_start = new DateTime($selected_date . ' ' . $period['start']);
|
||||||
$period_end = new DateTime($selected_date . ' ' . $period['end']);
|
$period_end = new DateTime($selected_date . ' ' . $period['end']);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue