Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
@@ -1,7 +1,7 @@
module StateFile
module Questions
class NcEligibilityResidenceController < QuestionsController
class NcEligibilityController < QuestionsController
include EligibilityOffboardingConcern
end
end
end
end

This file was deleted.

9 changes: 9 additions & 0 deletions app/forms/state_file/nc_eligibility_form.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module StateFile
class NcEligibilityForm < QuestionsForm
set_attributes_for :intake, :eligibility_ed_loan_cancelled, :eligibility_ed_loan_emp_payment

def save
@intake.update(attributes_for(:intake))
end
end
end
12 changes: 0 additions & 12 deletions app/forms/state_file/nc_eligibility_out_of_state_income_form.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/forms/state_file/nc_eligibility_residence_form.rb

This file was deleted.

4 changes: 2 additions & 2 deletions app/lib/navigation/state_file_nc_question_navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class StateFileNcQuestionNavigation < Navigation::StateFileBaseQuestionNavigatio

SECTIONS = [
Navigation::NavigationSection.new("state_file.navigation.section_1", [
Navigation::NavigationStep.new(StateFile::Questions::NcEligibilityResidenceController),
Navigation::NavigationStep.new(StateFile::Questions::NcEligibilityOutOfStateIncomeController),
# Navigation::NavigationStep.new(StateFile::Questions::NcEligibilityOutOfStateIncomeController),
Navigation::NavigationStep.new(StateFile::Questions::NcEligibilityController),
Navigation::NavigationStep.new(StateFile::Questions::EligibilityOffboardingController, false),
Navigation::NavigationStep.new(StateFile::Questions::EligibleController),
]),
Expand Down
5 changes: 2 additions & 3 deletions app/models/state_file_base_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def submission_efile_device_info
end

def save_nil_enums_with_unfilled
keys_with_unfilled = self.defined_enums.map { |e| e.first if e.last.include?("unfilled") }
keys_with_unfilled = self.defined_enums.map { |e| e.first if e.last.include?("unfilled") }.compact
keys_with_unfilled.each do |key|
if self.send(key).nil?
self.send("#{key}=", "unfilled")
Expand All @@ -345,7 +345,6 @@ def increment_failed_attempts
end

def controller_for_current_step

if efile_submissions.present?
StateFile::Questions::ReturnStatusController
else
Expand All @@ -359,7 +358,7 @@ def controller_for_current_step
else
StateFile::Questions::TermsAndConditionsController
end

end

def self.opted_out_state_file_intakes(email)
Expand Down
11 changes: 8 additions & 3 deletions app/models/state_file_nc_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# date_electronic_withdrawal :date
# df_data_import_succeeded_at :datetime
# df_data_imported_at :datetime
# eligibility_ed_loan_cancelled :integer default("no"), not null
# eligibility_ed_loan_emp_payment :integer default("no"), not null
# eligibility_lived_in_state :integer default("unfilled"), not null
# eligibility_out_of_state_income :integer default("unfilled"), not null
# eligibility_withdrew_529 :integer default("unfilled"), not null
Expand Down Expand Up @@ -85,10 +87,14 @@ class StateFileNcIntake < StateFileBaseIntake
enum sales_use_tax_calculation_method: { unfilled: 0, automated: 1, manual: 2 }, _prefix: :sales_use_tax_calculation_method
enum untaxed_out_of_state_purchases: { unfilled: 0, yes: 1, no: 2 }, _prefix: :untaxed_out_of_state_purchases
enum tribal_member: { unfilled: 0, yes: 1, no: 2 }, _prefix: :tribal_member

enum eligibility_withdrew_529: { unfilled: 0, yes: 1, no: 2 }, _prefix: :eligibility_withdrew_529
enum eligibility_lived_in_state: { unfilled: 0, yes: 1, no: 2 }, _prefix: :eligibility_lived_in_state
enum eligibility_out_of_state_income: { unfilled: 0, yes: 1, no: 2 }, _prefix: :eligibility_out_of_state_income

enum eligibility_ed_loan_cancelled: { no: 0, yes: 1 }, _prefix: :eligibility_ed_loan_cancelled
enum eligibility_ed_loan_emp_payment: { no: 0, yes: 1 }, _prefix: :eligibility_ed_loan_emp_payment

def calculate_sales_use_tax
nc_taxable_income = calculator.lines[:NCD400_LINE_14].value
calculator.calculate_use_tax(nc_taxable_income)
Expand All @@ -103,9 +109,8 @@ def disqualifying_df_data_reason

def disqualifying_eligibility_rules
{
eligibility_lived_in_state: "no",
eligibility_out_of_state_income: "yes",
eligibility_withdrew_529: "yes"
eligibility_ed_loan_cancelled: "yes",
eligibility_ed_loan_emp_payment: "yes"
}
end
end
20 changes: 20 additions & 0 deletions app/views/state_file/questions/nc_eligibility/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<% title = t(".title", filing_year: current_tax_year) %>

<% content_for :page_title, title %>
<% content_for :card do %>
<h1 class="h2 spacing-below-5"><%= t(".title", filing_year: current_tax_year) %></h1>
<p class="spacing-below-15 spacing-above-0"><%= t(".subtitle") %></p>

<%= form_with model: @form, url: { action: :update }, local: true, method: "put", builder: VitaMinFormBuilder do |f| %>
<div class="white-group">
<p class="text--bold"><%= t('.question', filing_year: current_tax_year) %></p>
<div class="tight-checkboxes spacing-above-0 spacing-below-0">
<%= f.cfa_checkbox(:eligibility_ed_loan_emp_payment, t(".eligibility_ed_loan_emp_payment"), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:eligibility_ed_loan_cancelled, t(".eligibility_ed_loan_cancelled"), options: { checked_value: "yes", unchecked_value: "no" }) %>
<%= f.cfa_checkbox(:none, t(".none"), options: { checked_value: "no", unchecked_value: "no" }) %>
</div>
</div>

<%= f.continue %>
<% end %>
<% end %>

This file was deleted.

This file was deleted.

25 changes: 9 additions & 16 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2417,6 +2417,8 @@ en:
body_html: You cannot use this tool this year because you %{ineligible_reason}. <strong>Is this a mistake?</strong> <a href=%{prev_link}>Go back to correct.</a>
ineligible_reason:
eligibility_529_for_non_qual_expense: withdrew money from a 529 college savings account and used it for a non-qualifying expense in %{filing_year}
eligibility_ed_loan_cancelled: had a student loan debt canceled under the American Rescue Plan Act.
eligibility_ed_loan_emp_payment: received a Qualified Education Loan Payment paid by your employer.
eligibility_emergency_rental_assistance: received emergency rental assistance in %{filing_year}
eligibility_home_different_areas: or your spouse had your permanent homes in two different counties, cities, towns, or taxing areas on the last day the tax year
eligibility_homebuyer_withdrawal: withdrew money from a first-time homebuyer account and used it for anything other than purchasing a home
Expand Down Expand Up @@ -2831,23 +2833,14 @@ en:
edit:
county: County
title: Select the county where you lived on December 31st, %{filing_year}
nc_eligibility_out_of_state_income:
nc_eligibility:
edit:
out_of_state_income_html: Did you (or your spouse, if you’re filing together) earn any income in another state in %{filing_year}? (This includes unemployment income <strong>received</strong> from another state.)
reveal:
list1: You withdrew money from a 529 account and used it for qualifying expenses, or
list2: You didn't withdraw money from a 529 account at all.
p1: Qualifying expenses include tuition and fees, books, equipment (including computers and other tech), room and board, apprenticeship programs, and K-12 tuition up to $10,000.
p2: Most other uses of funds are non-qualifying expenses, including college application and testing fees, transportation costs, health insurance, and extracurricular costs.
subtitle: 'Select ''no'' if:'
title: What are qualifying and non- qualifying expenses?
title: First, let's see if you can use this tool to file your taxes
withdraw_529_html: Did you (or your spouse, if you’re filing together) withdraw money from a <a href="https://www.cfnc.org/save-for-college/" target="_blank" rel="noopener nofollow">529 college savings account</a> and use it for non-qualifying expenses in %{filing_year}?
nc_eligibility_residence:
edit:
lived_in_state_html: Did you (and your spouse, if you’re filing together) live in %{state} for <strong>all</strong> of %{filing_year}?
subtitle: For the %{filing_year} tax season, this tool will only be able to serve people with specific tax situations. Please answer the following questions to find out if you can use it.
title: First, let's see if you can use this tool to file your taxes
eligibility_ed_loan_cancelled: Had a student loan canceled under the American Rescue Plan Act
eligibility_ed_loan_emp_payment: Received a Qualified Education Loan Payment paid by your employer
none: None of these apply
question: Did any of the following less common scenarios apply to you (or your spouse, if married filing jointly) in %{filing_year}?
subtitle: For this tax season, this service will only be able to serve people with specific tax situations. Please answer the following questions to find out if you can use it.
title: First, let's see if you can use this tool to file your %{filing_year} North Carolina taxes
nc_primary_state_id:
nc_primary:
encourage_sharing: You’re encouraged to share this information, but it’s not required to file your North Carolina taxes.
Expand Down
25 changes: 9 additions & 16 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2391,6 +2391,8 @@ es:
body_html: No puedes usar esta herramienta este año porque tú %{ineligible_reason}. <strong>¿Es un error?</strong><a href=%{prev_link}>Regresa para corregirlo.</a>
ineligible_reason:
eligibility_529_for_non_qual_expense: retiraste dinero de una cuenta de ahorro universitario 529 y lo utilizaste para un gasto no calificado en el %{filing_year}
eligibility_ed_loan_cancelled: tenía una deuda de préstamo estudiantil cancelada bajo la Ley del Plan de Rescate Estadounidense.
eligibility_ed_loan_emp_payment: recibió un pago de préstamo educativo calificado pagado por su empleador.
eligibility_emergency_rental_assistance: recibió asistencia de alquiler de emergencia en %{filing_year}
eligibility_home_different_areas: o su cónyuge tenían sus residencias permanentes en dos condados, ciudades, pueblos o áreas impositivas diferentes el último día del año fiscal.
eligibility_homebuyer_withdrawal: retiraron dinero de una cuenta para compradores de vivienda por primera vez y lo usaron para algo que no era comprar una vivienda.
Expand Down Expand Up @@ -2803,23 +2805,14 @@ es:
edit:
county: Condado
title: Seleccione el condado donde vivía el 31 de diciembre de %{filing_year}
nc_eligibility_out_of_state_income:
nc_eligibility:
edit:
out_of_state_income_html: "¿Usted (o su cónyuge, si presentan la declaración juntos) obtuvo algún ingreso en otro estado en %{filing_year}? (Esto incluye los ingresos por desempleo <strong>recibidos</strong> de otro estado)."
reveal:
list1: Retiró dinero de una cuenta 529 y lo usó para gastos calificados, o
list2: No retiraste dinero de una cuenta 529 en absoluto.
p1: Los gastos calificados incluyen matrícula y cuotas, libros, equipo (incluidas computadoras y otra tecnología), alojamiento y comida, programas de aprendizaje y matrícula K-12 hasta $10,000.
p2: La mayoría de los demás usos de los fondos son gastos no calificados, incluidas las tarifas de solicitud y exámenes universitarios, costos de transporte, seguro médico y costos extracurriculares.
subtitle: 'Seleccione ''no'' si:'
title: "¿Qué son los gastos calificados y no calificados?"
title: Primero, veamos si puedes usar esta herramienta para presentar tus impuestos.
withdraw_529_html: ¿Retiró usted (o su cónyuge, si presentan una declaración juntos) dinero de un <a href="https://www.cfnc.org/save-for-college/" target="_blank" rel="noopener nofollow">Cuenta de ahorros para la universidad 529</a> y usarla para gastos no calificados en %{filing_year}?
nc_eligibility_residence:
edit:
lived_in_state_html: "¿Usted (y su cónyuge, si presentan la declaración juntos) vivieron en %{state} durante <strong>todo</strong> el %{filing_year}?"
subtitle: Para la temporada de impuestos %{filing_year}, esta herramienta solo podrá atender a personas con situaciones tributarias específicas. Responda las siguientes preguntas para saber si puede utilizarlo.
title: Primero, veamos si puedes usar esta herramienta para presentar tus impuestos.
eligibility_ed_loan_cancelled: Tuve un préstamo estudiantil cancelado bajo la Ley del Plan de Rescate Estadounidense
eligibility_ed_loan_emp_payment: Recibió un pago de préstamo educativo calificado pagado por su empleador
none: Ninguna de estas se aplica
question: "¿Se aplicó a usted (o a su cónyuge, si está casado y presenta una declaración conjunta) en %{filing_year} alguno de los siguientes escenarios menos comunes?"
subtitle: Para esta temporada de impuestos, este servicio solo podrá atender a personas con situaciones tributarias específicas. Por favor, responda las siguientes preguntas para saber si puede utilizarlo.
title: Primero, veamos si puedes usar esta herramienta para presentar tus impuestos de Carolina del Norte de %{filing_year}
nc_primary_state_id:
nc_primary:
encourage_sharing: Se le recomienda compartir esta información, pero no es obligatorio para presentar su declaración de impuestos de Carolina del Norte.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddEligibilityScreenerToNcIntakes < ActiveRecord::Migration[7.1]
def change
add_column :state_file_nc_intakes, :eligibility_ed_loan_emp_payment, :integer, default: 0, null: false
add_column :state_file_nc_intakes, :eligibility_ed_loan_cancelled, :integer, default: 0, null: false
end
end
4 changes: 3 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_11_27_213848) do
ActiveRecord::Schema[7.1].define(version: 2024_12_02_184105) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "plpgsql"
Expand Down Expand Up @@ -2014,6 +2014,8 @@
t.datetime "df_data_import_failed_at"
t.datetime "df_data_import_succeeded_at"
t.datetime "df_data_imported_at"
t.integer "eligibility_ed_loan_cancelled", default: 0, null: false
t.integer "eligibility_ed_loan_emp_payment", default: 0, null: false
t.integer "eligibility_lived_in_state", default: 0, null: false
t.integer "eligibility_out_of_state_income", default: 0, null: false
t.integer "eligibility_withdrew_529", default: 0, null: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'

RSpec.describe StateFile::Questions::NcEligibilityOutOfStateIncomeController do
RSpec.describe StateFile::Questions::NcEligibilityController do
describe "#update" do
# use the eligibility_offboarding_concern shared example if the page
# should redirect to the state file eligibility offboarding page
Expand All @@ -9,21 +9,21 @@
it_behaves_like :eligibility_offboarding_concern, intake_factory: :state_file_nc_intake do
let(:eligible_params) do
{
state_file_nc_eligibility_out_of_state_income_form: {
eligibility_out_of_state_income: "no",
eligibility_withdrew_529: "no",
state_file_nc_eligibility_form: {
eligibility_ed_loan_cancelled: "no",
eligibility_ed_loan_emp_payment: "no",
}
}
end

let(:ineligible_params) do
{
state_file_nc_eligibility_out_of_state_income_form: {
eligibility_out_of_state_income: "yes",
eligibility_withdrew_529: "yes",
state_file_nc_eligibility_form: {
eligibility_ed_loan_cancelled: "yes",
eligibility_ed_loan_emp_payment: "yes",
}
}
end
end
end
end
end

This file was deleted.

Loading
Loading