Repository navigation
fix(i18n): say what monodivisa really does, it drops every currency conversion - #433
Merged
Merged
Conversation
Monodivisa switches off the whole FX engine, so it computes no currency result at all, not even for the taxpayer's own USD->EUR conversions or broker auto-conversions. It only matches those tools in how shares are valued (buy at the buy-date rate, sale at the sale-date rate). Say exactly that in the profile detail, the Renta Web closing tip, the competitor-reconciliation hint (5 locales and the engine fallback), the CLI help and the code/test comments, and point users who convert currency to the default mode. No figure changes. Refs #230
With monodivisa on, every currency conversion in the file (manual CASH trades like EUR.USD, IBKR AFx/FXCONV auto-conversions) was dropped with no message at all. Now the report adds one info message with the number of this year's conversions that were not computed, and says the default mode computes them. The count mirrors extractFxEvents: non-EUR CASH trades, minus AFx/FXCONV rows when the user also opted out of auto-conversions. Localized in all 5 locales. No figure changes. Refs #230
#252 rewrote guide_rw.fx_note because the old text said FX results only appear on manual currency trades, which is false since broker auto-conversions (#239) and stock round-trips (#230) are processed. #265 integrated a fork branch whose stale base put the old text back (the same rebase dropped other keys that #265 restored by hand; this one was missed). Restore the #252 text in all 5 locales; it still matches what the engine does.
- V2324-10 is about investment funds in foreign currency (cost at the subscription-date rate, proceeds at the reimbursement-date rate). It does not set a FIFO rule for currency, nor a "symmetry" between the stock-buy and stock-sell FX producers. Drop it from those engine comments and from docs/casillas.md, and cite V2422-20 (the worked example the default mode reproduces) in the monodivisa warning, all 5 locales. - V0583-16 is a corporate restructuring answer and says nothing about exchange rates. The ECB rate is the official rate by Ley 46/1998 art. 36; income is valued at the rate when it becomes payable (V1024-11 dividends, V0463-21 interest). Fix ecb.ts and the docs. - CLAUDE.md: monodivisa matches other tools only in share valuation and computes no currency result; FX is Art. 33.1 with timing Art. 14.2.e, not Art. 37.1.l; FIFO on currency is an inference, not a consulta. Comments, docs and UI text only. No logic changes. Refs #230
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
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. |
… note The engine realizes a USD->GBP conversion as a disposal, so the guide no longer says the difference waits for a conversion to euros. The docs now say the real EUR amount values a conversion when the statement has it, and keep the report's payment-date rate apart from the DGT's exigibility rule. The notice test uses a count that cannot match 1633/1637.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #433 +/- ##
=======================================
Coverage 93.07% 93.07%
=======================================
Files 63 63
Lines 6840 6849 +9
Branches 2337 2343 +6
=======================================
+ Hits 6366 6375 +9
Misses 391 391
Partials 83 83
🚀 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.
Problem
The monodivisa toggle said it was «compatible con el enfoque de Autodeclaro, Taxdown…». That overstates it. Monodivisa switches off the whole FX engine. It computes no currency result at all, not even for the taxpayer's own USD→EUR conversions or broker auto-conversions. It matches those tools only in how it values shares: buy at the buy-date rate, sale at the sale-date rate. Autodeclaro also documents a «Cash (Forex)» section for currency sales. Users who convert dollars got 0 in 1633/1637 with no hint why.
Several DGT citations were also wrong. V2324-10 (investment funds) was cited for a currency FIFO and "symmetric" rule. V0583-16 (a corporate restructuring) was cited for the ECB rate. Art. 37.1.l was cited for FX instead of Art. 33.1 with timing Art. 14.2.e.
Fix
report.monodivisa_conversions_skipped: when monodivisa is on, it says how many conversions of the year it left out.guide_rw.fx_noteis restored. feat: manual opening lots for transferred positions (integrates #262) #265 reverted the feat(report): add FX method-consistency and deferred-conversion notes #252 text by accident, through a stale base.No computed figure changes. The only test lines that changed are one text assertion and two comments.
Tests
9 new tests: the notice (count, opt-out, monodivisa off, no conversions) and the localized texts. Each was proven to go red. Full suite: 2635 passed. Lint and typecheck are clean.
Refs #230, #242