mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglado bug en direcciones de envio. tarifas envio ordenables por 3 columnas
This commit is contained in:
@ -142,8 +142,10 @@ class PresupuestoCliente {
|
||||
if (this.calcularPresupuesto) {
|
||||
|
||||
if (event.target.id === 'divDirecciones') {
|
||||
this.actualizarTiradasEnvio = false;
|
||||
|
||||
if (!this.direcciones.calcularPresupuesto) {
|
||||
this.actualizarTiradasEnvio = false;
|
||||
|
||||
$('#loader').modal('hide');
|
||||
return;
|
||||
}
|
||||
@ -348,6 +350,16 @@ class PresupuestoCliente {
|
||||
|
||||
#confirmPresupuesto() {
|
||||
|
||||
let total_unidades = 0;
|
||||
this.direcciones.direcciones.forEach(element => {
|
||||
total_unidades += parseInt(element.tirada.val());
|
||||
});
|
||||
|
||||
if(total_unidades != parseInt(this.direcciones.getSelectedTirada())){
|
||||
popErrorAlert("No se puede confirmar el presupuesto. La suma de las unidades enviadas no coincide con la tirada seleccionada.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.#solicitudGuardarPresupuesto(true);
|
||||
}
|
||||
|
||||
@ -451,8 +463,9 @@ class PresupuestoCliente {
|
||||
response.precio_u[i]
|
||||
);
|
||||
|
||||
if (this.actualizarTiradasEnvio)
|
||||
if (this.actualizarTiradasEnvio){
|
||||
this.direcciones.insertTirada(tiradas[i]);
|
||||
}
|
||||
|
||||
}
|
||||
this.lc.val(parseFloat(response.info.lomo_cubierta).toFixed(2));
|
||||
|
||||
Reference in New Issue
Block a user