+ btn.disabled = disabled;
+ btn.onclick = function() {
+ let n_lines_jumped = 0;
+ for (let i = 0; i < table.rows.length; i++) {
+ const row = table.rows[i];
+ if (row.classList.contains('warning')) {
+ n_lines_jumped++;
+ continue;
+ };
+ for (const input of table.rows[i].querySelectorAll('td input')) {
+ const line_to_update = dat_lines[i - n_lines_jumped];
+ if (input.name.endsWith('comment')) {
+ line_to_update.comment = input.value;
+ } else if (input.name.endsWith('error')) {
+ line_to_update.code = input.value;
+ } else if (input.name.endsWith('date')) {
+ line_to_update.booking_line.date = input.value;
+ } else if (input.name.endsWith('target')) {
+ line_to_update.booking_line.target = input.value;
+ } else if (input.name.endsWith('account')) {
+ line_to_update.booking_line.account = input.value;
+ } else if (input.name.endsWith('amount')) {
+ line_to_update.booking_line.amount = input.value;
+ } else if (input.name.endsWith('currency')) {
+ line_to_update.booking_line.currency = input.value;
+ }
+ }
+ }
+ onclick();
+ taint();
+ update_form();
+ };