From ff082dac7fc2405e997ddbabf18f730894ff8905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Thu, 2 Jan 2025 17:49:59 +0100 Subject: [PATCH] cargar lineas problema lomo --- .../safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js | 2 +- .../safekat/pages/presupuestoAdmin/sections/comparador.js | 4 ++-- .../pages/presupuestoAdmin/sections/lineasPresupuesto.js | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js index 54419863..56d2c448 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/presupuestoAdminEdit.js @@ -88,7 +88,7 @@ class PresupuestoAdminEdit { self.datosGenerales.cargarDatos(response.data.datosGenerales); self.datosLibro.cargarDatos(response.data.datosLibro); self.comparador.cargarDatos(response.data.comparador); - self.lineasPresupuesto.cargarDatos(response.data.lineasPresupuesto); + /*self.direcciones.handleChangeCliente(); self.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales); diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js index 69c49dd5..720b9fa2 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/comparador.js @@ -967,7 +967,7 @@ class Comparador { } if (uso == 'cubierta') { - datos.datosPedido.lomo = this.getLomoLineasPresupuesto('interior'); + datos.datosPedido.lomo = $("#lomo_cubierta").val(); datos.datosPedido.solapas = $('#solapas').prop('checked') ? 1 : 0; datos.datosPedido.solapas_ancho = $('#solapas').prop('checked') ? parseInt($('#solapas_ancho').val()) : 0; if (this.tipo_impresion_id == 1 || this.tipo_impresion_id == 3){ @@ -975,7 +975,7 @@ class Comparador { } } else if (uso == 'sobrecubierta') { - datos.datosPedido.lomo = this.getLomoLineasPresupuesto() + this.getLomoLineasPresupuesto('cubierta'); + datos.datosPedido.lomo = $("#lomo_sobrecubierta"); datos.datosPedido.solapas = $('#solapas_sobrecubierta').prop('checked') ? 1 : 0; datos.datosPedido.solapas_ancho = $('#solapas_sobrecubierta').prop('checked') ? parseInt($('#solapas_ancho_sobrecubierta').val()) : 0; } diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js index e208e2d0..62737f2a 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/lineasPresupuesto.js @@ -345,6 +345,9 @@ class LineasPresupuesto { }); this.table.on('draw', function () { + + $("#lomo_cubierta").val(self.getLomoInterior()); + $("#lomo_sobrecubierta").val(parseFloat(self.getLomoInterior()) + parseFloat(self.getLomoCubierta())); self.checkPaginasLineasPresupuesto(); self.mostrarTabsPreview(); }); @@ -1311,12 +1314,12 @@ class LineasPresupuesto { else if (linea == 'lp_cubierta') { datos.solapas = $('#solapas').is(':checked') ? 1 : 0; datos.solapas_ancho = $('#solapas').is(':checked') ? parseInt($('#solapas_ancho').val()) : 0; - datos.lomo = this.getLomoInterior(); + datos.lomo = $('#lomo_cubierta').val(); } else if (linea == 'lp_sobrecubierta') { datos.solapas = $('#solapas_sobrecubierta').is(':checked') ? 1 : 0; datos.solapas_ancho = $('#solapas_sobrecubierta').is(':checked') ? parseInt($('#solapas_ancho_sobrecubierta').val()) : 0; - datos.lomo = this.getLomoCubierta() + this.getLomoInterior(); + datos.lomo = $('#lomo_sobrecubierta').val(); } else if (linea == 'lp_guardas') { datos.paginas_impresion = input_data.paginas_impresion;