Skip to content

Commit

Permalink
adding lastschrift and another format for deposit (#4574)
Browse files Browse the repository at this point in the history
  • Loading branch information
christen90 authored Mar 3, 2025
1 parent 5e7db84 commit 8000f46
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
```
PDFBox Version: 3.0.3 != 1.8.17
Portfolio Performance Version: 0.74.1
System: win32 | x86_64 | 21.0.5+11-LTS | Azul Systems, Inc.
-----------------------------------------
TRADE REPUBLIC BANK GMBH BRUNNENSTRASSE 19-21 10119 BERLIN
VORNAME NACHNAME SEITE 1 von 4
Straße 1, 12345 DATUM 01 Feb. 2025 - 28 Feb. 2025
Ort, DE IBAN DE00000000000000000000
BIC TRBKDEBBXXX
KONTOÜBERSICHT
PRODUKT ANFANGSSALDO ZAHLUNGSEINGANG ZAHLUNGSAUSGANG ENDSALDO
Cashkonto 6344,29 € 2.007,55 € 1.933,66 € 7.346,43 €
UMSATZÜBERSICHT
DATUM TYP BESCHREIBUNG ZAHLUNGSEINGANG ZAHLUNGSAUSGANG SALDO
03
Savings plan execution IE00BFY0GT14 SSGA SPDR ETFs Europe I plc - SPDR
Feb. Handel 9,90 € 6.334,39 €
MSCI World UCITS ETF USD Unhedged, quantity: 0.254022
2025
04
Einzahlung akzeptiert: DE00000000000000000000 auf
Feb. Überweisung 1.200,00 € 7.534,39 €
DE00000000000000000000
2025
17 Feb.
SEPA-Lastschrift Sepa Direct Debit transfer to Stadt Wohnort 187,96 € 7.346,43 €
2025
Trade Republic Bank GmbH www.traderepublic.com Sitz der Gesellschaft: Berlin Direktoren
Brunnenstraße 19-21 [email protected] AG Charlottenburg HRB 244347 B Andreas Torner
10119 Berlin Umsatzsteuer-ID DE307510626 Gernot Mittendorfer
Vorname Hecker
Thomas Pischke
Erstellt am 01 März 2025 Seite 3 von 4
HAFTUNGSAUSSCHLUSS
Sehr geehrte Kundin, sehr geehrter Kunde
Bitte überprüfe unbedingt deine Buchungen, Berechnungen und den Schlusssaldo auf dem Kontoauszug, der gleichzeitig deinen Rechnungsabschluss
darstellt. Der Rechnungsabschluss gilt als anerkannt, wenn du innerhalb von sechs Wochen nach Zugang keine Einwendungen erhebst. Einwendungen
gegen Kontoauszüge sind schriftlich an uns zu richten. Guthaben sind einlagefähig im Sinne des Einlagensicherungsgesetzes (EinSiG). Weitere
Informationen entnehme bitte dem Merkblatt für den Einleger, das zusammen mit unseren Allgemeinen Geschäftsbedingungen eingesehen werden kann.
Trade Republic Bank GmbH www.traderepublic.com Sitz der Gesellschaft: Berlin Direktoren
Brunnenstraße 19-21 [email protected] AG Charlottenburg HRB 244347 B Andreas Torner
10119 Berlin Umsatzsteuer-ID DE307510626 Gernot Mittendorfer
Vorname Hecker
Thomas Pischke
Erstellt am 01 März 2025 Seite 4 von 4

```
Original file line number Diff line number Diff line change
Expand Up @@ -2978,6 +2978,31 @@ public void testKontoauszug28()
hasSource("Kontoauszug28.txt"), hasNote("BACKBLAZE INC"))));
}

@Test
public void testKontoauszug29()
{
TradeRepublicPDFExtractor extractor = new TradeRepublicPDFExtractor(new Client());

List<Exception> errors = new ArrayList<>();

List<Item> results = extractor.extract(PDFInputFile.loadTestCase(getClass(), "Kontoauszug29.txt"), errors);

assertThat(errors, empty());
assertThat(countSecurities(results), is(0L));
assertThat(countBuySell(results), is(0L));
assertThat(countAccountTransactions(results), is(2L));
assertThat(results.size(), is(2));
new AssertImportActions().check(results, CurrencyUnit.EUR);

// assert transaction
assertThat(results, hasItem(deposit(hasDate("2025-02-04"), hasAmount("EUR", 1200.00),
hasSource("Kontoauszug29.txt"), hasNote(null))));

// assert transaction
assertThat(results, hasItem(removal(hasDate("2025-02-17"), hasAmount("EUR", 187.96),
hasSource("Kontoauszug29.txt"), hasNote("Sepa Direct Debit transfer to Stadt Wohnort"))));
}

@Test
public void testReleveDeCompte01()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2148,11 +2148,15 @@ private void addAccountStatementTransaction_Format02()
// 01 Dez.
// Kartentransaktion HubNsrxbIO HbYYXkTJHpUamm 6,70 € 7.496,19 €
// 2024
//
// 17 Feb.
// SEPA-Lastschrift Sepa Direct Debit transfer to Stadt Wohnort 187,96 € 1.550,54 €
// 2025
// @formatter:on
section -> section //
.attributes("date", "note", "amount", "currency", "amountAfter", "currencyAfter", "year") //
.match("^(?<date>[\\d]{2} [\\p{L}]{3,4}([\\.]{1})?).*$") //
.match("^(Kartentransaktion|con tarjeta|Virement|Parrainage) " //
.match("^(Kartentransaktion|con tarjeta|Virement|Parrainage|SEPA\\-Lastschrift) " //
+ "(?<note>(?!(Einzahlung|Ingreso|Paiement)).*) " //
+ "(?<amount>[\\.,\\d]+) (?<currency>\\p{Sc}) " //
+ "(?<amountAfter>[\\.,\\d]+) (?<currencyAfter>\\p{Sc})$") //
Expand Down Expand Up @@ -2568,6 +2572,7 @@ private void addAccountStatementTransaction_Format02()
// Jan. Incoming transfer from Vorname Nachname 500,00 € 581,76 €
// Echtzeitüberweisung
// 2025

// @formatter:on
section -> section //
.attributes("day", "month", "year", "note", "amount", "currency") //
Expand All @@ -2583,6 +2588,27 @@ private void addAccountStatementTransaction_Format02()
t.setCurrencyCode(asCurrencyCode(v.get("currency")));
t.setAmount(asAmount(v.get("amount")));
t.setNote(trim(v.get("note")));
}),
// @formatter:off
// 04
// Einzahlung akzeptiert: DE00000000000000000000 auf
// Feb. Überweisung 1.200,00 € 7.534,39 €
// DE00000000000000000000
// 2025
// @formatter:on
section -> section //
.attributes("day", "month", "year", "amount", "currency") //
.match("^(?<day>[\\d]{2})[\\s]$") //
.match("^(Einzahlung akzeptiert).*$") //
.match("^(?<month>[\\p{L}]{3,4}([\\.]{1})?) " //
+ "(.berweisung) " //
+ "(?<amount>[\\.,\\d]+) (?<currency>\\p{Sc}) [\\.,\\d]+ \\p{Sc}$") //
.match("^.*$") //
.match("^(?<year>[\\d]{4})$") //
.assign((t, v) -> {
t.setDateTime(asDate(v.get("day") + " " + v.get("month") + " " + v.get("year")));
t.setCurrencyCode(asCurrencyCode(v.get("currency")));
t.setAmount(asAmount(v.get("amount")));
}))

.wrap(t -> {
Expand Down

0 comments on commit 8000f46

Please sign in to comment.