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 462 implement some form d-400 ctc lines for both pdf and xml #4784

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jenny-heath
Copy link
Contributor

Link to pivotal/JIRA issue

Is PM acceptance required? (delete one)

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

What was done?

  • Adds some lines to the calculator, xml, and pdf for form d-400
  • If you want to review by commit, I basically kept everything for each line in one commit (with the exception of the last one where I added stuff to line_data.yml because I had forgotten about it

How to test?

  • Calculator tests actual different tax cases
  • Xml tests for presence of node, mocking calc method
  • Pdf tests for filled in field

Copy link

Heroku app: https://gyr-review-app-4784-42cd867b2553.herokuapp.com/
View logs: heroku logs --app gyr-review-app-4784 (optionally add --tail)

@@ -54,7 +54,8 @@ def hash_for_pdf
y_d400wf_li20a_pg2_good: @xml_document.at('IncTaxWith')&.text,
y_d400wf_li20b_pg2_good: @xml_document.at('IncTaxWithSpouse')&.text,
y_d400wf_li23_pg2_good: @xml_document.at('NCTaxPaid')&.text,
y_d400wf_li25_pg2_good: @xml_document.at('RemainingPayment')&.text
y_d400wf_li25_pg2_good: @xml_document.at('RemainingPayment')&.text,
y_d400wf_li10a_good: @xml_document.at('NumChildrenAllowed')&.text
Copy link
Contributor

@arinchoi03 arinchoi03 Sep 20, 2024

Choose a reason for hiding this comment

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

why are all these suffixed with _good? These are the selectors on the pdf that was provided to us?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it is provided to us and therefore i have no idea why _good 😅

Copy link
Contributor

@arinchoi03 arinchoi03 left a comment

Choose a reason for hiding this comment

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

Looks good so far, thank you for breaking out the features into discrete commits, this will be a helpful resource when I ever get to this type of work!

def qualifying_children_under_age_ssn_count=(value)
write_df_xml_value(__method__, value)
end

Copy link
Contributor

Choose a reason for hiding this comment

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

how do you decide when to create a writer for a given field?

@@ -112,7 +112,7 @@
end

trait :head_of_household do
raw_direct_file_data { StateFile::XmlReturnSampleService.new.read('shiloh_mfs') }
raw_direct_file_data { StateFile::XmlReturnSampleService.new.read('shiloh_hoh') }
Copy link
Contributor

Choose a reason for hiding this comment

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

this was just typo in the past?

intake.direct_file_data.qualifying_children_under_age_ssn_count = 2

calculator_instance.calculate
expect(calculator_instance.lines[:NCD400_LINE_10B].value).to eq(deduction_amount)
Copy link
Contributor

Choose a reason for hiding this comment

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

[Dust] can we rename the deduction_amount to deduction_amt_for_two_children to be more explicit about the amount -- I was initially confused that there wasn't x 2 math going on but realized you had doubled the deduction amounts.


def calculate_line_12a
# Add Lines 9, 10b, and 11
# line 9 DeductionsFromFAGI is blank
Copy link
Contributor

Choose a reason for hiding this comment

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

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