Update buttons.php

Fix compilazione automatica fe passive,  nel caso nelle fatture precedenti non venga trovata un'aliquota
This commit is contained in:
Luca 2020-02-28 17:45:49 +01:00
parent 9d26c8005e
commit fb35d3e192
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ 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();
$(this).selectSet(data.iva[aliquota].id); if (data.iva[aliquota] !== undefined){
$(this).selectSet(data.iva[aliquota].id);
}
}); });
$("select[name^=conto]").each(function(){ $("select[name^=conto]").each(function(){