+function replace() {
+ const from = document.getElementById("replace_from").value;
+ const to = document.getElementById("replace_to").value;
+ dat_lines.forEach((dat_line) => {
+ dat_line.comment = dat_line.comment.replaceAll(from, to);
+ if ('code' in dat_line) {
+ dat_line.code = dat_line.code.replaceAll(from, to);
+ }
+ ['account', 'amount', 'currency'].forEach((key) => {
+ if (key in dat_line.booking_line) {
+ dat_line.booking_line[key] = dat_line.booking_line[key].replaceAll(from, to);
+ }
+ });
+ });
+ taint();
+ update_form();
+}
+