Browse Source

fixes currency when more than one poistion is added

currency
7u83 4 years ago
parent
commit
dc88aac29c
1 changed files with 20 additions and 1 deletions
  1. +20
    -1
      kaform.js

+ 20
- 1
kaform.js 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()
}
}
*/

Loading…
Cancel
Save