-
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js
index 55594748..bd357b73 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js
@@ -243,6 +243,7 @@ class Comparador {
this.papelSobrecubierta.onChange(() => this.gramajeSobrecubierta.setVal(0))
this.sobrecubierta.on('change', () => {
if (this.sobrecubierta.val() == 1) {
+ $('#solapas_sobrecubierta').prop('checked', true);
$('#compPapelSobrecubierta').prop('disabled', false);
$('#compGramajeSobrecubierta').prop('disabled', false);
}
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js
index 0163ae69..44abc868 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js
@@ -85,6 +85,17 @@ class DatosLibro {
this.paginas.on('change', this.changePaginas.bind(this));
this.tirada.on('change', this.changeTirada.bind(this));
+
+ $('.formato-libro').on('change', function () {
+ $(document).trigger('update-lineas-presupuesto');
+ /* TO-DO
+ updatePresupuesto({
+ update_servicios: true,
+ update_envios: true,
+ update_resumen: true,
+ update_tiradas_alternativas: true
+ })*/
+ });
}
}
@@ -161,9 +172,12 @@ class DatosLibro {
this.checkPaginasPresupuesto();
+ $('.tamanio-personalizado').addClass('d-none');
+
+ $(document).trigger('update-lineas-presupuesto');
+
// TO-DO
/*updatePresupuesto({
- update_lineas: true,
update_servicios: true,
update_envios: true,
update_resumen: true,
@@ -190,6 +204,7 @@ class DatosLibro {
$("#label_papelFormatoId").text(
window.language.Presupuestos.papelFormatoId + '*');
}
+ $(document).trigger('update-lineas-presupuesto');
}
@@ -367,20 +382,31 @@ class DatosLibro {
if ($('#tipo_impresion_id').val() == 1 || $('#tipo_impresion_id').val() == 3 ||
$('#tipo_impresion_id').val() == 5 || $('#tipo_impresion_id').val() == 7) {
- $(".impresion-con-solapas").addClass('d-none');
+ $(".solapas-cubierta-div").addClass('d-none');
}
- else {
+ else{
if (datos.solapasCubierta) {
this.solapasCubierta.prop('checked', true);
this.anchoSolapasCubierta.val(datos.solapasCubiertaAncho);
$('#div_solapas_ancho').removeClass('d-none');
}
- if (datos.solapasSobrecubierta) {
- this.solapasSobrecubierta.prop('checked', true);
- this.anchoSolapasSobrecubierta.val(datos.solapasSobrecubiertaAncho);
- $('#div_solapas_ancho_sobrecubierta').removeClass('d-none');
+ else{
+ this.solapasCubierta.prop('checked', false);
+ this.anchoSolapasCubierta.val(0);
+ $('#div_solapas_ancho').addClass('d-none');
}
}
+ if (datos.solapasSobrecubierta) {
+ this.solapasSobrecubierta.prop('checked', true);
+ this.anchoSolapasSobrecubierta.val(datos.solapasSobrecubiertaAncho);
+ $('#div_solapas_ancho_sobrecubierta').removeClass('d-none');
+ }
+ else{
+ this.solapasSobrecubierta.prop('checked', false);
+ this.anchoSolapasSobrecubierta.val(0);
+ $('#div_solapas_ancho_sobrecubierta').addClass('d-none');
+ }
+
this.acabadoCubierta.setOption(datos.acabadoCubierta.id, datos.acabadoCubierta.text);
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js
index aa9ac944..8e68b1d6 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js
@@ -37,7 +37,6 @@ class LineasPresupuesto {
// TO-DO
/*updatePresupuesto({
- update_lineas: false,
update_servicios: true,
update_envios: true,
update_resumen: true,
@@ -1464,6 +1463,10 @@ class LineasPresupuesto {
cliente_id: $('#clienteId').find(":selected").val(),
};
+ if(datos.ancho==0 || datos.alto==0){
+ return;
+ }
+
if (linea.includes('rot')) {
if (fromComparador) {
datos.paginas_negro = parseInt($('#compPaginasNegro').val())
@@ -1514,27 +1517,39 @@ class LineasPresupuesto {
(response) => {
if (response.lineas.length > 0) {
- $.each(response.lineas, function (key, value) {
+ let borrar_linea = true;
+ // Si viene del comparador
+ if (Object.keys(input_data).length == 0) {
+ borrar_linea = false;
+ }
+
+ for(let $i=0; $i