From 20e4bb8f716140515d53ddb49f2f178889e83ef4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 24 Feb 2025 15:30:12 -0600 Subject: [PATCH] Detalle --- action/action_auditoria_detalle.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/action/action_auditoria_detalle.php b/action/action_auditoria_detalle.php index 80de4ac..cdda7d6 100644 --- a/action/action_auditoria_detalle.php +++ b/action/action_auditoria_detalle.php @@ -25,13 +25,13 @@ try { :registro_fecha_ideal as registro_fecha_ideal, horario_hora, horario_fin, - profesor_nombre, + COALESCE(materia_asignacion.materia_asignacion_profesor, profesor.profesor_nombre) AS profesor_nombre, profesor_correo, profesor_clave, horario.facultad_id, - materia_nombre as materia, + COALESCE(materia_asignacion.materia_asignacion_materia, materia.materia_nombre) AS materia, facultad_nombre as facultad, - carrera_nombre as carrera, + COALESCE(materia_asignacion.materia_asignacion_carrera, carrera.carrera_nombre) AS carrera, registro_fecha, registro_fecha_supervisor, estado_color, @@ -49,11 +49,15 @@ try { ELSE 'primary' END AS color FROM horario - NATURAL JOIN facultad - NATURAL JOIN materia - NATURAL JOIN carrera NATURAL JOIN horario_profesor NATURAL JOIN profesor + JOIN facultad ON facultad.facultad_id = COALESCE(horario.facultad_id, 0) + + LEFT JOIN materia USING (MATERIA_ID) + LEFT JOIN carrera USING (carrera_id) + + LEFT JOIN materia_asignacion USING (horario_id) + LEFT JOIN registro ON REGISTRO.HORARIO_ID = HORARIO.HORARIO_ID AND REGISTRO.PROFESOR_ID = HORARIO_PROFESOR.PROFESOR_ID AND