mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
finalizado a espera de pruebas
This commit is contained in:
@ -100,8 +100,23 @@ function generarResumen(){
|
|||||||
total_iva = total * 1.21;
|
total_iva = total * 1.21;
|
||||||
}
|
}
|
||||||
$('#resumenTotalIVA').text('Total (I.V.A. ' + (($('#ivaReducido').val() == '1')?'4':'21') + '%): ' + total_iva.toFixed(2) + '€');
|
$('#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<elements.length; index++){
|
||||||
|
let precio_envio = parseFloat($(elements[index]).attr('p'));
|
||||||
|
total += precio_envio;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return total;
|
||||||
}
|
}
|
||||||
1920
xdebug.log
1920
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user