From d6340fcf9d1f25529c45779f55ea227f42af338b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez=20Ortega?= Date: Wed, 14 Feb 2024 17:57:23 +0100 Subject: [PATCH] corregido bug en la suma de los margenes en los totalizadores. Quitada sangre en interior --- ci4/app/Services/PresupuestoService.php | 8 ++------ .../cosidotapablanda/_resumenPresupuestoItems.php | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index 9f470515..aa81ef9a 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -324,9 +324,7 @@ class PresupuestoService extends BaseService // El ancho si es cosido es el doble $anchoForCalculo = $isCosido ? $ancho * 2 : $ancho; - // Hay que sumar la la sangre al alto y al ancho - $anchoForCalculo += (2*self::SANGRE_FORMAS); - $altoForCalculo = $alto + (2*self::SANGRE_FORMAS); + $altoForCalculo = $alto; $h1_temp = floor($maquina->ancho_impresion / $anchoForCalculo); $h2_temp = floor($maquina->ancho_impresion / $altoForCalculo); @@ -391,9 +389,7 @@ class PresupuestoService extends BaseService $anchoForCalculo = $ancho; } - // Hay que sumar la la sangre al alto y al ancho - $anchoForCalculo += (2*self::SANGRE_FORMAS); - $altoForCalculo = $alto + (2*self::SANGRE_FORMAS); + $altoForCalculo = $alto; if($uso == 'cubierta' || $uso == 'sobrecubierta') { if(property_exists($maquina, 'forzar_num_formas_horizontales_cubierta') && diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_resumenPresupuestoItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_resumenPresupuestoItems.php index 5dee8510..a2ad8d04 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_resumenPresupuestoItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_resumenPresupuestoItems.php @@ -139,7 +139,7 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){ } else{ totalPapel = parseFloat($('#totalCostePapel').text().replace('€', '')) - totalMargenes = parseFloat($('#margenPapel').text().replace('€', '')) + margenPapel = parseFloat($('#margenPapel').text().replace('€', '')) totalImpresion = parseFloat($('#totalCosteImpresion').text().replace('€', '')) margenImpresion = parseFloat($('#margenImpresion').text().replace('€', '')) } @@ -199,7 +199,7 @@ function updateTotales(updateLP=true, updateServicios=true, updateEnvio=true){ totalServicios = parseFloat($('#totalServicios').text().replace('€', '')) margenServicios = parseFloat($('#margenServicios').text().replace('€', '')) } - + if(updateEnvio){ if ( typeof tableEnvios !== 'undefined' && tableEnvios.rows().count() > 0){