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-1868] NC: only ask about 1099rs with taxable amt #5680

Merged
merged 10 commits into from
Mar 6, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module Questions
class AzRetirementIncomeSubtractionController < RetirementIncomeSubtractionController
include ReturnToReviewConcern

def self.show?(intake)
Flipper.enabled?(:show_retirement_ui) && intake.eligible_1099rs.present?
end

def followup_class = StateFileAz1099RFollowup
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module StateFile
module Questions
class IdRetirementAndPensionIncomeController < RetirementIncomeSubtractionController
def self.show?(intake)
Flipper.enabled?(:show_retirement_ui) && !intake.filing_status_mfs? && intake.eligible_1099rs.any?
super && !intake.filing_status_mfs?
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ module StateFile
module Questions
class MdRetirementIncomeSubtractionController < RetirementIncomeSubtractionController

def self.show?(intake)
Flipper.enabled?(:show_retirement_ui) && intake.eligible_1099rs.present?
end

def followup_class = StateFileMd1099RFollowup
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialized_update_form
end

def self.show?(intake)
Flipper.enabled?(:show_retirement_ui) && intake.state_file1099_rs.length.positive?
Flipper.enabled?(:show_retirement_ui) && intake.eligible_1099rs.present?
end

private
Expand Down
6 changes: 0 additions & 6 deletions app/models/state_file_az_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,4 @@ def eligible_for_az_subtractions?
wages_salaries_tips = direct_file_data.fed_wages_salaries_tips
wages_salaries_tips.present? && wages_salaries_tips > 0
end

def eligible_1099rs
@eligible_1099rs ||= self.state_file1099_rs.select do |form1099r|
form1099r.taxable_amount&.to_f&.positive?
end
end
end
6 changes: 4 additions & 2 deletions app/models/state_file_base_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ def unsubscribed_from_sms?
end

def eligible_1099rs
state_file1099_rs
@eligible_1099rs ||= self.state_file1099_rs.select do |form1099r|
form1099r.taxable_amount&.to_f&.positive?
end
end
end
end
2 changes: 1 addition & 1 deletion app/models/state_file_id_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def spouse_between_62_and_65_years_old?
end

def eligible_1099rs
state_file1099_rs.select do |form1099r|
@eligible_1099rs ||= state_file1099_rs.select do |form1099r|
form1099r.taxable_amount&.to_f&.positive? && person_qualifies?(form1099r)
end
end
Expand Down
6 changes: 0 additions & 6 deletions app/models/state_file_md_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ def has_banking_information_in_financial_resolution?
true
end

def eligible_1099rs
@eligible_1099rs ||= self.state_file1099_rs.select do |form1099r|
form1099r.taxable_amount&.to_f&.positive?
end
end

def filer_disabled?
primary_disabled_yes? || spouse_disabled_yes?
end
Expand Down
51 changes: 0 additions & 51 deletions app/views/state_file/questions/nc_review/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,6 @@
<% content_for :card do %>
<%= render "state_file/questions/shared/review_header" %>

<% if current_intake.state_file1099_rs.length.positive? && Flipper.enabled?(:show_retirement_ui) %>
<section id="retirement-income-source" class="white-group">
<div class="spacing-below-5">
<h2 class="text--body text--bold spacing-below-5"><%=t(".retirement_income_deductions") %></h2>
<p class="text--small"><%= t(".retirement_income_deductions_explanation") %></p>

<% current_intake.state_file1099_rs.each_with_index do |state_file1099_r, index| %>
<% followup = state_file1099_r.state_specific_followup %>
<% unless followup.nil? %>
<div id="<%= "retirement-income-source-#{index}" %>" class="spacing-above-15 spacing-below-15">
<div>
<p class="spacing-below-0 text--small"><b><%= state_file1099_r.payer_name %></b></p>
<ul class="list--bulleted spacing-above-0">
<% if followup.income_source_bailey_settlement? %>
<li><%= t(".retirement_income_source_bailey_settlement") %></li>
<% if followup.bailey_settlement_at_least_five_years_yes? %>
<li><%= t(".bailey_settlement_at_least_five_years") %></li>
<% end %>
<% if followup.bailey_settlement_from_retirement_plan_yes? %>
<li><%= t(".bailey_settlement_from_retirement_plan") %></li>
<% end %>
<% if !followup.bailey_settlement_from_retirement_plan_yes? && !followup.bailey_settlement_at_least_five_years_yes? %>
<li><%= t(".none_apply") %></li>
<% end %>
<% elsif followup.income_source_uniformed_services? %>
<li><%= t(".retirement_income_source_uniformed_services") %></li>
<% if followup.uniformed_services_retired_yes? %>
<li><%= t(".uniformed_twenty_years_medical_retired") %></li>
<% end %>
<% if followup.uniformed_services_qualifying_plan_yes? %>
<li><%= t(".uniformed_survivor_benefit_plan") %></li>
<% end %>
<% if !followup.uniformed_services_retired_yes? && !followup.uniformed_services_qualifying_plan_yes? %>
<li><%= t(".none_apply") %></li>
<% end %>
<% else %>
<li><%= t(".none_apply") %></li>
<% end %>
</ul>
</div>
<%= link_to StateFile::Questions::NcRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %>
<%= t("general.review_and_edit") %>
<span class="sr-only"><%= t(".retirement_income_source_review_and_edit", index: index + 1) %></span>
<% end %>
</div>
<% end %>
<% end %>
</div>
</section>
<% end %>

