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-1865] add 1099_int to md and az #5698

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def supported_documents
supported_docs += combined_w2s
supported_docs += form1099rs
supported_docs += form1099gs
supported_docs += form1099ints
supported_docs
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def supported_documents
supported_docs += form1099gs # must be sequenced here
supported_docs += combined_w2s
supported_docs += form1099rs
supported_docs += form1099ints
supported_docs
end

Expand Down
15 changes: 15 additions & 0 deletions spec/lib/submission_builder/ty2022/states/az/az_return_xml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,21 @@
end
end

context "when there are 1099_ints present" do
let(:intake) { create(:state_file_az_intake, :df_data_1099_int) }

it "generates XML with 1099_int info" do
expect(xml.css('State1099Int').count).to eq 1
expect(xml.at('State1099Int PayerName BusinessNameLine1Txt').text).to eq 'Mockingbird Bank'
expect(xml.at('State1099Int RecipientSSN').text).to eq '900500011'
expect(xml.at('State1099Int RecipientName').text).to eq 'Ariz Onian'
expect(xml.at('State1099Int InterestIncome').text).to eq '4000.0'
expect(xml.at('State1099Int InterestOnBondsAndTreasury').text).to eq '0'
expect(xml.at('State1099Int FederalTaxWithheld').text).to eq '0.0'
expect(xml.at('State1099Int TaxExemptInterest').text).to eq '0'
end
end

context "subtractions" do
let(:intake) { create(:state_file_az_intake, :df_data_1099_int) }

Expand Down
18 changes: 18 additions & 0 deletions spec/lib/submission_builder/ty2024/states/md/md_return_xml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@
allow(instance).to receive(:form_has_non_zero_amounts) # allows mocking of specific arguments when the file calls with multiple combinations of args
end

context "when there are 1099_ints present" do
let(:intake) { create(:state_file_md_intake, :df_data_1099_int) }

it "generates XML with 1099_int info" do
expect(xml.css('State1099Int').count).to eq 1
expect(xml.at('State1099Int PayerName BusinessNameLine1Txt').text).to eq 'The payer name'
expect(xml.at('State1099Int PayerName')['payerNameControl']).to eq 'THEP'
expect(xml.at('State1099Int PayerEIN').text).to eq '101234567'
expect(xml.at('State1099Int RecipientSSN').text).to eq '123456789'
expect(xml.at('State1099Int RecipientName').text).to eq 'Mary A Lando'
expect(xml.at('State1099Int InterestIncome').text).to eq '1.0'
expect(xml.at('State1099Int InterestOnBondsAndTreasury').text).to eq '2.0'
expect(xml.at('State1099Int FederalTaxWithheld').text).to eq '5.0'
expect(xml.at('State1099Int TaxExemptInterest').text).to eq '4.0'
expect(xml.at('State1099Int TaxExemptCUSIP').text).to eq '123456789'
end
end

it "includes documents that are always attached" do
expect(xml.document.at('ReturnDataState Form502')).to be_an_instance_of Nokogiri::XML::Element
expect(instance.pdf_documents).to be_any { |included_documents|
Expand Down
Loading