1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 23:33:02 +01:00

Fix aggiunta modelli prima nota

This commit is contained in:
MatteoPistorello 2022-09-12 17:00:58 +02:00
parent bffe51c49b
commit 29c89262f4

View File

@ -164,15 +164,18 @@ echo '
});
$(document).on("change", "select", function() {
let row = $(this).parent().parent();
let row = $(this).parent().parent().parent();
if (row.find("input[disabled]").length > 1) {
row.find("input").prop("disabled", !$(this).val());
}
// Trigger dell\'evento keyup() per la prima volta, per eseguire i dovuti controlli nel caso siano predisposte delle righe in prima nota
$("input[id*=dare][value!=\'\'], input[id*=avere][value!=\'\']").keyup();
});
$(document).on("keyup change", "input[id*=dare]", function() {
let row = $(this).parent().parent();
let row = $(this).parent().parent().parent();
if (!$(this).prop("disabled")) {
row.find("input[id*=avere]").prop("disabled", $(this).val().toEnglish());
@ -180,7 +183,7 @@ echo '
});
$(document).on("keyup change", "input[id*=avere]", function() {
let row = $(this).parent().parent();
let row = $(this).parent().parent().parent();
if (!$(this).prop("disabled")) {
row.find("input[id*=dare]").prop("disabled", $(this).val().toEnglish());