Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6417,6 +6417,251 @@ public void testDividende36MitSteuerbehandlungVonDividende36WithSecurityInEUR_So
hasTaxes("EUR", 2.03), hasFees("EUR", 0.00))));
}

@Test
public void testDividende37()
{
var extractor = new ComdirectPDFExtractor(new Client());

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

var results = extractor.extract(PDFInputFile.loadTestCase(getClass(), "Dividende37.txt"), errors);

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

// check security
assertThat(results, hasItem(security( //
hasIsin("US94106L1098"), hasWkn("893579"), hasTicker(null), //
hasName("W a s t e M a n a g e m e n t I n c . R e g i s t e r e d S h a r e s D L - , 0 1"), //
hasCurrencyCode("USD"))));

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("Dividende37.txt"), //
hasNote("Ref.-Nr.: 2SIMFYBBRBI005MQ | Quartalsdividende"), //
hasAmount("EUR", 3.23), hasGrossValue("EUR", 3.23), //
hasForexGrossValue("USD", 3.77), //
hasTaxes("EUR", 0.00), hasFees("EUR", 0.00))));
}

@Test
public void testDividende37WithSecurityInEUR()
{
var security = new Security("W a s t e M a n a g e m e n t I n c . R e g i s t e r e d S h a r e s D L - , 0 1", "EUR");
security.setIsin("US94106L1098");
security.setWkn("893579");

var client = new Client();
client.addSecurity(security);

var extractor = new ComdirectPDFExtractor(client);

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

var results = extractor.extract(PDFInputFile.loadTestCase(getClass(), "Dividende37.txt"), errors);

assertThat(errors, empty());
assertThat(countSecurities(results), is(0L));
assertThat(countBuySell(results), is(0L));
assertThat(countAccountTransactions(results), is(1L));
assertThat(countAccountTransfers(results), is(0L));
assertThat(countItemsWithFailureMessage(results), is(0L));
assertThat(results.size(), is(1));
new AssertImportActions().check(results, "EUR");

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("Dividende37.txt"), //
hasNote("Ref.-Nr.: 2SIMFYBBRBI005MQ | Quartalsdividende"), //
hasAmount("EUR", 3.23), hasGrossValue("EUR", 3.23), //
hasTaxes("EUR", 0.00), hasFees("EUR", 0.00))));
}

@Test
public void testSteuerbehandlungVonDividende37()
{
var extractor = new ComdirectPDFExtractor(new Client());

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

var results = extractor.extract(PDFInputFile.loadTestCase(getClass(), "SteuerbehandlungVonDividende37.txt"),
errors);

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

// check security
assertThat(results, hasItem(security( //
hasIsin("US94106L1098"), hasWkn("893579"), hasTicker(null), //
hasName("WASTE MANAGEMENT"), //
hasCurrencyCode("EUR"))));

// check tax refund transaction
assertThat(results, hasItem(taxes( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("SteuerbehandlungVonDividende37.txt"), //
hasNote(null), //
hasAmount("EUR", 0.48), hasGrossValue("EUR", 0.48), //
hasTaxes("EUR", 0.00), hasFees("EUR", 0.00))));
}

@Test
public void testDividende37MitSteuerbehandlungVonDividende37()
{
var extractor = new ComdirectPDFExtractor(new Client());

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

var results = extractor.extract(
PDFInputFile.loadTestCase(getClass(), "Dividende37.txt", "SteuerbehandlungVonDividende37.txt"),
errors);

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

// check security
assertThat(results, hasItem(security( //
hasIsin("US94106L1098"), hasWkn("893579"), hasTicker(null), //
hasName("W a s t e M a n a g e m e n t I n c . R e g i s t e r e d S h a r e s D L - , 0 1"), //
hasCurrencyCode("USD"))));

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("Dividende37.txt; SteuerbehandlungVonDividende37.txt"), //
hasNote("Ref.-Nr.: 2SIMFYBBRBI005MQ | Quartalsdividende"), //
hasAmount("EUR", 2.74), hasGrossValue("EUR", 3.22), //
hasForexGrossValue("USD", 3.77), //
hasTaxes("EUR", 0.48), hasFees("EUR", 0.00))));
}

