query( "SELECT a.department_id, b.department_desc FROM setting_department a LEFT JOIN setting_department_translation b ON ( a.department_id = b.department_id ) WHERE a.deleted_at IS NULL AND b.lang = 'en'" ) ; if ( $select_departments->num_rows > 0 ){ while ( $row_department = $select_departments->fetch_assoc() ){ $department_lists[$row_department['department_id']] = dataFilter( $row_department['department_desc'] ) ; } } // reject report $reject_lists = [] ; $select_employment = $mysqli->query( "SELECT COUNT(a.employment_department) as total, a.employment_department FROM staff_employment a WHERE a.deleted_at IS NULL AND a.employment_trash = '0' AND a.employment_modified LIKE '%" . $date_time . "%' AND a.employment_status IN ( 'Processing Rejected', 'Reject' ) " . $search_query . " GROUP BY a.employment_department" ) ; if ( $select_employment->num_rows > 0 ){ while ( $row_employment = $select_employment->fetch_assoc() ){ $get_department = $department_lists[$row_employment['employment_department']] ; $get_department = ( $get_department == '' ? 'Cross Department' : $get_department ) ; $reject_lists[] = [ 'label' => $get_department, 'y' => floatval( $row_employment['total'] ) ] ; } } // complete report $complete_lists = [] ; $select_employment = $mysqli->query( "SELECT COUNT(a.employment_department) as total, a.employment_department FROM staff_employment a WHERE a.deleted_at IS NULL AND a.employment_trash = '0' AND a.employment_modified LIKE '%" . $date_time . "%' AND a.employment_status IN ( 'Confirmation' ) " . $search_query . " GROUP BY a.employment_department" ) ; if ( $select_employment->num_rows > 0 ){ while ( $row_employment = $select_employment->fetch_assoc() ){ $get_department = $department_lists[$row_employment['employment_department']] ; $get_department = ( $get_department == '' ? 'Cross Department' : $get_department ) ; $complete_lists[] = [ 'label' => $get_department, 'y' => floatval( $row_employment['total'] ) ] ; } } ?>