1
0
Fork 0

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
1 changed files with 20 additions and 1 deletions

View File

@ -8,6 +8,7 @@ function renumberTableRows(){
for (var i = 0, row; row = table.rows[i]; i++) { for (var i = 0, row; row = table.rows[i]; i++) {
// row.cells[0].innerHTML=row_no++; // 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){ function deleteTableRow(rowId){
var target = document.getElementById("upload-target"+rowId); var target = document.getElementById("upload-target"+rowId);
// this.message = app.message; // this.message = app.message;
// var children = target.children; // var children = target.children;
@ -50,9 +61,12 @@ function deleteTableRow(rowId){
var element = document.getElementById("trow"+rowId); var element = document.getElementById("trow"+rowId);
element.parentNode.removeChild(element); element.parentNode.removeChild(element);
disableCurrency();
renumberTableRows(); renumberTableRows();
// alert(rowId); // alert(rowId);
} }
@ -200,6 +214,8 @@ function addTableRow(){
// renumberTableRows(); // renumberTableRows();
currentRowId++; currentRowId++;
reset2(); reset2();
disableCurrency();
} }
@ -357,3 +373,6 @@ function checkIban()
} }
} }
*/ */