Corrige uso de función para manejar valores nulos en la comparación.

This commit is contained in:
2025-03-31 15:45:13 -06:00
parent 9ac4a2f7d6
commit 4254084311

View File

@@ -115,7 +115,7 @@ try {
LEFT JOIN usuario ON usuario.usuario_id = REGISTRO.supervisor_id LEFT JOIN usuario ON usuario.usuario_id = REGISTRO.supervisor_id
JOIN estado_supervisor ON estado_supervisor.estado_supervisor_id = COALESCE(REGISTRO.estado_supervisor_id, 0) JOIN estado_supervisor ON estado_supervisor.estado_supervisor_id = COALESCE(REGISTRO.estado_supervisor_id, 0)
WHERE horario.horario_id IN ($HorariosID) WHERE horario.horario_id IN ($HorariosID)
AND (FECHAS.fecha + horario.horario_hora) < LEAST(horario.horario_fecha_fin, NOW()) AND (FECHAS.fecha + horario.horario_hora) < COALESCE(horario.horario_fecha_fin, NOW())
ORDER BY fechas.fecha, horario_hora, REGISTRO.estado_supervisor_id", ORDER BY fechas.fecha, horario_hora, REGISTRO.estado_supervisor_id",
$fechas $fechas
); );