}
 
 function fill_sink() {
+    let sink_account = '';
     let sink_indices = [];
     const sum_per_currency = {};
     for (let i = 0; i < dat_lines.length; i++) {
         if (!dat_line.is_intro && !dat_line.error) {
             const currency = dat_line.booked.currency || '€';
             if (dat_line.booked.amount == 'None') {
-                sink_indices.push(i);
+                if (sink_account == dat_line.booked.account || !sink_account) {
+                    if (!sink_account) {
+                        sink_account = dat_line.booked.account;
+                    }
+                    sink_indices.push(i);
+                }
             } else {
                if (!Object.hasOwn(sum_per_currency, currency)) {
                    sum_per_currency[currency] = 0;
             }
         }
     }
+    if (!sink_account) {
+        sink_account = '?';
+    }
     const sink_amounts_per_currency = {};
     for (const [currency, amount] of Object.entries(sum_per_currency)) {
         if (amount != 0) {
     }
     for (i = 0; i < Object.keys(sink_amounts_per_currency).length - sink_indices.length; i++) {
         sink_indices.push(dat_lines.length);
-        new_line = {error: '', comment: '', booked: {account: '?', amount: 'None', currency: ''}};
+        new_line = {error: '', comment: '', booked: {account: sink_account, amount: 'None', currency: ''}};
         dat_lines.push(new_line);
     }
     let sink_indices_index = 0;