Skip to content

Commit

Permalink
Add IBAN to CSVBuchungsImport (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Dippe <info@dippe-it.de>
  • Loading branch information
dippeal and Alexander Dippe committed Dec 17, 2023
1 parent 1feeee8 commit 4714d77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/de/jost_net/JVerein/Variable/BuchungVar.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ public enum BuchungVar
NAME("buchung_name"), //
PROJEKTNUMMER("buchung_projektnummer"), //
PROJEKTBEZEICHNUNG("buchung_projektbezeichnung"), //
SPENDENBESCHEINIGUNG("buchung_spendenbescheinigung"), // ;
ZWECK1("buchung_zweck1");
SPENDENBESCHEINIGUNG("buchung_spendenbescheinigung"), //
ZWECK1("buchung_zweck1"), //
IBAN("buchung_iban");

private String name;

Expand Down
10 changes: 9 additions & 1 deletion src/de/jost_net/JVerein/io/CSVBuchungsImport.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void doImport(Object context, IOFormat format, File file,
.format("Buchungsart %d existiert nicht in JVerein!", bart));
}
Buchungsart b1 = (Buchungsart) bit.next();
bu.setBuchungsart(new Long(b1.getID()));
bu.setBuchungsart(Long.valueOf(b1.getID()));
}
catch (SQLException e)
{
Expand All @@ -197,6 +197,14 @@ public void doImport(Object context, IOFormat format, File file,
throw new ApplicationException(
String.format("Spalte %s fehlt!", BuchungVar.ZWECK1.getName()));
}
try
{
bu.setIban(results.getString(BuchungVar.IBAN.getName()));
}
catch (SQLException e)
{
// Optionales Feld.
}
bu.store();
Application.getMessagingFactory().sendMessage(new BuchungMessage(bu));
}
Expand Down

0 comments on commit 4714d77

Please sign in to comment.