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] ?? ''; + } ?>
| - | Pendiente | +VERIFICAR |
@@ -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';
-
+ |