diff --git a/src/de/jost_net/JVerein/io/AbrechnungSEPA.java b/src/de/jost_net/JVerein/io/AbrechnungSEPA.java index fe06686..107d925 100644 --- a/src/de/jost_net/JVerein/io/AbrechnungSEPA.java +++ b/src/de/jost_net/JVerein/io/AbrechnungSEPA.java @@ -1,16 +1,16 @@ /********************************************************************** * Copyright (c) by Heiner Jostkleigrewe - * This program is free software: you can redistribute it and/or modify it under the terms of the - * GNU General Public License as published by the Free Software Foundation, either version 3 of the + * This program is free software: you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See * the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with this program. If not, + * You should have received a copy of the GNU General Public License along with this program. If not, * see . - * + * * heiner@jverein.de * www.jverein.de **********************************************************************/ @@ -144,7 +144,7 @@ Lastschrift.class, null); ls.setAbrechnungslauf(Integer.parseInt(abrl.getID())); - assert (za instanceof JVereinZahler) : "Illegaler Zahlertyp in Sepa-Abrechnung detektiert."; + assert za instanceof JVereinZahler : "Illegaler Zahlertyp in Sepa-Abrechnung detektiert."; JVereinZahler vza = (JVereinZahler) za; @@ -548,19 +548,21 @@ DBIterator sekundaer = Einstellungen.getDBService().createList( SekundaereBeitragsgruppe.class); sekundaer.addFilter("mitglied=?", m.getID()); - while (sekundaer.hasNext()) - { - SekundaereBeitragsgruppe sb = (SekundaereBeitragsgruppe) sekundaer - .next(); - JVereinZahler z2 = abrechnungMitgliederSub(param, lastschrift, - monitor, abrl, konto, m, sb.getBeitragsgruppe(), false); - if (z2 != null) - { - z.add(z2); - } - } + if (z != null) { + while (sekundaer.hasNext()) + { + SekundaereBeitragsgruppe sb = (SekundaereBeitragsgruppe) sekundaer.next(); + JVereinZahler z2 = abrechnungMitgliederSub(param, lastschrift, + monitor, abrl, konto, m, + sb.getBeitragsgruppe(), false); + if (z2 != null) + { + z.add(z2); + } + } + lastschrift.add(z); } } @@ -984,7 +986,7 @@ /** * Ist das Abbuchungskonto in der Buchf�hrung eingerichtet? - * + * * @throws SEPAException */ private Konto getKonto() throws ApplicationException, RemoteException, @@ -1121,9 +1123,9 @@ else if (zahler.getMandatsequence().equals(MandatSequence.RCUR)) { lastschriftRCUR.add(zahler); + } else { + throw new SEPAException("Ung�ltige Sequenz"); } - else - throw new SEPAException("Ung�ltige Sequenz"); } public Basislastschrift getLastschriftFRST()