Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Geno Broker PDF-Importer to support new transaction #3705

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
PDFBox Version: 1.8.17
Portfolio Performance Version: 0.67.0
-----------------------------------------
GENO Broker GmbH Kundenservice · Postfach 30 30 · 48016 Münster Seite 1
Depotnummer
4760263496
Kundennummer 0385018793
oyKKKw WffWW
Abrechnungsnr. 86249245170
fwLVGm egqky Datum 28.12.2023
oQjHdExCt 8
51752 bhIEGo
Ausschüttung Investmentfonds
Nominale Wertpapierbezeichnung ISIN (WKN)
Stück 30 VANGUARD S&P 500 UCITS ETF IE00B3XXRP09 (A1JX53)
REGISTERED SHARES USD DIS.ON
Zahlbarkeitstag 27.12.2023 Ausschüttung pro St. 0,279226000 USD
Bestandsstichtag 13.12.2023 mit Teilfreistellung (Aktien-
Ex-Tag 14.12.2023 fonds) 0,195458200 USD
Geschäftsjahr 01.07.2023 - 30.06.2024 Herkunftsland Irland
Devisenkurs EUR / USD 1,1168
Devisenkursdatum 28.12.2023
Ausschüttung 8,38 USD 7,50+ EUR
davon steuerfreier Anteil wg. Teilfreistellung 2,52 USD
Kapitalertragsteuerpfl. Ertrag nach Teilfreistellung 5,86 USD
Umrechnung in EUR 5,25 EUR
Berechnungsgrundlage für die Kapitalertragsteuer 5,25 EUR
Kapitalertragsteuer 24,45 % auf 5,25 EUR 1,29- EUR
Solidaritätszuschlag 5,5 % auf 1,29 EUR 0,07- EUR
Kirchensteuer 9 % auf 1,29 EUR 0,11- EUR
Ausmachender Betrag 6,03+ EUR
Lagerstelle CBFI (601617 / 67268)
Den Betrag buchen wir mit Wertstellung 29.12.2023 zu Gunsten des Kontos 2213437 (IBAN wF96 7376 7081 0006 4408
05), BLZ 511 628 21 (BIC GENOXXXXXX).
Keine Steuerbescheinigung.
Bitte ggf. Rückseite beachten.
7700.12290103.0002069ER03

Seite 2
Depotnummer 2433859353
Kundennummer 0487100651
Abrechnungsnr. 86249245170
Datum 28.12.2023
Nachrichtlich die Übersicht Ihrer Verrechnungs- und Steuertopfsalden zum Zeitpunkt der Erstellung der Abrechnung.
Verrechnungstöpfe 2023 Berechnungsgrundlage
der gezahlten Steuern
Euro Aktien Sonstige Sparer- anrechenbare Aktien und Sonstige
Pauschbetrag Quellensteuer
Vorher 6.248,80 0,00 0,00 0,00 1.820,11
Ertrag 0,00 0,00 0,00 0,00 5,25
Nachher 6.248,80 0,00 0,00 0,00 1.825,36
Dieses Dokument wurde maschinell erstellt und wird nicht unterschrieben.
7700.12290103.0002070ER03
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public void testWertpapierKauf03()
hasDate("2023-08-03T12:00"), hasShares(2100), //
hasSource("Kauf03.txt"), //
hasNote("Auftragsnummer: 896962/04.00"), //
hasAmount("EUR", 506.62), hasGrossValue("EUR", 506.62), hasForexGrossValue("CAD", 735.00), //
hasAmount("EUR", 506.62), hasGrossValue("EUR", 506.62), //
hasForexGrossValue("CAD", 735.00), //
hasTaxes("EUR", 0.00), hasFees("EUR", 0.00))));
}

