From 31e763bfe76a207247f1828ee19e4eeaf2a0e6e9 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 8 Jul 2026 19:39:06 +0000 Subject: [PATCH] Autosave: 20260708-194007 --- assets/css/style.css | 9 +++++++ imprimir_rotulos_grandes.php | 51 ++++++++++++++++++++++++++++++++++-- listos_para_recojo.php | 4 +-- pedidos.php | 4 +-- pedidos_en_transito.php | 30 ++++++++++++++++++--- ruta_contraentrega.php | 12 +++++++-- 6 files changed, 99 insertions(+), 11 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 3f9c99b8..7c2cd377 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -306,6 +306,15 @@ h1, .h1 { font-size: 0.85rem; /* Fuente más pequeña como en Pedidos Rotulados */ line-height: 1.2; } + +/* Ruta Contraentrega: aumentar un poco el tamaño de letra para que sea más legible */ +.cc-ruta-contraentrega-container th { + font-size: 0.9rem; +} +.cc-ruta-contraentrega-container td { + font-size: 0.95rem; +} + .excel-container tr:nth-of-type(odd) td { background-color: #f9f9f9; } diff --git a/imprimir_rotulos_grandes.php b/imprimir_rotulos_grandes.php index 7bc92fcc..6a666277 100644 --- a/imprimir_rotulos_grandes.php +++ b/imprimir_rotulos_grandes.php @@ -57,6 +57,8 @@ $sql .= " ORDER BY p.created_at DESC"; $stmt = $pdo->prepare($sql); $stmt->execute($params); $pedidos = $stmt->fetchAll(); + +$label_generated_date = date('d/m'); ?> @@ -136,6 +138,27 @@ $pedidos = $stmt->fetchAll(); margin-bottom: 1mm; gap: 2mm; } + .variant-row { + align-items: flex-start; + } + .variant-text { + flex: 1; + min-width: 0; + word-break: break-word; + } + .variant-date { + white-space: nowrap; + font-size: 14pt; + font-weight: 900; + } + .nota-adicional { + font-size: 9pt; + line-height: 1.1; + margin-top: 0.5mm; + text-align: center; + word-break: break-word; + font-weight: 500; + } .footer-msg { text-align: center; font-size: 14pt; @@ -214,6 +237,23 @@ $pedidos = $stmt->fetchAll(); } $variante_text = !empty($display_variants) ? implode(' + ', $display_variants) : 'S/V'; + + // Nota adicional (dedicatorias/observaciones): mostrar en tamaño pequeño solo la primera palabra + $nota_adicional_raw = trim((string)($pedido['nota_adicional'] ?? '')); + if ($nota_adicional_raw === '') { + $nota_adicional_raw = trim((string)($pedido['descargo'] ?? '')); + } + $nota_adicional_raw = preg_replace('/\s+/u', ' ', $nota_adicional_raw); + if (strcasecmp($nota_adicional_raw, 'N/A') === 0) { + $nota_adicional_raw = ''; + } + + // Mostrar únicamente la primera palabra para que no quede largo + $nota_adicional_display = ''; + if (!empty($nota_adicional_raw)) { + $nota_adicional_parts = preg_split('/\s+/u', trim($nota_adicional_raw), -1, PREG_SPLIT_NO_EMPTY); + $nota_adicional_display = $nota_adicional_parts[0] ?? ''; + } ?>
@@ -226,8 +266,9 @@ $pedidos = $stmt->fetchAll();
-
- VARIANTE: +
+ VARIANTE: + F:
fetchAll(); echo 'SEDE: ' . htmlspecialchars($sede_val); ?>
+ + +
+ +
+
-
+
-
+
diff --git a/pedidos.php b/pedidos.php index 4b093bf2..a4106d02 100644 --- a/pedidos.php +++ b/pedidos.php @@ -176,8 +176,8 @@ include 'layout_header.php';
-
-
+
+
diff --git a/pedidos_en_transito.php b/pedidos_en_transito.php index 4e1da209..19629a35 100644 --- a/pedidos_en_transito.php +++ b/pedidos_en_transito.php @@ -172,8 +172,8 @@ include 'layout_header.php';
-
-
+
+
@@ -270,7 +270,7 @@ include 'layout_header.php'; Oculto'; ?> - +
PendienteVERIFICAR @@ -324,6 +324,9 @@ $(document).ready(function() { document.addEventListener('DOMContentLoaded', function() { const table = document.querySelector('.table'); + // Shalom API temporalmente desactivada: por ahora solo mostramos “VERIFICAR” + const SHALOM_API_ENABLED = false; + // Logic for editable cells (existing logic) table.addEventListener('click', function(e) { if (e.target && e.target.classList.contains('editable')) { @@ -347,6 +350,11 @@ document.addEventListener('DOMContentLoaded', function() { modalOrderCodeSpan.textContent = orderCode; modalStatusDiv.innerHTML = '

Consultando estado en Shalom...

'; + if (!SHALOM_API_ENABLED) { + modalStatusDiv.innerHTML = '

VERIFICAR: Estado Shalom requiere confirmación manual por el momento.

'; + return; + } + if (orderNumber === 'N/A' || orderCode === 'N/A' || !orderNumber || !orderCode) { modalStatusDiv.innerHTML = '

No hay suficientes datos (Nº de Orden o Código de Orden) para consultar.

'; return; @@ -524,6 +532,22 @@ document.addEventListener('DOMContentLoaded', function() { function verificarEstados() { const rows = document.querySelectorAll('tr[data-order-number][data-order-code]'); const verifyButton = document.getElementById('verify-statuses-btn'); + + if (!SHALOM_API_ENABLED) { + rows.forEach((row) => { + const pedidoId = row.id.split('-')[1]; + const statusCell = document.getElementById(`live-status-${pedidoId}`); + if (!statusCell) return; + statusCell.innerHTML = 'VERIFICAR'; + }); + + if (verifyButton) { + verifyButton.disabled = false; + verifyButton.innerHTML = 'Verificar Estados Ahora'; + } + return; + } + if(verifyButton) { verifyButton.disabled = true; verifyButton.innerHTML = ' Verificando...'; diff --git a/ruta_contraentrega.php b/ruta_contraentrega.php index 0c6f390e..68e56896 100644 --- a/ruta_contraentrega.php +++ b/ruta_contraentrega.php @@ -355,7 +355,7 @@ include 'layout_header.php';
-
+
@@ -405,6 +405,7 @@ include 'layout_header.php'; data-bs-toggle="modal" data-bs-target="#contraentregaVerificacionModal" data-pedido-id="" data-nombre-completo="" + data-celular="" data-verificacion-tracking="" data-verificacion-imagen="" data-seguimiento="" @@ -537,12 +538,16 @@ include 'layout_header.php';
Pedido #
-
+ +
+
+
+