mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
corregido el tamaño maximo de solapas cuando se añade un presu
This commit is contained in:
@ -587,6 +587,8 @@ class DatosLibro {
|
||||
this.actualizarLimitesPaginas();
|
||||
|
||||
}
|
||||
|
||||
this.calcularSolapas();
|
||||
}
|
||||
|
||||
updateComparador() {
|
||||
|
||||
@ -135,10 +135,10 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
|
||||
calcularSolapas() {
|
||||
calcularSolapas(exclude_guardas = false) {
|
||||
|
||||
/* Solapas Max */
|
||||
this.#getDatos(false, true);
|
||||
this.#getDatos(false, true, exclude_guardas);
|
||||
if (Object.values(this.datos).every(this.#isValidDataForm)) {
|
||||
new Ajax('/presupuestocliente/calcularsolapas',
|
||||
this.datos,
|
||||
@ -199,6 +199,7 @@ class PresupuestoCliente {
|
||||
if(!this.datosGenerales.validate(false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'interior-libro':
|
||||
@ -372,6 +373,14 @@ class PresupuestoCliente {
|
||||
break;
|
||||
|
||||
case 'interior-libro':
|
||||
this.calcularSolapas(true);
|
||||
this.btnPrev.removeClass('d-none');
|
||||
this.btnNext.removeClass('d-none');
|
||||
this.btnSave.removeClass('d-none');
|
||||
this.btnDuplicate.addClass('d-none');
|
||||
this.btnPrint.addClass('d-none');
|
||||
this.btnConfirm.addClass('d-none');
|
||||
break;
|
||||
case 'cubierta-libro':
|
||||
case 'direcciones-libro':
|
||||
this.btnPrev.removeClass('d-none');
|
||||
@ -623,9 +632,9 @@ class PresupuestoCliente {
|
||||
|
||||
case 1:
|
||||
this.disenioInterior.validate();
|
||||
this.calcularSolapas(true);
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
this.disenioCubierta.validate();
|
||||
break;
|
||||
@ -695,7 +704,7 @@ class PresupuestoCliente {
|
||||
}
|
||||
|
||||
|
||||
#getDatos(save = false, calcularSolapas = false) {
|
||||
#getDatos(save = false, calcularSolapas = false, exclude_guardas = false) {
|
||||
|
||||
this.datos = {
|
||||
|
||||
@ -725,7 +734,8 @@ class PresupuestoCliente {
|
||||
this.datos.selectedTirada = this.direcciones.getSelectedTirada();
|
||||
}
|
||||
|
||||
this.datos.guardas = this.disenioCubierta.getGuardas();
|
||||
if(!exclude_guardas)
|
||||
this.datos.guardas = this.disenioCubierta.getGuardas();
|
||||
|
||||
if (calcularSolapas) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user