cuando se añade más de una direccion y tiene el cliente marcado que no tenga envio base, se suman las dos direcciones al presupuesto

This commit is contained in:
2025-05-06 14:00:03 +02:00
parent 456dc7ff18
commit 15227998aa

View File

@ -290,7 +290,7 @@ class Resumen {
if (typeof $('#tableOfDireccionesEnvio').DataTable() !== 'undefined' && $('#tableOfDireccionesEnvio').DataTable().rows().count() > 0) {
$('#tableOfDireccionesEnvio').DataTable().rows().every(function (rowIdx, tableLoop, rowLoop) {
// el primer envio es el base, y no se debe de cobrar
if (rowIdx != 0) {
if (rowIdx != 0 || (rowIdx == 0 && $('#noEnvioBase').val() == 1)) {
let data = this.data()
totalEnvios += parseFloat(data.precio)