diff --git a/interface/reports/appointments_report.php b/interface/reports/appointments_report.php index 084b02dec90..8dddd1706a6 100644 --- a/interface/reports/appointments_report.php +++ b/interface/reports/appointments_report.php @@ -471,7 +471,8 @@ function oldEvt(eventid) { } else { $pid_list = array(); // Initialize list of PIDs for Superbill option $apptdate_list = array(); // same as above for the appt details - $totalAppontments = count($appointments); + $totalAppointments = count($appointments); + $canceledAppointments = 0; $cntr = 1; // column labels above start at 1 foreach ($appointments as $appointment) { @@ -479,7 +480,13 @@ function oldEvt(eventid) { $appointment['pc_apptstatus'] == "x" && empty($chk_with_canceled_appt) ) { + $canceledAppointments++; continue; + } elseif ( + $appointment['pc_apptstatus'] == "x" + && !empty($chk_with_canceled_appt) + ) { + $canceledAppointments++; } $cntr++; array_push($pid_list, $appointment['pid']); @@ -572,7 +579,8 @@ function oldEvt(eventid) { if (empty($_POST['form_csvexport'])) { ?> - + +