Fix TradeRepublic PDF import for Spanish documents (#5458)#5554
Open
blastik wants to merge 5 commits intoportfolio-performance:masterfrom
Open
Fix TradeRepublic PDF import for Spanish documents (#5458)#5554blastik wants to merge 5 commits intoportfolio-performance:masterfrom
blastik wants to merge 5 commits intoportfolio-performance:masterfrom
Conversation
…ance#5458) Three fixes for broken Spanish locale PDF imports: 1. Account statement deposits: accept "Transferencia" as alternative to "Überweisung" so that Spanish "Incoming transfer from ..." entries on the date line are correctly imported. 2. Interest statement (INFORME DE INTERESES): add new document type handler with Spanish IRPF withholding-tax support. Gross amount, net credit, and retained tax are all extracted correctly. 3. Saveback buy order (LIQUIDACIÓN DE VALORES EN SAVEBACK): extend the date-matching patterns in both addBuySellTransaction and addBuySellCryptoTransaction to also recognise the Spanish prefix "Ejecución del Saveback el <date> en …". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gamue
reviewed
Mar 7, 2026
...src/name/abuchen/portfolio/datatransfer/pdf/traderepublic/TradeRepublicPDFExtractorTest.java
Outdated
Show resolved
Hide resolved
...abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/TradeRepublicPDFExtractor.java
Outdated
Show resolved
Hide resolved
- Merge addInterestStatementTransaction_Format04 (Spanish INFORME DE INTERESES) into Format02 by adding the document type and RESUMEN block pattern; the existing oneOf DD.MM.YYYY case already handles the Spanish IBAN line format - Fix assertThat deposit() formatting in testTransaccionesDeCuenta10 to place the first value-check on a new line per project convention Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three broken PDF import cases for Trade Republic Spanish locale documents, reported in #5458.
Spanish deposits (
Transferencia): Account statement entries where the date line containsIncoming transfer from …and the following line saysTransferencia <amount>were not imported. AddedTransferenciaas an alternative toÜberweisungin the deposit section pattern.Interest statement (
INFORME DE INTERESES): No importer existed for the Spanish monthly interest document. Added a newaddInterestStatementTransaction_Format04()handler that extracts gross interest, net credit, and the Spanish IRPF withholding tax (Retención IRPF).Saveback buy order (
LIQUIDACIÓN DE VALORES EN SAVEBACK): The date lineEjecución del Saveback el <date> en Lang und Schwarz Exchange.was not matched. Extended the date-extraction patterns in bothaddBuySellTransactionandaddBuySellCryptoTransactionto recognise this Spanish prefix.Test plan
testTransaccionesDeCuenta10– three deposits, including two with the previously brokenTransferenciaprefix formattestInformeDeIntereses01– interest of 77.42 EUR gross, 14.71 EUR IRPF tax, 62.71 EUR nettestLiquidacionDeValoresSaveback01– Saveback purchase of FTSE All-World USD (Acc), 0.761108 shares, 5.55 EUR, dated 2026-02-02TradeRepublicPDFExtractorTestsuite (260 tests) – no regressions🤖 Generated with Claude Code