arreglados multiples fallos de presupuesto admin y problema en los forms de las tarifas

This commit is contained in:
2025-01-29 20:42:19 +01:00
parent 7e3d1d5df4
commit 2871326989
9 changed files with 202 additions and 75 deletions

View File

@ -108,7 +108,7 @@ class Envios {
$("#costeEnvios").text(total.toFixed(2) + "€" || "0€");
self.check_unidades_enviadas();
self.check_unidades_enviadas(null, self.recogerTaller.prop('checked'));
}
});
@ -169,11 +169,10 @@ class Envios {
self.modalYesNo.init();
self.modalYesNo.show(() => {
self.table.clear().draw();
self.check_unidades_enviadas();
self.check_unidades_enviadas(null, true);
self.recogerTaller.prop('checked', true);
self.modalYesNo.hide();
self.insertarEnvio.addClass('d-none');
self.modalYesNo.hide();
});
}
else {
@ -641,7 +640,11 @@ class Envios {
}
}
check_unidades_enviadas() {
check_unidades_enviadas(event, recogerTaller = null) {
if(recogerTaller === null) {
recogerTaller = this.recogerTaller.prop('checked');
}
let cantidad_total = 0
this.table.rows().every(function (rowIdx, tableLoop, rowLoop) {
@ -650,7 +653,7 @@ class Envios {
const tirada = parseInt($('#tirada').val());
let htmlString = '';
if (cantidad_total < tirada && this.recogerTaller.prop('checked') === false) {
if (cantidad_total < tirada && recogerTaller === false) {
htmlString = `
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
<span class="alert-icon alert-icon-lg text-primary me-2">