Expand Down Expand Up @@ -303,7 +304,8 @@ public void testDividende02()
hasDate("2023-07-10T00:00"), hasShares(2100), //
hasSource("Dividende02.txt"), //
hasNote("Abrechnungsnr.: 000000000"), //
hasAmount("EUR", 6107.09), hasGrossValue("EUR", 9475.70), hasForexGrossValue("CAD", 14133.00), //
hasAmount("EUR", 6107.09), hasGrossValue("EUR", 9475.70), //
hasForexGrossValue("CAD", 14133.00), //
hasTaxes("EUR", 2368.93 + 947.57 + 52.11), hasFees("EUR", 0.00))));
}

Expand Down Expand Up @@ -334,7 +336,8 @@ public void testDividende03()
hasDate("2023-08-29T00:00"), hasShares(600), //
hasSource("Dividende03.txt"), //
hasNote("Abrechnungsnr.: 74014833940"), //
hasAmount("EUR", 236.34), hasGrossValue("EUR", 486.03), hasForexGrossValue("NOK", 5645.46), //
hasAmount("EUR", 236.34), hasGrossValue("EUR", 486.03), //
hasForexGrossValue("NOK", 5645.46), //
hasTaxes("EUR", 121.51 + 121.50 + 6.68), hasFees("EUR", 0.00))));
}

Expand Down Expand Up @@ -404,7 +407,8 @@ public void testDividende04()
hasDate("2023-09-13T00:00"), hasShares(23), //
hasSource("Dividende04.txt"), //
hasNote("Abrechnungsnr.: 75555439660"), //
hasAmount("EUR", 24.01), hasGrossValue("EUR", 32.26), hasForexGrossValue("USD", 34.73), //
hasAmount("EUR", 24.01), hasGrossValue("EUR", 32.26), //
hasForexGrossValue("USD", 34.73), //
hasTaxes("EUR", 4.84 + 3.23 + 0.18), hasFees("EUR", 0.00))));
}

Expand Down Expand Up @@ -447,6 +451,77 @@ public void testDividende04WithSecurityInEUR()
}))));
}

@Test
public void testDividende05()
{
GenoBrokerPDFExtractor extractor = new GenoBrokerPDFExtractor(new Client());

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

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

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

// check security
assertThat(results, hasItem(security( //
hasIsin("IE00B3XXRP09"), hasWkn("A1JX53"), hasTicker(null), //
hasName("VANGUARD S&P 500 UCITS ETF REGISTERED SHARES USD DIS.ON"), //
hasCurrencyCode("USD"))));

// check dividend transaction
assertThat(results, hasItem(dividend( //
hasDate("2023-12-29T00:00"), hasShares(30), //
hasSource("Dividende05.txt"), //
hasNote("Abrechnungsnr.: 86249245170"), //
hasAmount("EUR", 6.03), hasGrossValue("EUR", 7.50), //
hasForexGrossValue("USD", 8.38), //
hasTaxes("EUR", 1.29 + 0.07 + 0.11), hasFees("EUR", 0.00))));
}

@Test
public void testDividende05WithSecurityInEUR()
{
Security security = new Security("VANGUARD S&P 500 UCITS ETF REGISTERED SHARES USD DIS.ON", CurrencyUnit.USD);
security.setIsin("IE00B3XXRP09");
security.setWkn("A1JX53");

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

GenoBrokerPDFExtractor extractor = new GenoBrokerPDFExtractor(client);

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

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

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

// check dividends transaction
assertThat(results, hasItem(dividend( //
hasDate("2023-12-29T00:00"), hasShares(30), //
hasSource("Dividende05.txt"), //
hasNote("Abrechnungsnr.: 86249245170"), //
hasAmount("EUR", 6.03), hasGrossValue("EUR", 7.50), //
hasTaxes("EUR", 1.29 + 0.07 + 0.11), hasFees("EUR", 0.00), //
check(tx -> {
CheckCurrenciesAction c = new CheckCurrenciesAction();
Account account = new Account();
account.setCurrencyCode(CurrencyUnit.EUR);
Status s = c.process((AccountTransaction) tx, account);
assertThat(s, is(Status.OK_STATUS));
}))));
}

@Test
public void testFusion01()
{
Expand Down