-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: main
Are you sure you want to change the base?
Changes from all commits
c8fbe6c
cec6c16
bcd3cd5
1619511
08ce110
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,7 @@ class DirectFileData < DfXmlAccessor | |
spouse_name: 'IRS1040 SpouseNm', | ||
non_resident_alien: 'IRS1040 NRALiteralCd', | ||
interest_reported_amount: 'IRS1040 InterestReported', # fake | ||
qualifying_children_under_age_ssn_count: 'IRS1040Schedule8812 QlfyChildUnderAgeSSNCnt' | ||
}.freeze | ||
|
||
def initialize(raw_xml) | ||
|
@@ -609,6 +610,10 @@ def interest_reported_amount=(value) | |
write_df_xml_value(__method__, value) | ||
end | ||
|
||
def qualifying_children_under_age_ssn_count=(value) | ||
write_df_xml_value(__method__, value) | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
def w2_nodes | ||
parsed_xml.css('IRSW2') | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,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') } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was just typo in the past? |
||
end | ||
|
||
trait :married_filing_separately do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,84 @@ | |
) | ||
end | ||
|
||
describe "Line 10b: Child Deduction" do | ||
[ | ||
[["single", "married_filing_separately"], [ | ||
[20_000, 6000], | ||
[30_000, 5000], | ||
[40_000, 4000], | ||
[50_000, 3000], | ||
[60_000, 2000], | ||
[70_000, 1000], | ||
[70_001, 0], | ||
]], | ||
[["head_of_household"], [ | ||
[30_000, 6000], | ||
[45_000, 5000], | ||
[60_000, 4000], | ||
[75_000, 3000], | ||
[90_000, 2000], | ||
[105_000, 1000], | ||
[105_001, 0] | ||
]], | ||
[["married_filing_jointly", "qualifying_widow"], [ | ||
[40_000, 6000], | ||
[60_000, 5000], | ||
[80_000, 4000], | ||
[100_000, 3000], | ||
[120_000, 2000], | ||
[140_000, 1000], | ||
[140_001, 0] | ||
]] | ||
].each do |filing_statuses, agis_to_deductions| | ||
filing_statuses.each do |filing_status| | ||
context "#{filing_status}" do | ||
let(:intake) { create(:state_file_nc_intake, filing_status: filing_status, raw_direct_file_data: StateFile::XmlReturnSampleService.new.read("nc_shiloh_hoh")) } | ||
let(:calculator_instance) { described_class.new(year: MultiTenantService.statefile.current_tax_year, intake: intake) } | ||
|
||
agis_to_deductions.each do |fagi, deduction_amount| | ||
it "returns the value corresponding to #{fagi} FAGI multiplied by number of QCs" do | ||
intake.direct_file_data.fed_agi = fagi | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Dust] can we rename the |
||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
describe "Line 11: Standard Deduction" do | ||
[ | ||
["head_of_household", 19125], | ||
["married_filing_jointly", 25500], | ||
["married_filing_separately", 12750], | ||
["qualifying_widow", 25500], | ||
["single", 12750], | ||
].each do |filing_status, deduction_amount| | ||
context "#{filing_status} filer" do | ||
let(:intake) { create :state_file_nc_intake, filing_status: filing_status } | ||
|
||
it "returns the correct value" do | ||
instance.calculate | ||
expect(instance.lines[:NCD400_LINE_11].value).to eq(deduction_amount) | ||
end | ||
end | ||
end | ||
end | ||
|
||
describe "Line 12a: NCAGIAddition" do | ||
it "sums lines 10b and 11 (9 is blank)" do | ||
allow(instance).to receive(:calculate_line_10b).and_return 10 | ||
allow(instance).to receive(:calculate_line_11).and_return 10 | ||
|
||
instance.calculate | ||
expect(instance.lines[:NCD400_LINE_12A].value).to eq 20 | ||
end | ||
end | ||
|
||
describe "Line 20a: North Carolina Income Tax Withheld" do | ||
let(:intake) { create(:state_file_nc_intake, :df_data_2_w2s) } | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is line 9 blank? I see some notes from the jira story and looks like it wasn't included in the story but not sure what you're looking at to see that it was not included.