mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglados multiples fallos de presupuesto admin y problema en los forms de las tarifas
This commit is contained in:
@ -382,14 +382,35 @@ class PresupuestoAdminEdit {
|
||||
).get();
|
||||
}
|
||||
|
||||
/*
|
||||
calcularSolapas() {
|
||||
|
||||
|
||||
this.#getDatos(false, true);
|
||||
if (Object.values(this.datos).every(this.#isValidDataForm)) {
|
||||
new Ajax('/presupuestocliente/calcularsolapas',
|
||||
this.datos,
|
||||
{},
|
||||
(response) => {
|
||||
if (response === null || response === undefined || response === "") {
|
||||
console.error("Error en el calculo máximo de solapas.");
|
||||
return;
|
||||
}
|
||||
this.disenioCubierta.tamanioSolapasCubierta.attr('max', response);
|
||||
this.disenioCubierta.solapasSobrecubierta.attr('max', response);
|
||||
this.disenioCubierta.textoSolapasCubierta.text("Entre 60 y " + response + " mm");
|
||||
this.disenioCubierta.textoSolapasSobrecubierta.text("Entre 60 y " + response + " mm");
|
||||
},
|
||||
() => { }
|
||||
).post();
|
||||
}
|
||||
}*/
|
||||
|
||||
checkPaginasPresupuesto() {
|
||||
|
||||
let cantidad_total = 0;
|
||||
|
||||
// TO-DO
|
||||
/*
|
||||
tableLineasPresupuesto.rows().every(function (rowIdx, tableLoop, rowLoop) {
|
||||
this.lineasPresupuesto.table.rows().every(function (rowIdx, tableLoop, rowLoop) {
|
||||
var rowData = this.data();
|
||||
if (rowData.row_id != 'lp_cubierta' && rowData.row_id != 'lp_sobrecubierta' && rowData.row_id != 'lp_guardas')
|
||||
cantidad_total += parseInt(rowData.paginas)
|
||||
@ -409,7 +430,54 @@ class PresupuestoAdminEdit {
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
$('#divAlarmasLineasPresupuesto').html(htmlString)*/
|
||||
$('#divAlarmasLineasPresupuesto').html(htmlString)
|
||||
}
|
||||
|
||||
|
||||
getPaginasColor(){
|
||||
|
||||
let paginasColor = 0;
|
||||
this.lineasPresupuesto.table.rows().every(function (rowIdx, tableLoop, rowLoop) {
|
||||
var rowData = this.data();
|
||||
if (rowData.row_id === 'lp_color' || rowData.row_id === 'lp_colorhq') {
|
||||
return parseInt(rowData.paginas);
|
||||
}
|
||||
if(rowData.row_id === 'lp_rot_color'){
|
||||
return parseInt(rowData.numPagColor);
|
||||
}
|
||||
});
|
||||
return paginasColor;
|
||||
}
|
||||
|
||||
calcularSolapas() {
|
||||
|
||||
let datos = {
|
||||
cliente_id: this.datosGenerales.cliente.getVal(),
|
||||
tirada: this.datosGenerales.tirada.val(),
|
||||
tamanio: this.getDimensionLibro(),
|
||||
paginas: this.datosLibro.paginas.val(),
|
||||
//paginasColor:
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*if (Object.values(this.datos).every(this.#isValidDataForm)) {
|
||||
new Ajax('/presupuestocliente/calcularsolapas',
|
||||
this.datos,
|
||||
{},
|
||||
(response) => {
|
||||
if (response === null || response === undefined || response === "") {
|
||||
console.error("Error en el calculo máximo de solapas.");
|
||||
return;
|
||||
}
|
||||
this.disenioCubierta.tamanioSolapasCubierta.attr('max', response);
|
||||
this.disenioCubierta.solapasSobrecubierta.attr('max', response);
|
||||
this.disenioCubierta.textoSolapasCubierta.text("Entre 60 y " + response + " mm");
|
||||
this.disenioCubierta.textoSolapasSobrecubierta.text("Entre 60 y " + response + " mm");
|
||||
},
|
||||
() => { }
|
||||
).post();
|
||||
}*/
|
||||
}
|
||||
|
||||
getDimensionLibro() {
|
||||
|
||||
Reference in New Issue
Block a user