Skip to content

Commit a170900

Browse files
buchenclaude
andcommitted
Updated NIBCBank PDF Extractor to support parsing of dividend ex-date
Issue: #5439 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2485f52 commit a170900

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/nibcbank/NIBCBankPDFExtractorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ public void testDividende01WithSecurityinEUR()
170170
assertThat(transaction.getType(), is(AccountTransaction.Type.DIVIDENDS));
171171

172172
assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2019-12-31T00:00")));
173+
assertThat(transaction.getExDate(), is(LocalDateTime.parse("2019-12-12T00:00")));
173174
assertThat(transaction.getShares(), is(Values.Share.factorize(100)));
174175
assertThat(transaction.getSource(), is("Dividende01.txt"));
175176
assertNull(transaction.getNote());

name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/NIBCBankPDFExtractor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ private void addDividendeTransaction()
160160
.match("^Den Betrag buchen wir mit Wertstellung (?<date>[\\d]{2}\\.[\\d]{2}\\.[\\d]{4}) .*$")
161161
.assign((t, v) -> t.setDateTime(asDate(v.get("date"))))
162162

163+
// Ex-Tag 12.12.2019 fonds) 0,208116300 USD
164+
.section("exDate").optional()
165+
.match("^Ex\\-Tag (?<exDate>[\\d]{2}\\.[\\d]{2}\\.[\\d]{4}).*$")
166+
.assign((t, v) -> t.setExDate(asDate(v.get("exDate"))))
167+
163168
// Ausmachender Betrag 24,03+ EUR
164169
.section("amount", "currency")
165170
.match("^Ausmachender Betrag (?<amount>[\\.,\\d]+)\\+ (?<currency>[\\w]{3})$")

0 commit comments

Comments
 (0)