@Test
public void testDividende37MitSteuerbehandlungVonDividende37WithSecurityInEUR()
{
var security = new Security("W a s t e M a n a g e m e n t I n c . R e g i s t e r e d S h a r e s D L - , 0 1", "EUR");
security.setIsin("US94106L1098");
security.setWkn("893579");

var client = new Client();
client.addSecurity(security);

var extractor = new ComdirectPDFExtractor(client);

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

var results = extractor.extract(
PDFInputFile.loadTestCase(getClass(), "Dividende37.txt", "SteuerbehandlungVonDividende37.txt"),
errors);

assertThat(errors, empty());
assertThat(countSecurities(results), is(0L));
assertThat(countBuySell(results), is(0L));
assertThat(countAccountTransactions(results), is(1L));
assertThat(countAccountTransfers(results), is(0L));
assertThat(countItemsWithFailureMessage(results), is(0L));
assertThat(results.size(), is(1));
new AssertImportActions().check(results, "EUR");

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("Dividende37.txt; SteuerbehandlungVonDividende37.txt"), //
hasNote("Ref.-Nr.: 2SIMFYBBRBI005MQ | Quartalsdividende"), //
hasAmount("EUR", 2.74), hasGrossValue("EUR", 3.22), //
hasTaxes("EUR", 0.48), hasFees("EUR", 0.00))));
}

@Test
public void testDividende37MitSteuerbehandlungVonDividende37_SourceFilesReversed()
{
var extractor = new ComdirectPDFExtractor(new Client());

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

var results = extractor.extract(
PDFInputFile.loadTestCase(getClass(), "SteuerbehandlungVonDividende37.txt", "Dividende37.txt"),
errors);

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

// check security
assertThat(results, hasItem(security( //
hasIsin("US94106L1098"), hasWkn("893579"), hasTicker(null), //
hasName("WASTE MANAGEMENT"), //
hasCurrencyCode("EUR"))));

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("Dividende37.txt; SteuerbehandlungVonDividende37.txt"), //
hasNote("Ref.-Nr.: 2SIMFYBBRBI005MQ | Quartalsdividende"), //
hasAmount("EUR", 2.74), hasGrossValue("EUR", 3.22), //
hasTaxes("EUR", 0.48), hasFees("EUR", 0.00))));
}

@Test
public void testDividende37MitSteuerbehandlungVonDividende37WithSecurityInEUR_SourceFilesReversed()
{
var security = new Security("WASTE MANAGEMENT", "EUR");
security.setIsin("US94106L1098");
security.setWkn("893579");

var client = new Client();
client.addSecurity(security);

var extractor = new ComdirectPDFExtractor(client);

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

var results = extractor.extract(
PDFInputFile.loadTestCase(getClass(), "SteuerbehandlungVonDividende37.txt", "Dividende37.txt"),
errors);

assertThat(errors, empty());
assertThat(countSecurities(results), is(0L));
assertThat(countBuySell(results), is(0L));
assertThat(countAccountTransactions(results), is(1L));
assertThat(countAccountTransfers(results), is(0L));
assertThat(countItemsWithFailureMessage(results), is(0L));
assertThat(results.size(), is(1));
new AssertImportActions().check(results, "EUR");

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2025-09-30T00:00"), hasShares(4.564), //
hasSource("Dividende37.txt; SteuerbehandlungVonDividende37.txt"), //
hasNote("Ref.-Nr.: 2SIMFYBBRBI005MQ | Quartalsdividende"), //
hasAmount("EUR", 2.74), hasGrossValue("EUR", 3.22), //
hasTaxes("EUR", 0.48), hasFees("EUR", 0.00))));
}

@Test
public void testSteuerbehandlungVonEinloesung01()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
```
PDFBox Version: 3.0.5
Portfolio Performance Version: 0.80.4
System: win32 | x86_64 | 21.0.5+11-LTS | Azul Systems, Inc.
-----------------------------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
25449 Quickborn









Depotnr.: 124678906
14567 891 BLZ: 512 345 72
Herrn
Marc Billi

Berliner Allee 20

74198 Stuttgart
26.09.2025
G u t s c h ri f t fä ll ig e r W e r t p a p i e r -E r tr ä g e
Dividendengutschrift
Depotbestand Wertpapier-Bezeichnung WKN/ISIN
per 11.09.2025 W a s t e M a n a g e m e n t I n c . 893579
STK 4,564 R e g i s t e r e d S h a r e s D L - , 0 1 US94106L1098
Emissionsland: VEREINIGTE STAATEN
USD 0,825 Dividende pro Stück für Geschäftsjahr 01.01.25 bis 31.12.25
zahlbar ab 26.09.2025 Quartalsdividende
Abrechnung Dividendengutschrift
Bruttobetrag: USD 3,77
15,000 % Quellensteuer USD 0,57 -
Ausmachender Betrag USD 3,20
zum Devisenkurs: EUR/USD 1,169300 EUR 2,74
Verrechnung über Konto (IBAN) Valuta Zu Ihren Gunsten vor Steuern
DE50 1246 1245 8822 1759 51 EUR 30.09.2025 EUR 2,74
Information zur steuerlichen Behandlung dieses Geschäftsvorganges und den auf
Ihrem Konto gebuchten Endbetrag finden Sie auf der separaten Steuermitteilung
(Referenz-Nr. 2SIMFYBBRBI005MQ).
Ihre comdirect

*Diese Abrechnung wird von der Bank nicht unterschrieben
DD762/11/09

```
Loading