<div id="nc-county" class="white-group">
<div class="spacing-below-5">
<p class="text--bold spacing-below-5"><%= t("state_file.questions.review.county", filing_year: current_tax_year) %></p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
<div class="white-group" id="retirement-income-subtractions">
<div class="spacing-below-25">
<h2 class="text--body text--bold spacing-below-5"><%=t(".title") %></h2>
<p><%=t(".subtitle") %></p>
</div>
<% if current_intake.eligible_1099rs.length.positive? %>
<section class="white-group" id="retirement-income-subtractions">
<div class="spacing-below-25">
<h2 class="text--body text--bold spacing-below-5"><%=t(".title") %></h2>
<p><%=t(".subtitle") %></p>
</div>

<div class="spacing-below-5">
<ul class="list--bulleted">
<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %>
<p class="text--bold spacing-below-5">
<%= state_file1099_r.payer_name %>
</p>
<li style="margin-left: 1rem;">
<% case state_file1099_r&.state_specific_followup&.income_source %>
<% when "uniformed_services" %>
<%= t(".uniformed_services") %>
<% when "pension_plan" %>
<%= t(".government_pension") %>
<% else %>
<%= t(".none_apply") %>
<% end %>
</li>
<div class="spacing-below-5">
<ul class="list--bulleted">
<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %>
<p class="text--bold spacing-below-5">
<%= state_file1099_r.payer_name %>
</p>
<li style="margin-left: 1rem;">
<% case state_file1099_r&.state_specific_followup&.income_source %>
<% when "uniformed_services" %>
<%= t(".uniformed_services") %>
<% when "pension_plan" %>
<%= t(".government_pension") %>
<% else %>
<%= t(".none_apply") %>
<% end %>
</li>

<%= link_to StateFile::Questions::AzRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %>
<%= t("general.edit") %>
<span class="sr-only"><%= t("general.edit") %></span>
<%= link_to StateFile::Questions::AzRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %>
<%= t("general.edit") %>
<span class="sr-only"><%= t("general.edit") %></span>
<% end %>
<br />
<% end %>
<br />
<% end %>
</ul>
</div>
</div>

</ul>
</div>
</section>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if current_intake.calculator.line_or_zero(:ID39R_B_LINE_8e).positive? %>
<div id="qualified-retirement-benefits-deduction" class="white-group">
<section id="qualified-retirement-benefits-deduction" class="white-group">
<div class="spacing-below-5">
<p class="text--bold spacing-below-5"><%= t(".qualified_retirement_benefits_deduction") %></p>
<p class="text spacing-below-2"><%= t(".qualified_retirement_benefits_deduction_explain") %></p>
Expand All @@ -9,6 +9,6 @@
<% id_disability_or_retirement_link = current_intake.has_filer_between_62_and_65_years_old? ? StateFile::Questions::IdDisabilityController.to_path_helper(return_to_review: "y") : StateFile::Questions::IdRetirementAndPensionIncomeController.to_path_helper(return_to_review: "y", index: 0) %>
<%= link_to t("general.review_and_edit"), id_disability_or_retirement_link, class: "button--small" %>
</div>
</div>
</section>
<% end %>

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<% if current_intake.eligible_1099rs.length.positive? %>
<section id="retirement-income-source" class="white-group">
<div class="spacing-below-5">
<h2 class="text--body text--bold spacing-below-5"><%=t(".retirement_income_deductions") %></h2>
<p class="text--small"><%= t(".retirement_income_deductions_explanation") %></p>

<% current_intake.eligible_1099rs.each_with_index do |state_file1099_r, index| %>
<% followup = state_file1099_r.state_specific_followup %>
<% unless followup.nil? %>
<div id="<%= "retirement-income-source-#{index}" %>" class="spacing-above-15 spacing-below-15">
<div>
<p class="spacing-below-0 text--small"><b><%= state_file1099_r.payer_name %></b></p>
<ul class="list--bulleted spacing-above-0">
<% if followup.income_source_bailey_settlement? %>
<li><%= t(".retirement_income_source_bailey_settlement") %></li>
<% if followup.bailey_settlement_at_least_five_years_yes? %>
<li><%= t(".bailey_settlement_at_least_five_years") %></li>
<% end %>
<% if followup.bailey_settlement_from_retirement_plan_yes? %>
<li><%= t(".bailey_settlement_from_retirement_plan") %></li>
<% end %>
<% if !followup.bailey_settlement_from_retirement_plan_yes? && !followup.bailey_settlement_at_least_five_years_yes? %>
<li><%= t(".none_apply") %></li>
<% end %>
<% elsif followup.income_source_uniformed_services? %>
<li><%= t(".retirement_income_source_uniformed_services") %></li>
<% if followup.uniformed_services_retired_yes? %>
<li><%= t(".uniformed_twenty_years_medical_retired") %></li>
<% end %>
<% if followup.uniformed_services_qualifying_plan_yes? %>
<li><%= t(".uniformed_survivor_benefit_plan") %></li>
<% end %>
<% if !followup.uniformed_services_retired_yes? && !followup.uniformed_services_qualifying_plan_yes? %>
<li><%= t(".none_apply") %></li>
<% end %>
<% else %>
<li><%= t(".none_apply") %></li>
<% end %>
</ul>
</div>
<%= link_to StateFile::Questions::NcRetirementIncomeSubtractionController.to_path_helper(return_to_review: "y", index: index), class: "button--small" do %>
<%= t("general.review_and_edit") %>
<span class="sr-only"><%= t(".retirement_income_source_review_and_edit", index: index + 1) %></span>
<% end %>
</div>
<% end %>
<% end %>
</div>
</section>
<% end %>
21 changes: 11 additions & 10 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3378,25 +3378,15 @@ en:
nc_review:
edit:
amount_earned: Amount earned
bailey_settlement_at_least_five_years: At least five years of creditable service by August 12, 1989
bailey_settlement_from_retirement_plan: Received retirement benefits from NC’s 401(k) or 457 plan, and contributed to the plan before August 12, 1989
benefits_vested_pensions: Subtraction for retirement benefits by vested qualifying government pensions
child_deduction: Child deduction
interest_us_bonds: Interest income from U.S. bonds (not taxable in North Carolina)
none_apply: None apply
primary_veteran: United States Armed Forces veteran status
retirement_income_deductions: North Carolina retirement income deductions
retirement_income_deductions_explanation: These allow people to deduct all or a portion of their retirement income from their taxes.
retirement_income_source_bailey_settlement: Retirement benefits as part of the Bailey Settlement
retirement_income_source_review_and_edit: Review and edit 1099-R %{index}
retirement_income_source_uniformed_services: Retirement benefits from the Uniformed Services
service_members: Subtraction for retirement benefits received by service members
social_security_benefits: Social Security benefits (not taxable in North Carolina)
spouse_veteran: Your spouse's United States Armed Forces veteran status
state_credit: Enrolled member of a federally recognized Indian Tribe, and received income from a source within a reservation
subtraction_indian_tribe: Subtraction for income of a member of an Indian tribe
uniformed_survivor_benefit_plan: Payments from a qualifying Survivor Benefit Plan to a beneficiary of a retired member who served at least 20 years or who was medically retired from the Uniformed Services
uniformed_twenty_years_medical_retired: Retired member who served at least 20 years or were medically retired from the Uniformed Services
use_tax_amount: Amount of use tax
use_tax_applied: Out-of-state purchases in %{filing_year} without paying sales tax
nc_sales_use_tax:
Expand Down Expand Up @@ -4097,6 +4087,17 @@ en:
qualified_disabled_retirement_benefits: Qualified disabled retirement benefits
qualified_retirement_benefits_deduction: Qualified Retirement Benefits Deduction
qualified_retirement_benefits_deduction_explain: These allow people to deduct all or a portion of their retirement income from their taxes.
nc_retirement_income_deductions_review_header:
bailey_settlement_at_least_five_years: At least five years of creditable service by August 12, 1989
bailey_settlement_from_retirement_plan: Received retirement benefits from NC’s 401(k) or 457 plan, and contributed to the plan before August 12, 1989
none_apply: None apply
retirement_income_deductions: North Carolina retirement income deductions
retirement_income_deductions_explanation: These allow people to deduct all or a portion of their retirement income from their taxes.
retirement_income_source_bailey_settlement: Retirement benefits as part of the Bailey Settlement
retirement_income_source_review_and_edit: Review and edit 1099-R %{index}
retirement_income_source_uniformed_services: Retirement benefits from the Uniformed Services
uniformed_survivor_benefit_plan: Payments from a qualifying Survivor Benefit Plan to a beneficiary of a retired member who served at least 20 years or who was medically retired from the Uniformed Services
uniformed_twenty_years_medical_retired: Retired member who served at least 20 years or were medically retired from the Uniformed Services
review_header:
income_details: Income Details
income_forms_collected: 'Income form(s) collected:'
Expand Down
Loading
Loading