From 39dccf2bfd78e28481ab2d2cd39ff4d9d4cfb0e3 Mon Sep 17 00:00:00 2001 From: Jaime Jimenez Date: Fri, 10 May 2024 12:33:14 +0200 Subject: [PATCH] finalizado a espera de pruebas --- .../form/presupuestos/cliente/resumen.js | 17 +- xdebug.log | 1920 +++++++++++++++++ 2 files changed, 1936 insertions(+), 1 deletion(-) diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/resumen.js b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/resumen.js index 00c3260f..55b1657f 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/resumen.js +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/cliente/resumen.js @@ -100,8 +100,23 @@ function generarResumen(){ total_iva = total * 1.21; } $('#resumenTotalIVA').text('Total (I.V.A. ' + (($('#ivaReducido').val() == '1')?'4':'21') + '%): ' + total_iva.toFixed(2) + '€'); - $('resumenEnvio').text('Envío: ' + '30' + '€'); + const envio = getTotalEnvio(); + $('resumenEnvio').text('Envío: ' + envio.toFixed(2) + '€'); } } +} + +function getTotalEnvio(){ + const elements = $('#divDirecciones').find('.row.mb-3'); + let total = 0.0; + + if(elements.length > 0) { + for (let index=0; index