diff --git a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/traderepublic/TradeRepublicPDFExtractorTest.java b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/traderepublic/TradeRepublicPDFExtractorTest.java index 6d54408f10..f2a1d31040 100644 --- a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/traderepublic/TradeRepublicPDFExtractorTest.java +++ b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/traderepublic/TradeRepublicPDFExtractorTest.java @@ -2301,8 +2301,8 @@ public void testReleveDeCompte03() assertThat(errors, empty()); assertThat(countSecurities(results), is(0L)); assertThat(countBuySell(results), is(0L)); - assertThat(countAccountTransactions(results), is(4L)); - assertThat(results.size(), is(4)); + assertThat(countAccountTransactions(results), is(5L)); + assertThat(results.size(), is(5)); new AssertImportActions().check(results, CurrencyUnit.EUR); @@ -2310,6 +2310,10 @@ public void testReleveDeCompte03() assertThat(results, hasItem(deposit(hasDate("2023-10-12"), hasAmount("EUR", 100.00), // hasSource("ReleveDeCompte03.txt"), hasNote(null)))); + // assert transaction + assertThat(results, hasItem(deposit(hasDate("2023-10-16"), hasAmount("EUR", 25.57), // + hasSource("ReleveDeCompte03.txt"), hasNote("Remboursement de votre cadeau")))); + // assert transaction assertThat(results, hasItem(withFailureMessage( // Messages.MsgErrorTransactionAlternativeDocumentRequired, // diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/TradeRepublicPDFExtractor.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/TradeRepublicPDFExtractor.java index 3ba72f298e..a3afe9b1b7 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/TradeRepublicPDFExtractor.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/TradeRepublicPDFExtractor.java @@ -1840,11 +1840,18 @@ private void addAccountStatementTransaction_Format02() // // 28 juil. // 2024 Virement Apple Pay Top up 100,00 € 104,30 € + // + // 16 oct. + // 2023 Parrainage Remboursement de votre cadeau 25,57 € 111,58 € // @formatter:on section -> section // .attributes("date", "year", "note", "amount", "currency", "amountAfter", "currencyAfter") // .match("^(?[\\d]{2} [\\p{L}]{3,4}([\\.]{1})?)[\\s](Transacci.n.*)?$") // - .match("^(?[\\d]{4}) (Kartentransaktion|con tarjeta|Virement) (?(?!(Einzahlung|Ingreso|Paiement)).*) (?[\\.,\\d]+) (?\\p{Sc}) (?[\\.,\\d]+) (?\\p{Sc})$") // + .match("^(?[\\d]{4}) " // + + "(Kartentransaktion|con tarjeta|Virement|Parrainage) " // + + "(?(?!(Einzahlung|Ingreso|Paiement)).*) " // + + "(?[\\.,\\d]+) (?\\p{Sc}) " // + + "(?[\\.,\\d]+) (?\\p{Sc})$") // .assign((t, v) -> { DocumentContext context = type.getCurrentContext(); Money amountAfter = Money.of(asCurrencyCode(v.get("currencyAfter")), asAmount(v.get("amountAfter")));