From 6e6a0a086a297c96c0e267002cd789aaa0717b58 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83> Date: Thu, 16 Apr 2020 19:38:24 +0000 Subject: [PATCH] first row shows position no, it is possible to add positions w/o voucher --- ka.php | 1 + kaform.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ka.php b/ka.php index 18ca2e4..8abaa5c 100644 --- a/ka.php +++ b/ka.php @@ -247,6 +247,7 @@ Grund für abweichende kontoinhabende Person"> + Pos. Datum Beschreibung Betrag diff --git a/kaform.js b/kaform.js index ffd689d..38fea09 100644 --- a/kaform.js +++ b/kaform.js @@ -3,11 +3,11 @@ var currentRowId=1; var banktype = "bank-eu"; function renumberTableRows(){ - var row_no=1; - var table = document.getElementById("tabbody"); - for (var i = 0, row; row = table.rows[i]; i++) { -// row.cells[0].innerHTML=row_no++; - } + var row_no=1; + var table = document.getElementById("tabbody"); + for (var i = 0, row; row = table.rows[i]; i++) { + row.cells[0].innerHTML=row_no++; + } return i; } @@ -149,8 +149,8 @@ function addTableRow(){ var children = target.children; if (!children.length){ - showAlert("Bitte lade mindestens einen Beleg hoch!"); - return; +// showAlert("Bitte lade mindestens einen Beleg hoch!"); +// return; } @@ -159,7 +159,7 @@ function addTableRow(){ /* a_type = "Hello";*/ - var e=""; + var e=""; // add column for position no // e += `${a_type} @@ -213,7 +213,7 @@ function addTableRow(){ $node.append(element); element.innerHTML=(e); -// renumberTableRows(); + renumberTableRows(); currentRowId++; reset2(); disableCurrency();