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

Nj 105 tax exempt interest income #4934

Merged
merged 2 commits into from
Oct 31, 2024
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
2 changes: 2 additions & 0 deletions app/lib/efile/line_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ NJ1040_LINE_15:
label: '15 Wages, salaries, tips, and other employee compensation (State wages from Box 16 of enclosed W-2(s))'
NJ1040_LINE_16A:
label: 'Taxable interest income (Enclose federal Schedule B if over $1,500) (See instructions)'
NJ1040_LINE_16B:
label: 'Tax-exempt interest income (Enclose schedule) (See instructions) Do not include on line 16a'
NJ1040_LINE_27:
label: '27 Total Income (Add lines 15, 16a, and 20a)'
NJ1040_LINE_29:
Expand Down
22 changes: 17 additions & 5 deletions app/lib/efile/nj/nj1040_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def calculate
set_line(:NJ1040_LINE_13, :calculate_line_13)
set_line(:NJ1040_LINE_15, :calculate_line_15)
set_line(:NJ1040_LINE_16A, :calculate_line_16a)
set_line(:NJ1040_LINE_16B, :calculate_line_16b)
set_line(:NJ1040_LINE_27, :calculate_line_27)
set_line(:NJ1040_LINE_29, :calculate_line_29)
set_line(:NJ1040_LINE_31, :calculate_line_31)
Expand Down Expand Up @@ -139,6 +140,10 @@ def calculate_use_tax(nj_gross_income)
end
end

def calculate_tax_exempt_interest_income
@intake.direct_file_data.fed_tax_exempt_interest + interest_on_gov_bonds
end

private

def line_6_spouse_checkbox
Expand Down Expand Up @@ -190,11 +195,12 @@ def calculate_line_15
end

def calculate_line_16a
interest_reports = @intake.direct_file_json_data.interest_reports
interest_on_gov_bonds = interest_reports&.map(&:interest_on_government_bonds)
interest_sum = interest_on_gov_bonds.sum
return nil unless interest_sum.positive?
(@intake.direct_file_data.fed_taxable_income - interest_sum).round
return nil unless interest_on_gov_bonds.positive?
@intake.direct_file_data.fed_taxable_income - interest_on_gov_bonds
end

def calculate_line_16b
calculate_tax_exempt_interest_income if calculate_tax_exempt_interest_income.positive?
end

def calculate_line_27
Expand Down Expand Up @@ -330,6 +336,12 @@ def number_of_true_checkboxes(checkbox_array_for_line)
checkbox_array_for_line.sum { |a| a == true ? 1 : 0 }
end

def interest_on_gov_bonds
interest_reports = @intake.direct_file_json_data.interest_reports
interests_on_gov_bonds = interest_reports&.map(&:interest_on_government_bonds)
interests_on_gov_bonds&.sum&.round
end

def is_mfs_same_home
is_mfs = @intake.filing_status_mfs?
is_same_home = @intake.tenant_same_home_spouse_yes? || @intake.homeowner_same_home_spouse_yes?
Expand Down
53 changes: 37 additions & 16 deletions app/lib/pdf_filler/nj1040_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,7 @@ def hash_for_pdf
answers.merge!(dependent_hash)
end

if @xml_document.at("TaxableInterestIncome")
taxable_interest_income = @xml_document.at("TaxableInterestIncome").text.to_i
answers.merge!(insert_digits_into_fields(taxable_interest_income, [
"112",
"111",
"110",
"109",
"108",
"Text107",
"undefined_41",
"undefined_40",
"undefined_39",
"undefined_43"
]))
end

# lines 13 and 30
if @xml_document.at("Exemptions TotalExemptionAmountA")
total_exemptions = @xml_document.at("Exemptions TotalExemptionAmountA").text.to_i
answers.merge!(insert_digits_into_fields(total_exemptions, [
Expand All @@ -126,6 +111,7 @@ def hash_for_pdf
]))
end

# line 13
if @xml_document.at("Body TotalExemptionAmountB")
total_exemptions = @xml_document.at("Body TotalExemptionAmountB").text.to_i
answers.merge!(insert_digits_into_fields(total_exemptions, [
Expand Down Expand Up @@ -169,6 +155,7 @@ def hash_for_pdf
]))
end

# line 15
if @xml_document.at("WagesSalariesTips").present?
wages = @xml_document.at("WagesSalariesTips").text.to_i
answers.merge!(insert_digits_into_fields(wages, [
Expand All @@ -185,6 +172,39 @@ def hash_for_pdf
]))
end

# line 16a
if @xml_document.at("TaxableInterestIncome")
taxable_interest_income = @xml_document.at("TaxableInterestIncome").text.to_i
answers.merge!(insert_digits_into_fields(taxable_interest_income, [
"112",
"111",
"110",
"109",
"108",
"Text107",
"undefined_41",
"undefined_40",
"undefined_39",
"undefined_43"
]))
end

