-
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 1724 NC and NJ to include NRA status in state xml if present on df xml #5486
Merged
tahsinaislam
merged 10 commits into
main
from
FYST-1724-nc-md-include-nra-literal-cd-in-state-xml-if-present-on-df-xml
Jan 30, 2025
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
43e5712
FYST 1724 NC and MD NRA status
tahsinaislam 1c8ca40
Check nra status for mfs for nj nc and md
tahsinaislam 197b2d9
Check nra status for mfs for nj nc and md
tahsinaislam 18ccc62
simplify condition on return header
tahsinaislam 4cf443d
fix mfs condition
tahsinaislam 141c0a5
fix condition to be more consistent:
tahsinaislam 74ef6b1
Fix comment
tahsinaislam 5b4b256
fix conditions
tahsinaislam 185e2aa
Remove ssn for spouse
tahsinaislam 58fb666
Take out condition for MD and add nc persona
tahsinaislam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,15 +43,21 @@ def document | |
xml.DateSigned date_type_for_timezone(@submission.data_source.primary_esigned_at)&.strftime("%F") if @submission.data_source.primary_esigned_yes? | ||
xml.USPhone @submission.data_source.direct_file_data.phone_number if @submission.data_source.direct_file_data.phone_number.present? | ||
end | ||
if @submission.data_source&.spouse&.ssn.present? && @submission.data_source&.spouse&.first_name.present? && [email protected]_status_mfs? | ||
has_nra_spouse = @intake.check_nra_status? && @intake.direct_file_data.non_resident_alien == "NRA" && @intake.filing_status_mfs? | ||
spouse_with_ssn = @submission.data_source.spouse&.ssn.present? && @submission.data_source.spouse&.first_name.present? && [email protected]_status_mfs? | ||
if spouse_with_ssn || has_nra_spouse | ||
xml.Secondary do | ||
xml.TaxpayerName do | ||
xml.FirstName sanitize_for_xml(@submission.data_source.spouse.first_name, 16) if @submission.data_source.spouse.first_name.present? | ||
xml.MiddleInitial sanitize_for_xml(@submission.data_source.spouse.middle_initial, 1) if @submission.data_source.spouse.middle_initial.present? | ||
xml.LastName sanitize_for_xml(@submission.data_source.spouse.last_name, 32) if @submission.data_source.spouse.last_name.present? | ||
xml.NameSuffix @submission.data_source.spouse.suffix.upcase if @submission.data_source.spouse.suffix.present? | ||
end | ||
xml.TaxpayerSSN @submission.data_source.spouse.ssn if @submission.data_source.spouse.ssn.present? | ||
if has_nra_spouse | ||
xml.NRALiteralCd "NRA" | ||
elsif @submission.data_source.spouse&.ssn&.present? | ||
xml.TaxpayerSSN @submission.data_source.spouse.ssn | ||
end | ||
xml.DateOfBirth date_type(@submission.data_source.spouse.birth_date) if @submission.data_source.spouse.birth_date.present? | ||
xml.TaxpayerPIN @submission.data_source.spouse_signature_pin if @submission.data_source.ask_for_signature_pin? && @submission.data_source.ask_spouse_esign? | ||
xml.DateSigned date_type_for_timezone(@submission.data_source.spouse_esigned_at)&.strftime("%F") if @submission.data_source.spouse_esigned_yes? && @submission.data_source.ask_spouse_esign? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
spec/fixtures/state_file/fed_return_jsons/md/drum_nra.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"familyAndHousehold": [], | ||
"filers": [ | ||
{ | ||
"lastName": "Maracas", | ||
"firstName": "Mary", | ||
"middleInitial": null, | ||
"tin": "400-00-7208", | ||
"dateOfBirth": null, | ||
"suffix": null, | ||
"isPrimaryFiler": false, | ||
"ssnNotValidForEmployment": null | ||
}, | ||
{ | ||
"lastName": "Drum", | ||
"firstName": "Dory", | ||
"middleInitial": null, | ||
"tin": "400-00-7207", | ||
"dateOfBirth": "1980-08-10", | ||
"suffix": null, | ||
"isPrimaryFiler": true, | ||
"ssnNotValidForEmployment": null | ||
} | ||
], | ||
"interestReports": [ | ||
{ | ||
"has1099": true, | ||
"taxExemptAndTaxCreditBondCusipNo": null, | ||
"payerTin": null, | ||
"payer": "Drum Corp Investing", | ||
"recipientTin": "400-00-7207", | ||
"taxWithheld": "0.00", | ||
"1099Amount": "10000.00", | ||
"no1099Amount": null | ||
} | ||
] | ||
} | ||
110 changes: 110 additions & 0 deletions
110
spec/fixtures/state_file/fed_return_xmls/md/drum_nra.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Return xmlns="http://www.irs.gov/efile" xmlns:efile="http://www.irs.gov/efile" returnVersion="2024v4.0"> | ||
<ReturnHeader binaryAttachmentCnt="0"> | ||
<TaxYr>2024</TaxYr> | ||
<TaxPeriodBeginDt>2024-01-01</TaxPeriodBeginDt> | ||
<TaxPeriodEndDt>2024-12-31</TaxPeriodEndDt> | ||
<SoftwareVersionNum>676c5f98</SoftwareVersionNum> | ||
<ReturnTypeCd>1040</ReturnTypeCd> | ||
<Filer> | ||
<PrimarySSN>400007207</PrimarySSN> | ||
<SpouseSSN>400007208</SpouseSSN> | ||
<NameLine1Txt>DORY<DRUM</NameLine1Txt> | ||
<PrimaryNameControlTxt>DRUM</PrimaryNameControlTxt> | ||
<SpouseNameControlTxt>MARA</SpouseNameControlTxt> | ||
<USAddress> | ||
<AddressLine1Txt>10 Tambourine Place</AddressLine1Txt> | ||
<CityNm>Brunswick</CityNm> | ||
<StateAbbreviationCd>MD</StateAbbreviationCd> | ||
<ZIPCd>21716</ZIPCd> | ||
</USAddress> | ||
<PhoneNum>3015556666</PhoneNum> | ||
</Filer> | ||
<AdditionalFilerInformation> | ||
<AtSubmissionFilingGrp> | ||
<EmailAddressTxt>[email protected]</EmailAddressTxt> | ||
</AtSubmissionFilingGrp> | ||
</AdditionalFilerInformation> | ||
</ReturnHeader> | ||
<ReturnData documentCnt="3"> | ||
<IRS1040 documentId="IRS10400001"> | ||
<IndividualReturnFilingStatusCd>3</IndividualReturnFilingStatusCd> | ||
<NRALiteralCd>NRA</NRALiteralCd> | ||
<SpouseNm>Mary Maracas</SpouseNm> | ||
<VirtualCurAcquiredDurTYInd>false</VirtualCurAcquiredDurTYInd> | ||
<TotalExemptPrimaryAndSpouseCnt>1</TotalExemptPrimaryAndSpouseCnt> | ||
<ChldWhoLivedWithYouCnt>0</ChldWhoLivedWithYouCnt> | ||
<OtherDependentsListedCnt>0</OtherDependentsListedCnt> | ||
<TotalExemptionsCnt>1</TotalExemptionsCnt> | ||
<WagesAmt referenceDocumentId="W20001" referenceDocumentName="IRSW2">110000</WagesAmt> | ||
<WagesSalariesAndTipsAmt>110000</WagesSalariesAndTipsAmt> | ||
<TaxableInterestAmt referenceDocumentId="IRS1040B001" referenceDocumentName="IRS1040ScheduleB">10000</TaxableInterestAmt> | ||
<TotalIncomeAmt>120000</TotalIncomeAmt> | ||
<AdjustedGrossIncomeAmt>120000</AdjustedGrossIncomeAmt> | ||
<TotalItemizedOrStandardDedAmt>14600</TotalItemizedOrStandardDedAmt> | ||
<TotalDeductionsAmt>14600</TotalDeductionsAmt> | ||
<TaxableIncomeAmt>105400</TaxableIncomeAmt> | ||
<TaxAmt>18339</TaxAmt> | ||
<TotalTaxBeforeCrAndOthTaxesAmt>18339</TotalTaxBeforeCrAndOthTaxesAmt> | ||
<TaxLessCreditsAmt>18339</TaxLessCreditsAmt> | ||
<TotalTaxAmt>18339</TotalTaxAmt> | ||
<FormW2WithheldTaxAmt>10000</FormW2WithheldTaxAmt> | ||
<WithholdingTaxAmt>10000</WithholdingTaxAmt> | ||
<TotalPaymentsAmt>10000</TotalPaymentsAmt> | ||
<OwedAmt>8339</OwedAmt> | ||
<ThirdPartyDesigneeInd>false</ThirdPartyDesigneeInd> | ||
<PrimaryOccupationTxt>Percussionist</PrimaryOccupationTxt> | ||
<RefundProductCd>NO FINANCIAL PRODUCT</RefundProductCd> | ||
</IRS1040> | ||
<IRS1040ScheduleB documentId="IRS1040B001" documentName="IRS1040ScheduleB"> | ||
<Form1040SchBPartIGroup2> | ||
<InterestPayerName> | ||
<BusinessNameLine1Txt>Drum Corp Investing</BusinessNameLine1Txt> | ||
</InterestPayerName> | ||
<InterestAmt>10000</InterestAmt> | ||
</Form1040SchBPartIGroup2> | ||
<InterestSubtotalAmt interestSubtotalLiteralCd="INTEREST SUBTOTAL">10000</InterestSubtotalAmt> | ||
<TaxableInterestSubtotalAmt>10000</TaxableInterestSubtotalAmt> | ||
<CalculatedTotalTaxableIntAmt>10000</CalculatedTotalTaxableIntAmt> | ||
<ForeignAccountsQuestionInd>false</ForeignAccountsQuestionInd> | ||
<ForeignTrustQuestionInd>false</ForeignTrustQuestionInd> | ||
</IRS1040ScheduleB> | ||
<IRSW2 documentId="W20001" documentName="IRSW2"> | ||
<EmployeeSSN>400007207</EmployeeSSN> | ||
<EmployerEIN>018887766</EmployerEIN> | ||
<EmployerNameControlTxt>SNAR</EmployerNameControlTxt> | ||
<EmployerName> | ||
<BusinessNameLine1Txt>Snare Store</BusinessNameLine1Txt> | ||
</EmployerName> | ||
<EmployerUSAddress> | ||
<AddressLine1Txt>1 Timpani Street</AddressLine1Txt> | ||
<CityNm>Brunswick</CityNm> | ||
<StateAbbreviationCd>MD</StateAbbreviationCd> | ||
<ZIPCd>21716</ZIPCd> | ||
</EmployerUSAddress> | ||
<EmployeeNm>Dory Drum</EmployeeNm> | ||
<EmployeeUSAddress> | ||
<AddressLine1Txt>10 Tambourine Place</AddressLine1Txt> | ||
<CityNm>Brunswick</CityNm> | ||
<StateAbbreviationCd>MD</StateAbbreviationCd> | ||
<ZIPCd>21716</ZIPCd> | ||
</EmployeeUSAddress> | ||
<WagesAmt>110000</WagesAmt> | ||
<WithholdingAmt>10000</WithholdingAmt> | ||
<SocialSecurityWagesAmt>110000</SocialSecurityWagesAmt> | ||
<SocialSecurityTaxAmt>8000</SocialSecurityTaxAmt> | ||
<MedicareWagesAndTipsAmt>110000</MedicareWagesAndTipsAmt> | ||
<MedicareTaxWithheldAmt>6000</MedicareTaxWithheldAmt> | ||
<W2StateLocalTaxGrp> | ||
<W2StateTaxGrp> | ||
<StateAbbreviationCd>MD</StateAbbreviationCd> | ||
<EmployerStateIdNum>2224444</EmployerStateIdNum> | ||
<StateWagesAmt>110000</StateWagesAmt> | ||
<StateIncomeTaxAmt>10</StateIncomeTaxAmt> | ||
<W2LocalTaxGrp/> | ||
</W2StateTaxGrp> | ||
</W2StateLocalTaxGrp> | ||
<StandardOrNonStandardCd>S</StandardOrNonStandardCd> | ||
</IRSW2> | ||
</ReturnData> | ||
</Return> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,9 +393,22 @@ | |
|
||
context "AZ intake" do | ||
let(:intake) { create(:state_file_az_intake,) } | ||
let(:submission) { create(:efile_submission, data_source: intake) } | ||
let(:doc) { SubmissionBuilder::ReturnHeader.new(submission).document } | ||
it "does not include disaster relief xml" do | ||
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 test was not properly testing the xml itself before. Its unrelated to the story |
||
expect(doc.at('DisasterReliefTxt')).not_to be_present | ||
end | ||
end | ||
end | ||
|
||
context "filer with MFS status NRA spouse if condition is to be checked" do | ||
let(:intake) { create(:state_file_md_intake, :mfs_with_nra_spouse) } | ||
let(:submission) { create(:efile_submission, data_source: intake) } | ||
let(:doc) { SubmissionBuilder::ReturnHeader.new(submission).document } | ||
|
||
it "it does not fill out spouse ssn and fills in NRALiteralCd" do | ||
expect(doc.at('Filer Secondary TaxpayerSSN')).not_to be_present | ||
expect(doc.at('Filer Secondary NRALiteralCd').content).to eq "NRA" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this persona was added after a conversation with tiffany to test on demo