mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-28 05:39:13 +00:00
añadido lomo
This commit is contained in:
@ -281,6 +281,9 @@ public class Presupuesto extends AbstractAuditedEntity implements Cloneable {
|
|||||||
@Column(name = "papel_interior_id")
|
@Column(name = "papel_interior_id")
|
||||||
private Integer papelInteriorId;
|
private Integer papelInteriorId;
|
||||||
|
|
||||||
|
@Column(name = "lomo")
|
||||||
|
private Double lomo;
|
||||||
|
|
||||||
@NotNull(message = "{presupuesto.errores.gramaje-interior}", groups = PresupuestoValidationGroups.Interior.class)
|
@NotNull(message = "{presupuesto.errores.gramaje-interior}", groups = PresupuestoValidationGroups.Interior.class)
|
||||||
@Column(name = "gramaje_interior")
|
@Column(name = "gramaje_interior")
|
||||||
private Integer gramajeInterior;
|
private Integer gramajeInterior;
|
||||||
@ -720,6 +723,14 @@ public class Presupuesto extends AbstractAuditedEntity implements Cloneable {
|
|||||||
this.papelInteriorId = papelInteriorId;
|
this.papelInteriorId = papelInteriorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Double getLomo() {
|
||||||
|
return lomo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLomo(Double lomo) {
|
||||||
|
this.lomo = lomo;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getGramajeInterior() {
|
public Integer getGramajeInterior() {
|
||||||
return gramajeInterior;
|
return gramajeInterior;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,7 @@ public class PresupuestoFormDataMapper {
|
|||||||
public Cubierta cubierta = new Cubierta();
|
public Cubierta cubierta = new Cubierta();
|
||||||
public Servicios servicios = new Servicios();
|
public Servicios servicios = new Servicios();
|
||||||
public Integer selectedTirada;
|
public Integer selectedTirada;
|
||||||
|
public Double lomo;
|
||||||
|
|
||||||
// ===== Datos Generales =====
|
// ===== Datos Generales =====
|
||||||
public static class DatosGenerales {
|
public static class DatosGenerales {
|
||||||
@ -193,6 +194,7 @@ public class PresupuestoFormDataMapper {
|
|||||||
|
|
||||||
// ===== Selected tirada
|
// ===== Selected tirada
|
||||||
vm.selectedTirada = p.getSelectedTirada();
|
vm.selectedTirada = p.getSelectedTirada();
|
||||||
|
vm.lomo = p.getLomo();
|
||||||
|
|
||||||
// ===== Servicios desde JSONs
|
// ===== Servicios desde JSONs
|
||||||
vm.servicios.servicios = parse(p.getServiciosJson(),
|
vm.servicios.servicios = parse(p.getServiciosJson(),
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
databaseChangeLog:
|
||||||
|
- changeSet:
|
||||||
|
id: 0027-add-lomo-to-presupuesto
|
||||||
|
author: jjo
|
||||||
|
changes:
|
||||||
|
- addColumn:
|
||||||
|
tableName: presupuesto
|
||||||
|
columns:
|
||||||
|
- column:
|
||||||
|
name: lomo
|
||||||
|
type: DECIMAL(12, 2)
|
||||||
|
defaultValueNumeric: 0
|
||||||
|
afterColumn: papel_interior_id
|
||||||
|
|
||||||
|
rollback:
|
||||||
|
- dropColumn:
|
||||||
|
tableName: presupuesto
|
||||||
|
columnName: lomo
|
||||||
@ -51,3 +51,5 @@ databaseChangeLog:
|
|||||||
file: db/changelog/changesets/0025-create-facturas-direcciones.yml
|
file: db/changelog/changesets/0025-create-facturas-direcciones.yml
|
||||||
- include:
|
- include:
|
||||||
file: db/changelog/changesets/0026-drop-entrega-tipo-from-presupuesto.yml
|
file: db/changelog/changesets/0026-drop-entrega-tipo-from-presupuesto.yml
|
||||||
|
- include:
|
||||||
|
file: db/changelog/changesets/0027-add-lomo-to-presupuesto.yml
|
||||||
|
|||||||
@ -107,6 +107,7 @@ export default class PresupuestoWizard {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectedTirada: 10,
|
selectedTirada: 10,
|
||||||
|
lomo: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// pestaña datos generales
|
// pestaña datos generales
|
||||||
@ -443,7 +444,8 @@ export default class PresupuestoWizard {
|
|||||||
...this.#getDatosGeneralesData(),
|
...this.#getDatosGeneralesData(),
|
||||||
...this.#getInteriorData(),
|
...this.#getInteriorData(),
|
||||||
...this.#getCubiertaData(),
|
...this.#getCubiertaData(),
|
||||||
selectedTirada: this.formData.selectedTirada
|
selectedTirada: this.formData.selectedTirada,
|
||||||
|
lomo: this.formData.lomo
|
||||||
};
|
};
|
||||||
|
|
||||||
const sobrecubierta = data.sobrecubierta;
|
const sobrecubierta = data.sobrecubierta;
|
||||||
@ -965,6 +967,7 @@ export default class PresupuestoWizard {
|
|||||||
} else {
|
} else {
|
||||||
const maxSolapas = data.solapas ?? 120;
|
const maxSolapas = data.solapas ?? 120;
|
||||||
const lomo = data.lomo ?? 0;
|
const lomo = data.lomo ?? 0;
|
||||||
|
|
||||||
$('.solapas-presupuesto').attr('max', maxSolapas);
|
$('.solapas-presupuesto').attr('max', maxSolapas);
|
||||||
$('.max-solapa-text').text(function (_, textoActual) {
|
$('.max-solapa-text').text(function (_, textoActual) {
|
||||||
return textoActual.replace(/\d+/, maxSolapas);
|
return textoActual.replace(/\d+/, maxSolapas);
|
||||||
@ -1018,6 +1021,7 @@ export default class PresupuestoWizard {
|
|||||||
|
|
||||||
const dataCubierta = this.#getCubiertaData();
|
const dataCubierta = this.#getCubiertaData();
|
||||||
this.#updateCubiertaData(dataCubierta);
|
this.#updateCubiertaData(dataCubierta);
|
||||||
|
this.formData.lomo = lomo;
|
||||||
this.#cacheFormData();
|
this.#cacheFormData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user