diff --git a/modules/turnero/views/recepcion.php b/modules/turnero/views/recepcion.php index 2f50e20..7cde690 100644 --- a/modules/turnero/views/recepcion.php +++ b/modules/turnero/views/recepcion.php @@ -13,13 +13,13 @@ if (!isUserLoggedIn()) { try { $pdo = Database::getInstance()->getConnection(); - // Para destino solo nos interesa recepción y toma de muestras $lugarRecepcion = $pdo->query( "SELECT id, nombre FROM turnero_lugares WHERE tipo='recepcion' AND activo=1 ORDER BY sort_order LIMIT 1" )->fetch(PDO::FETCH_ASSOC); - $lugarMuestras = $pdo->query( - "SELECT id, nombre FROM turnero_lugares WHERE tipo='muestras' AND activo=1 ORDER BY sort_order LIMIT 1" - )->fetch(PDO::FETCH_ASSOC); + $lugaresDestino = $pdo->query( + "SELECT id, nombre FROM turnero_lugares WHERE tipo='muestras' AND activo=1 ORDER BY sort_order" + )->fetchAll(PDO::FETCH_ASSOC); + $lugarMuestras = $lugaresDestino[0] ?? null; // compatibilidad $examenes = $pdo->query( "SELECT id, codigo, nombre, categoria FROM exam_tipos WHERE activo = 1 ORDER BY categoria, nombre" @@ -439,12 +439,9 @@ document.addEventListener('DOMContentLoaded', function() {
Lugar destino