mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglado bug para cuando sólo hay una linea de plana
This commit is contained in:
@ -338,7 +338,7 @@ $('#papelSobrecubierta').on('change', function () {
|
||||
});
|
||||
|
||||
if (valSobrecubierta != undefined)
|
||||
$('#gramajeSobrecubierta option[value=' + valCubierta + ']').prop('selected', true).trigger('change');
|
||||
$('#gramajeSobrecubierta option[value=' + valSobrecubierta + ']').prop('selected', true).trigger('change');
|
||||
else
|
||||
$('#gramajeSobrecubierta').val('').trigger('change');
|
||||
}
|
||||
@ -377,6 +377,14 @@ function checkValues() {
|
||||
const papelFormatoAncho = $('#anchoLibro').val();
|
||||
const clienteId = $('#clienteId').val();
|
||||
|
||||
if (paginas == '' || isNaN(paginas) || parseInt(paginas) <= 0) {
|
||||
return false;
|
||||
}
|
||||
if(parseInt(paginas)%2!=0){
|
||||
$('#paginas').val(parseInt(paginas)+1).trigger('change');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(clienteId == '' || isNaN(clienteId) || parseInt(clienteId) <= 0){
|
||||
return false;
|
||||
}
|
||||
@ -385,10 +393,6 @@ function checkValues() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (paginas == '' || isNaN(paginas) || parseInt(paginas) <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (papelInterior == '' || gramajeInterior == '') {
|
||||
return false;
|
||||
}
|
||||
@ -598,7 +602,7 @@ async function calcularPresupuesto() {
|
||||
return;
|
||||
}
|
||||
$('#errorTiradas').hide();
|
||||
|
||||
|
||||
// se obtiene la propiedad serv_id de los checkboxes seleccionados de la clase .servicio-extra
|
||||
if (!checkValues()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user