diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php
index 30729a8a..4f62b196 100755
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/items/_disenioCubierta.php
@@ -200,7 +200,7 @@
-
@@ -211,7 +211,7 @@
-
@@ -251,7 +251,7 @@
-
@@ -262,7 +262,7 @@
-
+
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js
index fee7ab5d..2076bab5 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/datosGenerales.js
@@ -570,8 +570,11 @@ class DatosGenerales {
this.formatoEstandar.removeClass('d-none');
this.formatoPersonalizado.addClass('d-none');
}
- const alto = this.getDimensionLibro().alto;
- $('#altoFaja').closest('.config-faja').find('.form-text').text('Entre 50 y ' + alto + ' mm');
+ const dimensionLibro = this.getDimensionLibro();
+ if (dimensionLibro && dimensionLibro.alto) {
+
+ $('#altoFaja').closest('.config-faja').find('.form-text').text('Entre 50 y ' + dimensionLibro.alto + ' mm');
+ }
}
#checkValue(event) {
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js
index 3ed65420..2d7c7dd5 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioCubierta.js
@@ -309,11 +309,32 @@ class DisenioCubierta {
this.carasCubierta.on('change', this.#handleCarasCubierta.bind(this));
this.sobrecubierta.on('change', () => {
- this.sobrecubierta.is(":checked") ? this.configuracionSobrecubierta.removeClass("d-none") : this.configuracionSobrecubierta.addClass("d-none")
+
+ if (this.sobrecubierta.is(":checked")) {
+
+ this.configuracionSobrecubierta.removeClass("d-none");
+ if (this.papelSobrecubierta.getVal() && this.gramajeSobrecubierta.getVal()) {
+ $('#tirada').trigger('change'); // recalcular presupuesto
+ }
+ }
+ else {
+ this.configuracionSobrecubierta.addClass("d-none");
+ $('#tirada').trigger('change'); // recalcular presupuesto
+ }
}
);
this.faja.on('change', () => {
- this.faja.is(":checked") ? this.configuracionFaja.removeClass("d-none") : this.configuracionFaja.addClass("d-none");
+
+ if(this.faja.is(":checked")) {
+ this.configuracionFaja.removeClass("d-none");
+ if (this.papelFaja.getVal() && this.gramajeFaja.getVal()) {
+ $('#tirada').trigger('change'); // recalcular presupuesto
+ }
+ }
+ else{
+ this.configuracionFaja.addClass("d-none");
+ $('#tirada').trigger('change'); // recalcular presupuesto
+ }
const div = $('#divExtras'); // Selecciona el div
div.find('.fv-plugins-message-container').remove();
});
@@ -1025,7 +1046,7 @@ class DisenioCubierta {
this.divGramajeCubierta.empty();
this.divPapelCubierta.removeClass('is-invalid');
this.divGramajeCubierta.removeClass('is-invalid');
- this.divPapelEspecial.removeClass('is-invalid');
+ this.divPapelEspecial.removeClass('is-invalid');
if (response.papeles.length > 0) {
this.textoPapelCubierta.removeClass('d-none');