Repository navigation
fix(trade-republic): declare foreign dividends at the euros TR credits, as the DGT allows (#476) - #477
Merged
Conversation
…s, as the DGT allows for income paid already converted (#476)
Contributor
|
Caution Review failedThe pull request is closed. Walkthrough
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #477 +/- ##
=======================================
Coverage 95.52% 95.52%
=======================================
Files 66 66
Lines 11165 11169 +4
Branches 4257 4261 +4
=======================================
+ Hits 10665 10669 +4
Misses 402 402
Partials 98 98
🚀 New features to boost your workflow:
|
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.
Trade Republic credits foreign dividends already converted to euros. Box 0029 still took
original_amount× the ECB rate, while 0588 took TR's own euro withholding. The two boxes used different bases, and neither matched the user's statement.DGT consulta V5732-26 (2 October 2026) covers this case. A dividend paid already converted into euros, because the taxpayer has no account in that currency, needs no official rate: you declare the euros. A converted TR dividend is now booked at the gross EUR
amount(original_amount × fx_rate). The net credit (amount + tax) is never used. The ECB rate onoriginal_amountstays only as the fallback whenamountis empty, unreadable or 0.In real exports TR's
fx_rateis the ECB rate of the business day before payment, with no margin. So the change is one day of EUR/USD movement, in either direction.Not done here: after the move to the Spanish branch, the
taxcell may hold the Spanish 19% next to the foreign withholding, which would belong in 0596. We have no real row to confirm it, and #476 asks the reporter for one.Tests: the full suite passes (7243). With the old parser, the two new assertions fail. CLAUDE.md, docs/casillas.md and docs/brokers.md carry the rule.
Fixes #476
Summary by CodeRabbit
Bug Fixes
Documentation