# line 16b
if @xml_document.at("TaxexemptInterestIncome")
tax_exempt_interest_income = @xml_document.at("TaxexemptInterestIncome").text.to_i
answers.merge!(insert_digits_into_fields(tax_exempt_interest_income, [
"117",
"116",
"115",
"114",
"113",
"undefined_44",
"16a",
"undefined_42",
"16b"
]))
end

if @xml_document.at("TotalIncome").present?
total_income = @xml_document.at("TotalIncome").text.to_i
answers.merge!(insert_digits_into_fields(total_income, [
Expand Down Expand Up @@ -219,6 +239,7 @@ def hash_for_pdf
]))
end

# line 39
if @xml_document.at("TaxableIncome").present?
taxable_income = @xml_document.at("TaxableIncome").text.to_i
answers.merge!(insert_digits_into_fields(taxable_income, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ def document
xml.TaxableInterestIncome calculated_fields.fetch(:NJ1040_LINE_16A)
end

if calculated_fields.fetch(:NJ1040_LINE_16B)&.positive?
xml.TaxexemptInterestIncome calculated_fields.fetch(:NJ1040_LINE_16B)
end

if calculated_fields.fetch(:NJ1040_LINE_27).positive?
xml.TotalIncome calculated_fields.fetch(:NJ1040_LINE_27)
end
Expand Down
3 changes: 3 additions & 0 deletions app/models/state_file_nj_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def disqualifying_df_data_reason
return :has_out_of_state_w2 if w2_states.any? do |state|
!(state.text || '').casecmp(state_code).zero?
end

tax_exempt_interest_income = calculator.calculate_tax_exempt_interest_income
return :exempt_interest_exceeds_10k if tax_exempt_interest_income > 10_000
end

def disqualifying_eligibility_rules
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2341,6 +2341,7 @@ en:
data_transfer_offboarding:
edit:
ineligible_reason:
exempt_interest_exceeds_10k: your tax exempt interest income exceeds $10,000.
has_irc_125_code: W2 lists IRC 125 benefit plan amounts.
has_out_of_state_w2: you earned income in another state in 2023.
has_yonkers_income: lived, earned income, or maintained a home in Yonkers in 2023.
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2315,6 +2315,7 @@ es:
data_transfer_offboarding:
edit:
ineligible_reason:
exempt_interest_exceeds_10k: your tax exempt interest income exceeds $10,000.
mmazanec22 marked this conversation as resolved.
Show resolved Hide resolved
has_irc_125_code: tu formulario W-2 incluye cantidades del plan de beneficios del Código de Rentas Internas (IRC 125).
has_out_of_state_w2: recibiste ingresos en otro estado en el 2023
has_yonkers_income: viviste, recibiste ingresos o mantuviste un hogar en Yonkers en 2023.
Expand Down
5 changes: 5 additions & 0 deletions spec/factories/state_file_nj_intakes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
raw_direct_file_intake_data { StateFile::DirectFileApiResponseSampleService.new.read_json('nj_married_filing_separately') }
end

trait :df_data_exempt_interest do
raw_direct_file_data { StateFile::DirectFileApiResponseSampleService.new.read_xml('nj_exempt_interest_over_10k') }
raw_direct_file_intake_data { StateFile::DirectFileApiResponseSampleService.new.read_json('nj_exempt_interest_over_10k') }
end

trait :married_filing_jointly do
filing_status { "married_filing_jointly" }
spouse_birth_date { Date.new(1990, 1, 1) }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"familyAndHousehold": [],
"filers": [
{
"firstName": "Ernie",
"middleInitial": null,
"lastName": "Muppet",
"dateOfBirth": "1980-01-01",
"isPrimaryFiler": true,
"tin": "400-00-0039"
},
{
"firstName": "Bert",
"middleInitial": "K",
"lastName": "Muppet",
"dateOfBirth": "1990-01-01",
"isPrimaryFiler": false,
"tin": "600-00-0039"
}
],
"interestReports": [
{
"1099Amount": "0.00",
"has1099": false,
"interestOnGovernmentBonds": "5000.00",
"no1099Amount": "800.00",
"recipientTin": "400-00-0039",
"taxExemptInterest": "0.00",
"payer": "The payer name",
"payerTin": "101-23-4567",
"taxWithheld": "0.00",
"taxExemptAndTaxCreditBondCusipNo": "123456789"
},
{
"1099Amount": "0.00",
"has1099": false,
"interestOnGovernmentBonds": "5000.00",
mmazanec22 marked this conversation as resolved.
Show resolved Hide resolved
"no1099Amount": "800.00",
"recipientTin": "400-00-0039",
"taxExemptInterest": "0.00",
"payer": "The payer name",
"payerTin": "101-23-4567",
"taxWithheld": "0.00",
"taxExemptAndTaxCreditBondCusipNo": "123456789"
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Return xmlns="http://www.irs.gov/efile" xmlns:efile="http://www.irs.gov/efile" returnVersion="2023v5.0">
<ReturnHeader binaryAttachmentCnt="0">
<TaxYr>2023</TaxYr>
<TaxPeriodBeginDt>2023-01-01</TaxPeriodBeginDt>
<TaxPeriodEndDt>2023-12-31</TaxPeriodEndDt>
<SoftwareVersionNum>2023.0.1</SoftwareVersionNum>
<ReturnTypeCd>1040</ReturnTypeCd>
<Filer>
<PrimarySSN>400000039</PrimarySSN>
<SpouseSSN>600000039</SpouseSSN>
<NameLine1Txt>BERT &amp; ERNIE&lt;MUPPET</NameLine1Txt>
<PrimaryNameControlTxt>MUPP</PrimaryNameControlTxt>
<SpouseNameControlTxt>BERT</SpouseNameControlTxt>
<USAddress>
<AddressLine1Txt>123 Sesame St Apt 1</AddressLine1Txt>
<CityNm>Hammonton</CityNm>
<StateAbbreviationCd>NJ</StateAbbreviationCd>
<ZIPCd>85034</ZIPCd>
</USAddress>
<PhoneNum>4805559876</PhoneNum>
</Filer>
<AdditionalFilerInformation>
<AtSubmissionFilingGrp>
<EmailAddressTxt>[email protected]</EmailAddressTxt>
</AtSubmissionFilingGrp>
</AdditionalFilerInformation>
</ReturnHeader>
<ReturnData documentCnt="2">
<IRS1040 documentId="IRS10400001">
<IndividualReturnFilingStatusCd>2</IndividualReturnFilingStatusCd>
<SpouseNm>Ernie Muppet</SpouseNm>
<VirtualCurAcquiredDurTYInd>false</VirtualCurAcquiredDurTYInd>
<SpouseClaimAsDependentInd>X</SpouseClaimAsDependentInd>
<TotalBoxesCheckedCnt>1</TotalBoxesCheckedCnt>
<TotalExemptPrimaryAndSpouseCnt>2</TotalExemptPrimaryAndSpouseCnt>
<ChldWhoLivedWithYouCnt>0</ChldWhoLivedWithYouCnt>
<OtherDependentsListedCnt>0</OtherDependentsListedCnt>
<TotalExemptionsCnt>2</TotalExemptionsCnt>
<WagesAmt referenceDocumentId="W20001" referenceDocumentName="IRSW2">9000</WagesAmt>
<HouseholdEmployeeWagesAmt>0</HouseholdEmployeeWagesAmt>
<TipIncomeAmt>0</TipIncomeAmt>
<MedicaidWaiverPymtNotRptW2Amt>0</MedicaidWaiverPymtNotRptW2Amt>
<TaxableBenefitsAmt>0</TaxableBenefitsAmt>
<TaxableBenefitsForm8839Amt>0</TaxableBenefitsForm8839Amt>
<TotalWagesWithNoWithholdingAmt>0</TotalWagesWithNoWithholdingAmt>
<NontxCombatPayElectionAmt>0</NontxCombatPayElectionAmt>
<WagesSalariesAndTipsAmt>9000</WagesSalariesAndTipsAmt>
<TaxExemptInterestAmt>1</TaxExemptInterestAmt>
<TaxableInterestAmt>0</TaxableInterestAmt>
<QualifiedDividendsAmt>0</QualifiedDividendsAmt>
<OrdinaryDividendsAmt>0</OrdinaryDividendsAmt>
<TotalTaxablePensionsAmt>0</TotalTaxablePensionsAmt>
<SocSecBnftAmt>0</SocSecBnftAmt>
<TaxableSocSecAmt>0</TaxableSocSecAmt>
<CapitalGainLossAmt>0</CapitalGainLossAmt>
<TotalAdditionalIncomeAmt>0</TotalAdditionalIncomeAmt>
<TotalIncomeAmt>9000</TotalIncomeAmt>
<TotalAdjustmentsAmt>0</TotalAdjustmentsAmt>
<AdjustedGrossIncomeAmt>9000</AdjustedGrossIncomeAmt>
<TotalItemizedOrStandardDedAmt>29200</TotalItemizedOrStandardDedAmt>
<TotalDeductionsAmt>29200</TotalDeductionsAmt>
<TaxableIncomeAmt>0</TaxableIncomeAmt>
<TaxAmt>0</TaxAmt>
<AdditionalTaxAmt>0</AdditionalTaxAmt>
<TotalTaxBeforeCrAndOthTaxesAmt>0</TotalTaxBeforeCrAndOthTaxesAmt>
<CTCODCAmt>0</CTCODCAmt>
<TotalNonrefundableCreditsAmt>0</TotalNonrefundableCreditsAmt>
<TotalCreditsAmt>0</TotalCreditsAmt>
<TaxLessCreditsAmt>0</TaxLessCreditsAmt>
<TotalOtherTaxesAmt>0</TotalOtherTaxesAmt>
<TotalTaxAmt>0</TotalTaxAmt>
<FormW2WithheldTaxAmt>900</FormW2WithheldTaxAmt>
<Form1099WithheldTaxAmt>0</Form1099WithheldTaxAmt>
<TaxWithheldOtherAmt>0</TaxWithheldOtherAmt>
<WithholdingTaxAmt>900</WithholdingTaxAmt>
<EstimatedTaxPaymentsAmt>0</EstimatedTaxPaymentsAmt>
<RefundableCreditsAmt>0</RefundableCreditsAmt>
<TotalPaymentsAmt>900</TotalPaymentsAmt>
<OverpaidAmt>900</OverpaidAmt>
<RefundAmt>900</RefundAmt>
<AppliedToEsTaxAmt>0</AppliedToEsTaxAmt>
<OwedAmt>0</OwedAmt>
<EsPenaltyAmt>0</EsPenaltyAmt>
<ThirdPartyDesigneeInd>false</ThirdPartyDesigneeInd>
<PrimaryOccupationTxt>Eyebrow technician</PrimaryOccupationTxt>
<SpouseOccupationTxt>Rubber ducky manufacturer</SpouseOccupationTxt>
<RefundProductCd>NO FINANCIAL PRODUCT</RefundProductCd>
</IRS1040>
<IRSW2 documentId="W20001" documentName="IRSW2">
<EmployeeSSN>400000039</EmployeeSSN>
<EmployerEIN>678912345</EmployerEIN>
<EmployerNameControlTxt>SESA</EmployerNameControlTxt>
<EmployerName>
<BusinessNameLine1Txt>Sesame Street Eye Lip and Hair Removal</BusinessNameLine1Txt>
</EmployerName>
<EmployerUSAddress>
<AddressLine1Txt>300 Josephine St</AddressLine1Txt>
<CityNm>Hammonton</CityNm>
<StateAbbreviationCd>NJ</StateAbbreviationCd>
<ZIPCd>80212</ZIPCd>
</EmployerUSAddress>
<EmployeeNm>Bert Muppet</EmployeeNm>
<EmployeeUSAddress>
<AddressLine1Txt>123 Sesame St Apt 1</AddressLine1Txt>
<CityNm>Hammonton</CityNm>
<StateAbbreviationCd>NJ</StateAbbreviationCd>
<ZIPCd>85034</ZIPCd>
</EmployeeUSAddress>
<WagesAmt>9000</WagesAmt>
<WithholdingAmt>900</WithholdingAmt>
<SocialSecurityWagesAmt>9000</SocialSecurityWagesAmt>
<SocialSecurityTaxAmt>558</SocialSecurityTaxAmt>
<MedicareWagesAndTipsAmt>9000</MedicareWagesAndTipsAmt>
<MedicareTaxWithheldAmt>131</MedicareTaxWithheldAmt>
<SocialSecurityTipsAmt>0</SocialSecurityTipsAmt>
<AllocatedTipsAmt>0</AllocatedTipsAmt>
<NonqualifiedPlansAmt>0</NonqualifiedPlansAmt>
<W2StateLocalTaxGrp>
<W2StateTaxGrp>
<StateAbbreviationCd>NJ</StateAbbreviationCd>
<EmployerStateIdNum>12345</EmployerStateIdNum>
<StateWagesAmt>9000</StateWagesAmt>
<StateIncomeTaxAmt>15</StateIncomeTaxAmt>
<W2LocalTaxGrp>
<LocalWagesAndTipsAmt>0</LocalWagesAndTipsAmt>
<LocalIncomeTaxAmt>0</LocalIncomeTaxAmt>
</W2LocalTaxGrp>
</W2StateTaxGrp>
</W2StateLocalTaxGrp>
<StandardOrNonStandardCd>S</StandardOrNonStandardCd>
</IRSW2>
</ReturnData>
</Return>
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<TotalExemptionsCnt>4</TotalExemptionsCnt>
<WagesAmt referenceDocumentId="W20001" referenceDocumentName="IRSW2">50000</WagesAmt>
<WagesSalariesAndTipsAmt>50000</WagesSalariesAndTipsAmt>
<TaxExemptInterestAmt>1</TaxExemptInterestAmt>
<TaxableInterestAmt>500</TaxableInterestAmt>
<SocSecBnftAmt>8000</SocSecBnftAmt>
<TaxableSocSecAmt>6800</TaxableSocSecAmt>
Expand Down
Loading
Loading