Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified ira form #903

Merged
merged 13 commits into from
Mar 3, 2022
Merged

Unified ira form #903

merged 13 commits into from
Mar 3, 2022

Conversation

ctSkennerton
Copy link
Contributor

While attempting to implement the IRA tax deduction I realised that IRA contributions were not being captured anywhere. This change creates a new UI page for IRAs that lets a user input both contributions and distributions from an account.

A couple of things that I'd like feedback on:

  • I moved the IRA information under their own key in the Information object. Is this the right approach? I could also see creating an umbrella key like "savingsAccounts" and have IRAs and HSAs underneath that. Something like this:
    Information: {
        savingsAccounts: {
            hsas: [],
            iras: []
    }
    
  • Previously only IRA distributions were captured under the f1099s in Information. How should the older data be migrated?

What kind of change does this PR introduce?

  • Feature

While attempting to implement the IRA tax deduction I realised that
IRA contributions were not being captured anywhere. This change
creates a new UI page for IRAs that lets a user input both contributions
and distributions from an account.
@zakpatterson
Copy link
Collaborator

zakpatterson commented Feb 8, 2022

So an IRA could produce a 5498 (for contributions) and a 1099-R (for distributions), right? In one year someone could receive either a 5498 or a 1099-R or both for the same retirement account?

Is there something special about health savings accounts that is not present on 1099-SA?

At this point we're looking to support 1099-{B, INT, DIV, SSA, SA, R}. So it seems to me that all of these 1099s could be treated similar to each other in the webforms, and they could all be siblings of each other in the Information data structure.

I think as much as possible there should be a one-to-one correspondence between the tax forms the user receives and the webforms. We should maintain as much as possible a simple pipeline from TaxForm -> WebForm -> Information state object -> Return form classes -> PDFs so that we only have to conceptualize two adjacent segments of that pipeline at a time.

An IRA / HSA is otherwise no different from a brokerage account. Instead of modeling Information based on what accounts the user actually has, we're presently modeling it based on what 1099s/W2s the user actually receives. This is more complicated by the unreported 8949 income, where we do have a reason to track assets from year to year since we might get data about assets that have not been sold in the current tax year.

But I think in general the information object should mirror the tax forms (or transaction reports) that a user could have for a given tax year, with as little interpretation as possible. All the interpretation should happen in the return form classes step.

@ctSkennerton
Copy link
Contributor Author

So an IRA could produce a 5498 (for contributions) and a 1099-R (for distributions), right? In one year someone could receive either a 5498 or a 1099-R or both for the same retirement account?

correct

Is there something special about health savings accounts that is not present on 1099-SA?

The coverage type and the dates that you have the coverage are not given on the forms. I made HSA into a single web form since there were some complicated rules around which HSA accounts get counted for a person and how to calculate the maximum contributions based on those two pieces of info. To model that as a separate 1099-SA and 5498-SA would require users to potentially match up those two webforms based on a shared key (like account name) and duplicate the date info.

My reasoning to extend that to IRAs follows the same logic. However, I do see that there is less complicated logic around IRAs, so I could instead create a 5498 webform.

Copy link
Collaborator

@zakpatterson zakpatterson left a comment

Choose a reason for hiding this comment

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

know you're still working on this, just drawing a few things to your attention.

src/core/data/index.ts Outdated Show resolved Hide resolved
src/core/tests/arbitraries.ts Show resolved Hide resolved
src/components/savingsAccounts/IRA.tsx Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #903 (42c0471) into master (a42107b) will decrease coverage by 1.02%.
The diff coverage is 41.42%.

❗ Current head 42c0471 differs from pull request most recent head de351ab. Consider uploading reports for the commit de351ab to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #903      +/-   ##
==========================================
- Coverage   53.46%   52.44%   -1.03%     
==========================================
  Files         216      217       +1     
  Lines        9864     9927      +63     
  Branches     1365     1369       +4     
==========================================
- Hits         5274     5206      -68     
- Misses       4576     4707     +131     
  Partials       14       14              
Impacted Files Coverage Δ
src/components/Menu.tsx 93.33% <ø> (ø)
src/components/income/F1099Info.tsx 56.81% <ø> (+0.63%) ⬆️
...mponents/savingsAccounts/healthSavingsAccounts.tsx 9.67% <ø> (ø)
src/data/urls.ts 100.00% <ø> (ø)
src/redux/data.ts 100.00% <ø> (ø)
src/redux/reducer.ts 40.00% <0.00%> (-2.67%) ⬇️
src/components/savingsAccounts/IRA.tsx 8.82% <8.82%> (ø)
src/core/data/index.ts 100.00% <100.00%> (ø)
src/core/data/methods.ts 88.88% <100.00%> (+0.31%) ⬆️
src/core/data/validate.ts 100.00% <100.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a42107b...de351ab. Read the comment docs.

@ctSkennerton ctSkennerton marked this pull request as ready for review February 27, 2022 09:20
@ctSkennerton
Copy link
Contributor Author

thank you both for looking over this! Since this modifies the Information object, how do data migrations work?

# Conflicts:
#	src/core/data/methods.ts
#	src/redux/data.ts
@zakpatterson
Copy link
Collaborator

Fixed up merge conflicts. I'm just looking at this part:

image

I thought that the 1099 page would handle 1099-R for employer pension plans, where the taxpayer doesn't have an associated retirement account. What is the difference between a 401(k) and an IRA from our point of view here? Don't they both involve contributions and distributions?

@zakpatterson
Copy link
Collaborator

thank you both for looking over this! Since this modifies the Information object, how do data migrations work?

I think the existing migration here will be enough. Basically that function ensures that all fields are present for every tax year, and then plays existing keys from localstorage on top. So the migration will take the valid, blank state which will contain your individualRetirementAccounts key, then load localStorage on top of that.

I think as long as we're just adding keys to Information we don't have to do anything, but if we ever want to move keys around we'll have more work to do

@ctSkennerton
Copy link
Contributor Author

I thought that the 1099 page would handle 1099-R for employer pension plans, where the taxpayer doesn't have an associated retirement account. What is the difference between a 401(k) and an IRA from our point of view here? Don't they both involve contributions and distributions?

From looking at the 1040 things are broken down by account type. 401(k), 403(b), and annuities are in one box and then the various flavors of IRA in another box. Other forms like IRA deduction care about the type of IRA. I haven't seen anything that changes based on whether the IRA is an employer pension plan. From that perspective 401(k) is the employer pension plan that is being left on the 1099-R form. IRAs have form 5498 to track the contributions but I don't think there is a corresponding form for a 401(k)

@zakpatterson
Copy link
Collaborator

IRAs have form 5498 to track the contributions but I don't think there is a corresponding form for a 401(k)

Yep that makes sense. Ok!

Copy link
Collaborator

@thegrims thegrims left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution!

@thegrims thegrims merged commit 77d425c into ustaxes:master Mar 3, 2022
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.

None yet

3 participants