Skip to content

Conversation

christen90
Copy link
Contributor

Hi together,
this PR adds incoming, outgoing transfer
It also marks german interest payments in account statement as nonimportable
reason: tax amount is not included in account statements. interest transactions can be imported via specific document.
In my case there were two bookings (Geldmarkt Dividende and Cash Zinsen) in Abrechnung-Zinsen-document.
Importing both (Kontoauszug and Abrechnung Zinsen) was causing that Booking gets imported twice. Once the seperate dividend and interest with the exact amount of tax and the other one from account statement including just the sum. Resulting in a wrong saldo at the end.

BR Christian

marks german interest payments in account statement as nonimportable
t.setDateTime(asDate(v.get("date")));
t.setAmount(asAmount(v.get("amount")));
t.setCurrencyCode(asCurrencyCode(v.get("currency")));
v.getTransactionContext().put(FAILURE, Messages.MsgErrorTransactionTypeNotSupported);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @christen90
Thank you for this pull request.
Unfortunately I don't see a test for this change (FAILURE), why this line is added.
Can you add a test case that makes this change plausible?

Regards
Alex

@Nirus2000 Nirus2000 added the pdf label Sep 13, 2024
…Format01

modifying test cases to check for error messages
assertThat(results, hasItem(interest(hasDate("2023-04-01"), hasAmount("EUR", 0.01), //
hasSource("Kontoauszug05.txt"), hasNote(null))));
assertThat(results, hasItem(withFailureMessage( //
Messages.MsgErrorTransactionTypeNotSupported, //
Copy link
Member

@Nirus2000 Nirus2000 Sep 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @christen90
I understand the reason (interests), but we should issue a different message here, which could possibly also be used for other PDF importers.

I could imagine the following message:

MsgErrorTransactionAlternativeDocumentRequired = "Die Buchung wird mit diesem Dokument nicht verarbeitet. Ihre Bank oder Ihr Broker stellt ein anderes Dokument dafür zur Verfügung."

MsgErrorTransactionAlternativeDocumentRequired = "This document does not process the booking. Your bank or broker will provide a different document for this purpose."

Please change the error message and add the missing translations via deepl.com.

It is also better if you adjust the title of the pull request to make it easier to understand later.

Regards
Alex 😃

@christen90 christen90 changed the title adds ingoing, outgoing transfer adds ingoing, outgoing transfer and mark interest bookings in AccountStatements as NonImportable Sep 15, 2024
- UTF8 upload error in translation file
- Add some source
- Fix test case as similare german transaction
@Nirus2000 Nirus2000 merged commit 996d179 into portfolio-performance:master Sep 15, 2024
2 checks passed
@christen90 christen90 deleted the modifies-trade-republic-pdf-import branch September 15, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

2 participants