From 9c283205f69df3a7ac9770b4d568ee95b525ddae Mon Sep 17 00:00:00 2001 From: Drew Proebstel Date: Thu, 6 Mar 2025 16:02:04 -0800 Subject: [PATCH] add 1099_int to md and az --- .../ty2022/states/az/az_return_xml.rb | 1 + .../ty2024/states/md/md_return_xml.rb | 1 + .../ty2022/states/az/az_return_xml_spec.rb | 15 +++++++++++++++ .../ty2024/states/md/md_return_xml_spec.rb | 18 ++++++++++++++++++ 4 files changed, 35 insertions(+) diff --git a/app/lib/submission_builder/ty2022/states/az/az_return_xml.rb b/app/lib/submission_builder/ty2022/states/az/az_return_xml.rb index 6032cba8da..12d9f649aa 100644 --- a/app/lib/submission_builder/ty2022/states/az/az_return_xml.rb +++ b/app/lib/submission_builder/ty2022/states/az/az_return_xml.rb @@ -223,6 +223,7 @@ def supported_documents supported_docs += combined_w2s supported_docs += form1099rs supported_docs += form1099gs + supported_docs += form1099ints supported_docs end diff --git a/app/lib/submission_builder/ty2024/states/md/md_return_xml.rb b/app/lib/submission_builder/ty2024/states/md/md_return_xml.rb index 0913958d74..df8a722417 100644 --- a/app/lib/submission_builder/ty2024/states/md/md_return_xml.rb +++ b/app/lib/submission_builder/ty2024/states/md/md_return_xml.rb @@ -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 diff --git a/spec/lib/submission_builder/ty2022/states/az/az_return_xml_spec.rb b/spec/lib/submission_builder/ty2022/states/az/az_return_xml_spec.rb index dbc5cb35d0..f3cb4ef27c 100644 --- a/spec/lib/submission_builder/ty2022/states/az/az_return_xml_spec.rb +++ b/spec/lib/submission_builder/ty2022/states/az/az_return_xml_spec.rb @@ -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) } diff --git a/spec/lib/submission_builder/ty2024/states/md/md_return_xml_spec.rb b/spec/lib/submission_builder/ty2024/states/md/md_return_xml_spec.rb index 897e75eee7..4157400e74 100644 --- a/spec/lib/submission_builder/ty2024/states/md/md_return_xml_spec.rb +++ b/spec/lib/submission_builder/ty2024/states/md/md_return_xml_spec.rb @@ -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|