cargar lineas problema lomo

This commit is contained in:
2025-01-02 17:49:59 +01:00
parent e9d4b0971b
commit ff082dac7f
3 changed files with 8 additions and 5 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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;