From 4045771c2d77be18dacbd1d74000d8d42aa514a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Tue, 8 Oct 2024 13:49:53 +0200 Subject: [PATCH] paginas para cosido multiplo de 4 --- ci4/app/Language/es/Presupuestos.php | 1 + .../pages/presupuestoCliente/datosGenerales.js | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php index 829f0af6..5e79ec10 100755 --- a/ci4/app/Language/es/Presupuestos.php +++ b/ci4/app/Language/es/Presupuestos.php @@ -359,6 +359,7 @@ return [ 'sin_gramaje' => "Seleccione gramaje", 'tipo_cubierta' => 'Seleccione tipo de cubierta', 'opcion_solapas' => 'Seleccione la opción para las solapas', + 'paginas_cosido' => 'El número de páginas para cosido debe ser múltiplo de 4', ], 'errores' => [ diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js index c2dd9622..fd6083f6 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js @@ -228,6 +228,19 @@ class DatosGenerales { divTipoLibro.find('.fv-plugins-message-container').remove(); if ($('.tipo-libro.selected').length > 0) { + if($('#cosido').hasClass('selected')){ + const value = parseInt($("#paginas").val()); + if(value % 4 != 0){ + divTipoLibro.append(` +
+
+ ${window.translations["validation"].paginas_cosido} +
+
+ `); + } + } + return true; } else {