trabajando

This commit is contained in:
2025-04-21 12:43:09 +02:00
parent 19fd76e910
commit fe164c4ab3
2 changed files with 69 additions and 4 deletions

View File

@ -440,6 +440,37 @@ class AlbaranComponent {
});
});
$('#tablaAlbaran' + this.id).on('change', '.input-albaran-linea', (e) => {
const fieldName = $(e.currentTarget).attr('data-field');
const fieldValue = $(e.currentTarget).val();
const albaranId = this.id;
const lineaId = $(e.currentTarget).attr('data-id');
$.post('/albaranes/updateAlbaranLinea', {
fieldName: fieldName,
fieldValue: fieldValue,
lineaId: lineaId
}, (response) => {
if (response.success) {
this.table.ajax.reload(null, false);
} else {
Swal.fire({
title: 'Error',
text: 'No se ha podido actualizar el albarán',
icon: 'error',
showCancelButton: false,
confirmButtonColor: '#3085d6',
confirmButtonText: 'Ok',
customClass: {
confirmButton: 'btn btn-primary me-1',
},
buttonsStyling: false
});
}
});
});
}
_initAutoNumericInputs() {