-  } elsif (!$max_acc_trans_date && ($curr_paid * 1)) {
-    # 2. Fall: Es gab keine Zahlung, aber paid ist nicht 0. Das ist z.B. der Fall, wenn
-    # die Funktion "als bezahlt buchen" verwendet oder wenn ein Beleg storniert wird.
-    # In diesem Fall das letzte Modifikationsdatum als Bezahldatum nehmen, oder aber das
-    # Erstelldatum, wenn keine Modifikation erfolgt ist (bei Stornos z.B.).
-    do_query($form, $dbh, qq|UPDATE $table SET datepaid = COALESCE(mtime::date, itime::date) WHERE id = ?|, $id);
-  }
+    } elsif (!$max_acc_trans_date && ($curr_paid * 1)) {
+      # 2. Fall: Es gab keine Zahlung, aber paid ist nicht 0. Das ist z.B. der Fall, wenn
+      # die Funktion "als bezahlt buchen" verwendet oder wenn ein Beleg storniert wird.
+      # In diesem Fall das letzte Modifikationsdatum als Bezahldatum nehmen, oder aber das
+      # Erstelldatum, wenn keine Modifikation erfolgt ist (bei Stornos z.B.).
+      do_query($form, $dbh, qq|UPDATE $table SET datepaid = COALESCE(mtime::date, itime::date) WHERE id = ?|, $id);
+    }