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

Fyst 823 income documents ID state tax withheld #4933

Merged
merged 11 commits into from
Nov 1, 2024

Conversation

arinchoi03
Copy link
Contributor

@arinchoi03 arinchoi03 commented Oct 30, 2024

Link to pivotal/JIRA issue

Is PM acceptance required? (delete one)

  • Yes - don't merge until JIRA issue is accepted!

Reminder: merge main into this branch and get green tests before merging to main

What was done?

  • Exact same calculation as was done in calculate_line_53 method in az_calculator.rb
  • Porting those values into the respective XML & PDF

How to test?

  • Describe the testing approach taken to verify the changes, including:

    • Unit/integration/manual tests
    • Test data used: Miranda 1099R since that one has W2 & 1099R. Miranda has two W-2s with state tax withheld amount (507, 1502) and two 1099Rs with no state tax withheld
    • I tweaked things in unit tests so that we had 1099G / 1099R state withheld amounts
  • Risk Assessment

    • Noticed that miranda_1099R had errors on XML output
      1. firstName was missing for filer: synchronize_filers_to_database had not run b/c synchronize_w2s_to_database step that comes before had silently failed due to validation on employer_state_id_num field requiring no dashes. Fixed here
      1. 1099R was not an expected field: ID/NC does not expect 1099R (or any other income documents) in XML. Removed here
Screenshot 2024-10-30 at 2 24 47 PM - Please check that Personas with 1099Rs/1099Gs/W2s for NC/ID output XMLs without errors

Screenshots (for visual changes)

Screenshot 2024-10-30 at 3 14 13 PM Screenshot 2024-10-30 at 3 14 37 PM Screenshot 2024-10-30 at 3 14 51 PM

Copy link

Heroku app: https://gyr-review-app-4933-5563e432acb5.herokuapp.com/
View logs: heroku logs --app gyr-review-app-4933 (optionally add --tail)

@arinchoi03 arinchoi03 changed the title Fyst 823 income documents i da state tax withheld Fyst 823 income documents ID state tax withheld Oct 30, 2024
@@ -153,7 +153,7 @@
<W2StateLocalTaxGrp>
<W2StateTaxGrp>
<StateAbbreviationCd>ID</StateAbbreviationCd>
<EmployerStateIdNum>00-0000005</EmployerStateIdNum>
<EmployerStateIdNum>000000005</EmployerStateIdNum>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

w2 sync was failing for this fixture b/c - was included and w2 employer_ein was failing validation

validates :employer_state_id_num, format: { with: /\A(\d{0,17})\z/, message: ->(_object, _data) { I18n.t('state_file.questions.w2.edit.employer_state_id_error') } }

@@ -124,7 +124,7 @@ def synchronize_df_w2s_to_database
employer_name: direct_file_w2.EmployerName,
employee_name: direct_file_w2.EmployeeNm,
employee_ssn: direct_file_w2.EmployeeSSN,
employer_state_id_num: direct_file_w2.EmployerStateIdNum,
employer_state_id_num: direct_file_w2.EmployerStateIdNum&.delete('-'),
Copy link
Contributor Author

@arinchoi03 arinchoi03 Oct 30, 2024

Choose a reason for hiding this comment

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

miranda_1099r fixture has a dash in the EmployerStateIdNum. According to schema i think this is a valid character. However, since we validate this field (employer_state_id_num) on save to the database, we should remove any hyphens/dashes.

added a computer gardening seed if we should fail more loudly at Data transfer if errors raise (on non-prod environments; so that we can tell if a fixture has an issue sync'ing)

@@ -52,8 +52,6 @@ def supported_documents
}
end

supported_docs += form1099rs
supported_docs += form1099gs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

noticed while looking at id xml output that we were seeing errors for form1099r
Screenshot 2024-10-30 at 2 24 47 PM

Turns out ID / NC does not want income document xml, so removing them here

@arinchoi03 arinchoi03 merged commit 36b71a3 into main Nov 1, 2024
7 checks passed
@arinchoi03 arinchoi03 deleted the FYST-823-income-documents-i-da-state-tax-withheld branch November 1, 2024 19:39
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.

2 participants