ustaxes / UsTaxes

Tax filing web application

Home Page:https://ustaxes.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Form 8960 (net investment income tax) only considers w2 income for inclusion

zakpatterson opened this issue · comments

Form 8960 (net investment income tax) only considers w2 income for inclusion

@ctSkennerton, I'm reworking the logic about when to include forms. Each form has its own inclusion criteria, but that logic is spread out among lots of places.

yeah it's pretty unwieldy. I can think of a couple of things to do:

  1. Make a method on the form class that all schedules need to implement that says whether they should be attached.
  2. or alternatively, Include all forms by default but only print them out if at least one of their fields isn't blank.

It might make sense to do a variation with both actually. That way a form will need to say the conditions for attachment but then there is also a check to make sure we don't attach blank forms at the end. (maybe that could instead be added to the tests to catch any wayward logic in form attachment)

The complication with sniffing for blank form fields is that some of those fields are there for just writing out the tax payer name or SSN so we would need a way of excluding them.

Anyway that's why I put the form interface option first since that should be a more gettable refactor

Working through adding the first option as you suggest, an isNeeded: () => boolean method with default true in the Form superclass.

It's tricky though because in many places we're using something like this.scheduleA !== undefined to test if some computation applies...tracking all that down now.