Skip to content

fix(ui): correct FX casilla numbers to match Renta Web 2025#178

Merged
GeiserX merged 1 commit into
mainfrom
fix/fx-casilla-numbers
May 26, 2026
Merged

fix(ui): correct FX casilla numbers to match Renta Web 2025#178
GeiserX merged 1 commit into
mainfrom
fix/fx-casilla-numbers

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented May 26, 2026

Summary

  • Renta Web 2025 uses casillas 1633/1637 for FX transmission/acquisition values
  • We were incorrectly showing 1626/1631, which actually conflict with Renta Web's date fields (1631=fecha transmisión, 1632=fecha adquisición)
  • Updated all references across types, generators, CLI, web UI, i18n (5 locales), and docs

Test plan

  • All 1046 tests pass
  • TypeScript clean
  • grep confirms zero remaining references to old casilla numbers
  • Verified against real Renta Web 2025 screenshots from user filing

Summary by CodeRabbit

  • Bug Fixes
    • Updated foreign exchange gains/losses to report against Modelo 100 casillas 1633 and 1637 (transmission and acquisition) instead of 1626 and 1631 across all CSV and PDF reports, web documentation, and user-facing text in English, Spanish, Catalan, Basque, and Galician.

Review Change Stack

Renta Web uses 1633/1637 for FX transmission/acquisition values,
not 1626/1631. The old numbers conflicted with Renta Web's date
fields (1631=fecha transmisión, 1632=fecha adquisición).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 72e13b6c-46d2-49c0-bfde-bcbda243b1da

📥 Commits

Reviewing files that changed from the base of the PR and between b71f674 and 6a7ad76.

📒 Files selected for processing (11)
  • src/cli/index.ts
  • src/generators/csv.ts
  • src/generators/pdf-web.ts
  • src/i18n/locales/ca.ts
  • src/i18n/locales/en.ts
  • src/i18n/locales/es.ts
  • src/i18n/locales/eu.ts
  • src/i18n/locales/gl.ts
  • src/types/tax.ts
  • src/web/casilla-detail.ts
  • src/web/docs.html

📝 Walkthrough

Walkthrough

Updated FX gains/losses casilla references from 1626/1631 to 1633/1637 across CLI output, report generation (CSV, PDF), web casilla configuration, type documentation, static HTML docs, and all localization strings.

Changes

FX casilla mapping update

Layer / File(s) Summary
Report output generation and casilla mapping
src/cli/index.ts, src/generators/csv.ts, src/generators/pdf-web.ts, src/web/casilla-detail.ts
CLI report formatting (formatReport, printSummary), CSV summary rows, PDF web report casillas table, and CASILLAS configuration now output FX transmission and acquisition values using casillas 1633 and 1637 instead of 1626 and 1631.
Type documentation and static docs
src/types/tax.ts, src/web/docs.html
TaxSummary type documentation for fxGains and Forex FIFO engine HTML documentation updated to reference new FX casilla codes in comments and user-facing text.
Localization updates
src/i18n/locales/{ca,en,es,eu,gl}.ts
All language locale files updated: profile.monodivisa_detail translation strings now reference casillas 1633/1637 instead of 1626/1631 for FX gain/loss simplified mode explanation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • GeiserX/DeclaRenta#169: Both PRs adjust/describe the Modelo 100 FX-gains/loss casilla numbers tied to monodivisa (single-currency EUR) mode—main PR updates mappings from 1626/1631 to 1633/1637, while retrieved PR introduces the monodivisa mode with original casilla references.
  • GeiserX/DeclaRenta#150: Both PRs update the Modelo 100 casillas rendering in src/generators/pdf-web.ts, with this PR specifically migrating FX gain/loss casilla codes to 1633/1637.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title clearly and concisely summarizes the main change: correcting FX casilla numbers (1626/1631 → 1633/1637) to align with Renta Web 2025.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fx-casilla-numbers

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.57%. Comparing base (7114e5e) to head (6a7ad76).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/generators/pdf-web.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #178   +/-   ##
=======================================
  Coverage   97.57%   97.57%           
=======================================
  Files          38       38           
  Lines        7780     7780           
  Branches     1596     1596           
=======================================
  Hits         7591     7591           
  Misses        188      188           
  Partials        1        1           
Files with missing lines Coverage Δ
src/generators/csv.ts 80.64% <100.00%> (ø)
src/i18n/locales/ca.ts 100.00% <100.00%> (ø)
src/i18n/locales/en.ts 100.00% <100.00%> (ø)
src/i18n/locales/es.ts 100.00% <100.00%> (ø)
src/i18n/locales/eu.ts 100.00% <100.00%> (ø)
src/i18n/locales/gl.ts 100.00% <100.00%> (ø)
src/generators/pdf-web.ts 97.76% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX GeiserX merged commit e57be48 into main May 26, 2026
4 of 5 checks passed
@GeiserX GeiserX deleted the fix/fx-casilla-numbers branch May 26, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant