Skip to content

Commit

Permalink
Merge branch 'main' into nj-125-income-editing
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/services/state_file/state_information_service.rb
  • Loading branch information
mluedke2 committed Jan 7, 2025
2 parents 8b8a794 + 1e6f60c commit df54a83
Show file tree
Hide file tree
Showing 48 changed files with 569 additions and 340 deletions.
13 changes: 0 additions & 13 deletions app/assets/stylesheets/_state-file.scss
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,6 @@
font-size: 1.3rem;
line-height: 1.9rem;
}

&.grey-group {
margin: 0 auto;
padding: 2rem;
margin-bottom: 2rem;
background: $color-grey-light;
border: 2px solid $color-grey-medium-light;
border-radius: 6px;

.checkbox.is-selected {
background: inherit;
}
}
}

.form1099__label {
Expand Down
1 change: 0 additions & 1 deletion app/controllers/flows_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,6 @@ def self.az_attributes(first_name: 'Testuser', last_name: 'Testuser', filing_sta
spouse_was_incarcerated: "no",
was_incarcerated: "no", # TODO: remove when column is ignored
household_excise_credit_claimed: "no",
ssn_no_employment: "no",
message_tracker: {},
locale: 'en',
unfinished_intake_ids: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module StateFile
module Questions
class NjDependentsHealthInsuranceController < QuestionsController

before_action -> { @filing_year = Rails.configuration.statefile_current_tax_year }

def self.show?(intake)
return false unless intake.dependents.any?
intake.has_health_insurance_requirement_exception? || intake.eligibility_all_members_health_insurance_no?
end

def form_params
params
.fetch(:state_file_nj_dependents_health_insurance_form, {})
.permit([
{
dependents_attributes: [
:id,
:nj_did_not_have_health_insurance,
]
}
])
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@ class NjEligibilityHealthInsuranceController < QuestionsController

before_action -> { @filing_year = Rails.configuration.statefile_current_tax_year }

def self.show?(intake)
!intake.has_health_insurance_requirement_exception?
end

def form_params
params
.fetch(:state_file_nj_eligibility_health_insurance_form, {})
.permit([
:eligibility_all_members_health_insurance,
{
dependents_attributes: [
:id,
:nj_did_not_have_health_insurance,
]
}
])
.permit([:eligibility_all_members_health_insurance])
end

end
end
end
2 changes: 0 additions & 2 deletions app/forms/state_file/az_excise_credit_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ class AzExciseCreditForm < QuestionsForm
set_attributes_for :intake,
:primary_was_incarcerated,
:spouse_was_incarcerated,
:ssn_no_employment,
:household_excise_credit_claimed,
:household_excise_credit_claimed_amount

validates :primary_was_incarcerated, inclusion: { in: %w[yes no], message: :blank }
validates :spouse_was_incarcerated, inclusion: { in: %w[yes no], message: :blank }, if: -> { intake.filing_status_mfj? }
validates :ssn_no_employment, inclusion: { in: %w[yes no], message: :blank }
validates :household_excise_credit_claimed, inclusion: { in: %w[yes no], message: :blank }
validates_presence_of :household_excise_credit_claimed_amount, if: -> { household_excise_credit_claimed == "yes" }
validates :household_excise_credit_claimed_amount, numericality: { greater_than: 0, message: ->(_object, _data) { I18n.t('validators.must_enter_amount') } }, allow_blank: true
Expand Down
10 changes: 10 additions & 0 deletions app/forms/state_file/nj_dependents_health_insurance_form.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module StateFile
class NjDependentsHealthInsuranceForm < QuestionsForm
attr_accessor :dependents_attributes
delegate :dependents, to: :intake

def save
@intake.update!(dependents_attributes: dependents_attributes.to_h)
end
end
end
10 changes: 0 additions & 10 deletions app/forms/state_file/nj_eligibility_health_insurance_form.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
module StateFile
class NjEligibilityHealthInsuranceForm < QuestionsForm
set_attributes_for :intake, :eligibility_all_members_health_insurance
attr_accessor :dependents_attributes
delegate :dependents, to: :intake

validates :eligibility_all_members_health_insurance, presence: true

def save
@intake.update(attributes_for(:intake))
if @intake.eligibility_all_members_health_insurance_no?
@intake.update!(dependents_attributes: dependents_attributes.to_h)
else
attributes_array = intake.dependents.map do |dependent|
{ id: dependent.id, nj_did_not_have_health_insurance: 'no' }
end
@intake.update!(dependents_attributes: attributes_array)
end
end
end
end
10 changes: 8 additions & 2 deletions app/lib/efile/az/az140_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,14 @@ def calculate_line_56
0
else
# TODO question: if they are filing with us does that automatically mean no AZ-140PTC?
number_of_filers = filing_status_mfj? ? 2 : 1
wrksht_line_2 = number_of_filers - @intake.incarcerated_filer_count
number_of_eligible_filers =
if filing_status_mfj?
[@intake.direct_file_json_data.primary_filer.ssn_not_valid_for_employment,
@intake.direct_file_json_data.spouse_filer.ssn_not_valid_for_employment].count(&:blank?)
else
1
end
wrksht_line_2 = number_of_eligible_filers - @intake.incarcerated_filer_count
wrksht_line_4 = (@dependent_count + wrksht_line_2) * 25

max_credit = 100
Expand Down
2 changes: 1 addition & 1 deletion app/lib/efile/nj/nj1040_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def is_ineligible_or_unsupported_for_property_tax_credit
StateFile::NjTenantEligibilityHelper.determine_eligibility(@intake) == StateFile::NjTenantEligibilityHelper::INELIGIBLE &&
StateFile::NjHomeownerEligibilityHelper.determine_eligibility(@intake) == StateFile::NjHomeownerEligibilityHelper::INELIGIBLE
else
nil
true
end
end

Expand Down
1 change: 1 addition & 0 deletions app/lib/navigation/state_file_nj_question_navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class StateFileNjQuestionNavigation < Navigation::StateFileBaseQuestionNavigatio
Navigation::NavigationStep.new(StateFile::Questions::NjDisabledExemptionController),
Navigation::NavigationStep.new(StateFile::Questions::NjVeteransExemptionController),
Navigation::NavigationStep.new(StateFile::Questions::NjCollegeDependentsExemptionController),
Navigation::NavigationStep.new(StateFile::Questions::NjDependentsHealthInsuranceController),
Navigation::NavigationStep.new(StateFile::Questions::NjMedicalExpensesController),
Navigation::NavigationStep.new(StateFile::Questions::NjHouseholdRentOwnController),
Navigation::NavigationStep.new(StateFile::Questions::NjHomeownerEligibilityController),
Expand Down
15 changes: 10 additions & 5 deletions app/models/state_file_az_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
# spouse_middle_initial :string
# spouse_suffix :string
# spouse_was_incarcerated :integer default("unfilled"), not null
# ssn_no_employment :integer default("unfilled"), not null
# tribal_member :integer default("unfilled"), not null
# tribal_wages_amount :decimal(12, 2)
# unfinished_intake_ids :text default([]), is an Array
Expand Down Expand Up @@ -97,7 +96,6 @@ class StateFileAzIntake < StateFileBaseIntake
enum was_incarcerated: { unfilled: 0, yes: 1, no: 2 }, _prefix: :was_incarcerated
enum primary_was_incarcerated: { unfilled: 0, yes: 1, no: 2 }, _prefix: :primary_was_incarcerated
enum spouse_was_incarcerated: { unfilled: 0, yes: 1, no: 2 }, _prefix: :spouse_was_incarcerated
enum ssn_no_employment: { unfilled: 0, yes: 1, no: 2 }, _prefix: :ssn_no_employment
enum household_excise_credit_claimed: { unfilled: 0, yes: 1, no: 2 }, _prefix: :household_excise_credit_claimed
enum tribal_member: { unfilled: 0, yes: 1, no: 2 }, _prefix: :tribal_member
enum armed_forces_member: { unfilled: 0, yes: 1, no: 2 }, _prefix: :armed_forces_member
Expand Down Expand Up @@ -153,8 +151,15 @@ def disqualified_from_excise_credit_df?
end
agi_over_limit = direct_file_data.fed_agi > agi_limit
lacks_valid_ssn = primary.ssn.blank? || primary.has_itin?

agi_over_limit || lacks_valid_ssn
all_filers_ssn_not_valid_for_employment =
if filing_status_mfj?
direct_file_json_data.primary_filer.ssn_not_valid_for_employment &&
direct_file_json_data.spouse_filer.ssn_not_valid_for_employment
else
direct_file_json_data.primary_filer.ssn_not_valid_for_employment
end

agi_over_limit || lacks_valid_ssn || all_filers_ssn_not_valid_for_employment
end

def incarcerated_filer_count
Expand All @@ -177,7 +182,7 @@ def use_old_incarcerated_column?
def disqualified_from_excise_credit_fyst?
all_filers_incarcerated = was_incarcerated_yes? || (primary_was_incarcerated_yes? && spouse_was_incarcerated_yes?)
whole_credit_already_claimed = use_old_incarcerated_column? && household_excise_credit_claimed_yes?
all_filers_incarcerated || whole_credit_already_claimed || ssn_no_employment_yes? || direct_file_data.claimed_as_dependent?
all_filers_incarcerated || whole_credit_already_claimed || direct_file_data.claimed_as_dependent?
end

def filing_status
Expand Down
12 changes: 7 additions & 5 deletions app/models/state_file_nj_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,15 @@ def eligibility_made_less_than_threshold?
nj_gross_income <= threshold
end

def has_health_insurance_requirement_exception?
self.eligibility_made_less_than_threshold? || self.eligibility_claimed_as_dependent?
end

def health_insurance_eligibility
if self.eligibility_all_members_health_insurance_no?
has_exception = self.eligibility_made_less_than_threshold? || self.eligibility_claimed_as_dependent?
has_exception ? "eligible" : "ineligible"
else
"eligible"
if self.eligibility_all_members_health_insurance_no? && !self.has_health_insurance_requirement_exception?
return "ineligible"
end
"eligible"
end

def disqualifying_eligibility_rules
Expand Down
23 changes: 12 additions & 11 deletions app/services/state_file/state_information_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,22 @@ def state_intake_class_names
state_name: "New Jersey",
return_type: "Resident",
schema_file_name: "NJIndividual2024V0.1.zip",
mail_voucher_address: "New Jersey Personal Income Tax<br/>" \
"Processing Center<br/>" \
"Trenton, NJ".html_safe,
pay_taxes_link: "https://www.nj.gov/treasury/taxation/payments-notices.shtml",
mail_voucher_address: "State of New Jersey<br/>" \
"Division of Taxation<br/>" \
"Revenue Processing Center - Payments<br/>" \
"PO Box 643 Trenton, NJ 08646-0643".html_safe,
pay_taxes_link: "https://www1.state.nj.us/TYTR_RevTaxPortal/jsp/IndTaxLoginJsp.jsp",
survey_link: "https://codeforamerica.co1.qualtrics.com/jfe/form/SV_82CJgtfW0HFEPIi",
submission_type: "Resident",
tax_payment_info_url: "https://www.nj.gov/treasury/taxation/payments-notices.shtml",
tax_payment_url: "https://www.nj.gov/treasury/taxation/payments-notices.shtml",
tax_refund_url: "https://www.tax.ny.gov/pit/file/refund.htm",
tax_payment_info_url: "https://www.state.nj.us/treasury/taxation/payments-notices.shtml",
tax_payment_url: "https://www1.state.nj.us/TYTR_RevTaxPortal/jsp/IndTaxLoginJsp.jsp",
tax_refund_url: "https://www20.state.nj.us/TYTR_TGI_INQ/jsp/prompt.jsp",
department_of_taxation: "New Jersey Division of Taxation",
timezone: 'America/New_York',
vita_link_en: "",
vita_link_es: "",
voucher_form_name: "NJ Voucher Form",
voucher_path: "",
vita_link_en: "https://airtable.com/appqG5OGbTLBiQ408/pag9EUHzAZzfRIwUn/form",
vita_link_es: "https://airtable.com/appqG5OGbTLBiQ408/pagVcLm52Stg9p4hY/form",
voucher_form_name: "NJ-1040-V (NJ Gross Income Tax Resident Payment Voucher)",
voucher_path: "/pdfs/nj1040v-TY2024.pdf",
w2_supported_box14_codes: ["UI_WF_SWF", "FLI"],
w2_include_local_income_boxes: false
},
Expand Down
7 changes: 0 additions & 7 deletions app/views/state_file/questions/az_excise_credit/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
</div>
<% end %>

<div class="white-group">
<%= f.cfa_radio_set(:ssn_no_employment, label_text: t(".ssn_no_employment_html.label"), collection: [
{ value: "yes", label: t("general.affirmative") },
{ value: "no", label: t("general.negative") },
]) %>
</div>

<div class="white-group">
<div class="question-with-follow-up">
<div class="question-with-follow-up__question">
Expand Down
3 changes: 0 additions & 3 deletions app/views/state_file/questions/az_review/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<p class="text--bold spacing-below-5"><%=t(".was_incarcerated", filing_year: current_tax_year) %></p>
<p><%=current_intake.primary_was_incarcerated_yes? || current_intake.spouse_was_incarcerated_yes? ? t("general.affirmative") : t("general.negative") %></p>

<p class="text--bold spacing-below-5"><%=t(".ssn_no_employment") %></p>
<p><%=current_intake.ssn_no_employment_yes? ? t("general.affirmative") : t("general.negative") %></p>

<p class="text--bold spacing-below-5"><%=t(".household_excise_credit_claimed") %></p>
<p><%=current_intake.household_excise_credit_claimed_yes? ? t("general.affirmative") : t("general.negative") %></p>
<%= link_to t("general.edit"), StateFile::Questions::AzExciseCreditController.to_path_helper(return_to_review: "y"), class: "button--small" %>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<% title = t(".title_html") %>

<% content_for :page_title, title %>
<% content_for :card do %>
<h1 class="h2"><%= title %></h1>

<%= form_with model: @form, url: { action: :update }, local: true, method: "put", builder: VitaMinFormBuilder do |f| %>
<div class="white-group">
<fieldset class="tight-checkboxes">
<legend class="form-question" style="margin-bottom: 3rem;"><%= t('.label') %></legend>
<div class="input-group--block">
<%= f.fields_for :dependents do |ff| %>
<% dependent = ff.object %>
<%= ff.cfa_checkbox(
:nj_did_not_have_health_insurance,
dependent.full_name,
options: { checked_value: "yes", unchecked_value: "no" }
) %>
<% end %>
</div>
</fieldset>
</div>

<p class="text--italic"><%= t('.continue') %></p>
<div class="reveal">
<button class="reveal__button"><%= t('.coverage_heading') %></button>
<div class="reveal__content">
<%= t('state_file.general.nj_minimal_essential_health_coverage_html') %>
</div>
</div>

<%= f.continue %>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,29 @@

<%= form_with model: @form, url: { action: :update }, local: true, method: "put", builder: VitaMinFormBuilder do |f| %>
<div class="white-group">
<div class="form-group question-with-follow-up">
<div class="question-with-follow-up__question">
<%= f.cfa_radio_set(
:eligibility_all_members_health_insurance,
label_text: t(".label", filing_year: @filing_year),
collection: [
{ value: "yes", label: t("general.affirmative") },
{
value: "no",
label: t("general.negative"),
input_html: {
"data-follow-up": "#household-members",
"aria-controls": "household-members"
}
},
],
) %>
<div class="form-group">
<%= f.cfa_radio_set(
:eligibility_all_members_health_insurance,
label_text: t(".label", filing_year: @filing_year),
collection: [
{ value: "yes", label: t("general.affirmative") },
{
value: "no",
label: t("general.negative"),
input_html: {
"data-follow-up": "#household-members",
"aria-controls": "household-members"
}
},
],
) %>
</div>

<% if current_intake.dependents.any? %>
<div class="form-group question-with-follow-up__follow-up grey-group" id="household-members">
<fieldset class="form-group tight-checkboxes">
<legend class="form-question not-centered"><%= t('.label_follow_up') %></legend>
<div class="input-group--block">
<%= f.fields_for :dependents do |ff| %>
<% dependent = ff.object %>
<%= ff.cfa_checkbox(
:nj_did_not_have_health_insurance,
t(".dependent_label", name: dependent.full_name),
options: { checked_value: "yes", unchecked_value: "no" }
) %>
<% end %>
</div>
</fieldset>
</div>
<% end %>
</div>
</div>

<div class="reveal">
<button class="reveal__button"><%= t('.coverage_heading') %></button>
<div class="reveal__content">
<p><%= t('.coverage_description_html') %></p>
<%= t('state_file.general.nj_minimal_essential_health_coverage_html') %>
</div>
</div>

Expand Down
Loading

0 comments on commit df54a83

Please sign in to comment.