Miglioramenti compilazione automatica import FE

This commit is contained in:
MatteoPistorello 2022-01-14 15:44:44 +01:00
parent 7ace1d6bdd
commit c5f2ee82f8
1 changed files with 4 additions and 2 deletions

View File

@ -67,13 +67,15 @@ function compile(btn) {
$("select[name^=iva]").each(function(){ $("select[name^=iva]").each(function(){
var aliquota = $(this).closest("tr").find("[id^=aliquota]").text(); var aliquota = $(this).closest("tr").find("[id^=aliquota]").text();
if (response.iva[aliquota] !== undefined){ if (response.iva[aliquota] !== undefined && !$(this).val()){
$(this).selectSet(response.iva[aliquota].id); $(this).selectSet(response.iva[aliquota].id);
} }
}); });
$("select[name^=conto]").each(function(){ $("select[name^=conto]").each(function(){
if (!$(this).val()){
$(this).selectSetNew(response.conto.id, response.conto.descrizione); $(this).selectSetNew(response.conto.id, response.conto.descrizione);
}
}); });
}, },
error: function(data) { error: function(data) {