mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'dev/resumen_lateral'
Main See merge request jjimenez/safekat!367
This commit is contained in:
@ -163,8 +163,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;
|
||||
}
|
||||
@ -374,6 +376,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);
|
||||
}
|
||||
|
||||
@ -477,8 +489,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