fixes currency when more than one poistion is added

This commit is contained in:
7u83 2020-03-06 16:00:52 +00:00
parent de84516819
commit dc88aac29c

View file

@ -8,6 +8,7 @@ function renumberTableRows(){
for (var i = 0, row; row = table.rows[i]; i++) {
// row.cells[0].innerHTML=row_no++;
}
return i;
}
@ -23,10 +24,20 @@ function isFloat(val) {
}
function disableCurrency()
{
if (countRows()>0){
document.getElementById("a_currency").disabled=true;
}
else {
document.getElementById("a_currency").disabled=false;
}
}
function deleteTableRow(rowId){
var target = document.getElementById("upload-target"+rowId);
// this.message = app.message;
// var children = target.children;
@ -50,9 +61,12 @@ function deleteTableRow(rowId){
var element = document.getElementById("trow"+rowId);
element.parentNode.removeChild(element);
disableCurrency();
renumberTableRows();
// alert(rowId);
}
@ -200,6 +214,8 @@ function addTableRow(){
// renumberTableRows();
currentRowId++;
reset2();
disableCurrency();
}
@ -357,3 +373,6 @@ function checkIban()
}
}
*/