Skip to content
Open
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
1 change: 1 addition & 0 deletions app/assets/images/questions/vehicle-credit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions app/controllers/questions/vehicle_credit_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Questions
class VehicleCreditController < QuestionsController
include AuthenticatedClientConcern

layout "yes_no_question"

private

def method_name
"new_vehicle_purchased"
end
end
end
7 changes: 5 additions & 2 deletions app/forms/hub/update_13614c_form_page3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class Update13614cFormPage3 < Form
:cv_last_years_return_available_cb,
:cv_14c_page_3_notes_part_1,
:cv_14c_page_3_notes_part_2,
:cv_14c_page_3_notes_part_3
:cv_14c_page_3_notes_part_3,
:new_vehicle_purchased,
:vin_number

attr_accessor :client

Expand All @@ -74,7 +76,8 @@ def attributes_for(model)
:cv_last_years_refund_applied_to_this_yr_amt,
:cv_14c_page_3_notes_part_1,
:cv_14c_page_3_notes_part_2,
:cv_14c_page_3_notes_part_3]
:cv_14c_page_3_notes_part_3,
:vin_number]
self.class.scoped_attributes[model].reduce({}) do |hash, attribute_name|
v = send(attribute_name)
unless skip.include? attribute_name
Expand Down
7 changes: 7 additions & 0 deletions app/forms/vehicle_credit_form.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class VehicleCreditForm < QuestionsForm
set_attributes_for :intake, :new_vehicle_purchased

def save
@intake.update(attributes_for(:intake))
end
end
1 change: 1 addition & 0 deletions app/lib/navigation/gyr_question_navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class GyrQuestionNavigation
Questions::TaxCreditDisallowedController,
Questions::EstimatedTaxPaymentsController,
Questions::SelfEmploymentLossController,
Questions::VehicleCreditController,
Questions::EnergyEfficientPurchasesController, # sets 'completed_yes_no_questions_at'
# generate and replace the "Preliminary" 13614-C signed by the primary and spouse with yes/no questions filled out

Expand Down
3 changes: 3 additions & 0 deletions app/lib/pdf_filler/f13614c_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def hash_for_pdf
"form1[0].page3[0].followingHappenDuring[0].energyEfficientItems[0].energyEfficientItems[0]" => @intake.bought_energy_efficient_items_yes?,
"form1[0].page3[0].followingHappenDuring[0].forgaveByLender[0].forgaveByLender[0]" => @intake.had_debt_forgiven_yes?,
"form1[0].page3[0].followingHappenDuring[0].lossRelatedDisaster[0]" => @intake.had_disaster_loss_yes?,
"form1[0].page3[0].followingHappenDuring[0].otherPurchase[0]" => @intake.new_vehicle_purchased_yes?,
"form1[0].page3[0].followingHappenDuring[0].taxCreditDisallowed[0].taxCreditDisallowed[0]" => @intake.had_tax_credit_disallowed_yes?,
"form1[0].page3[0].followingHappenDuring[0].receivedLetterBill[0]" => @intake.received_irs_letter_yes?,
"form1[0].page3[0].followingHappenDuring[0].estimatedTaxPayments[0].estimatedTaxPayments[0]" => @intake.made_estimated_tax_payments_yes?,
Expand Down Expand Up @@ -277,6 +278,8 @@ def hash_for_pdf

# page 3 rhs section 3 of 3
'form1[0].page3[0].informationToReport[0].taxableScholarshipIncome[0]' => bool_checkbox(@intake.cv_taxable_scholarship_income_cb_yes?),
'form1[0].page3[0].informationToReport[0].vinNumber[0].numberVIN[0]' => bool_checkbox(@intake.vin_number.present?),
'form1[0].page3[0].informationToReport[0].vinNumber[0].vinNumber[0]' => @intake.vin_number,
'form1[0].page3[0].informationToReport[0].form1098T[0]' => bool_checkbox(@intake.cv_1098t_cb_yes?),
'form1[0].page3[0].informationToReport[0].educationCreditTuition[0]' => bool_checkbox(@intake.cv_edu_credit_or_tuition_deduction_cb_yes?),
'form1[0].page3[0].informationToReport[0].saleOfHome[0]' => bool_checkbox(@intake.cv_1099s_cb_yes?),
Expand Down
2 changes: 2 additions & 0 deletions app/models/intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
# needs_help_previous_year_2 :integer default(0), not null
# needs_help_previous_year_3 :integer default(0), not null
# needs_to_flush_searchable_data_set_at :datetime
# new_vehicle_purchased :integer default(0)
# no_eligibility_checks_apply :integer default(0), not null
# no_ssn :integer default(0), not null
# not_full_time_student :integer default(0), not null
Expand Down Expand Up @@ -343,6 +344,7 @@
# usps_address_late_verification_attempts :integer default(0)
# usps_address_verified_at :datetime
# viewed_at_capacity :boolean default(FALSE)
# vin_number :string
# wants_to_itemize :integer default(0), not null
# was_blind :integer default(0), not null
# was_full_time_student :integer default(0), not null
Expand Down
2 changes: 2 additions & 0 deletions app/models/intake/ctc_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
# needs_help_previous_year_2 :integer default(0), not null
# needs_help_previous_year_3 :integer default(0), not null
# needs_to_flush_searchable_data_set_at :datetime
# new_vehicle_purchased :integer default(0)
# no_eligibility_checks_apply :integer default(0), not null
# no_ssn :integer default(0), not null
# not_full_time_student :integer default("unfilled"), not null
Expand Down Expand Up @@ -343,6 +344,7 @@
# usps_address_late_verification_attempts :integer default(0)
# usps_address_verified_at :datetime
# viewed_at_capacity :boolean default(FALSE)
# vin_number :string
# wants_to_itemize :integer default(0), not null
# was_blind :integer default("unfilled"), not null
# was_full_time_student :integer default(0), not null
Expand Down
3 changes: 3 additions & 0 deletions app/models/intake/gyr_intake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
# needs_help_previous_year_2 :integer default("unfilled"), not null
# needs_help_previous_year_3 :integer default("unfilled"), not null
# needs_to_flush_searchable_data_set_at :datetime
# new_vehicle_purchased :integer default("unfilled")
# no_eligibility_checks_apply :integer default("unfilled"), not null
# no_ssn :integer default("unfilled"), not null
# not_full_time_student :integer default(0), not null
Expand Down Expand Up @@ -343,6 +344,7 @@
# usps_address_late_verification_attempts :integer default(0)
# usps_address_verified_at :datetime
# viewed_at_capacity :boolean default(FALSE)
# vin_number :string
# wants_to_itemize :integer default("unfilled"), not null
# was_blind :integer default("unfilled"), not null
# was_full_time_student :integer default("unfilled"), not null
Expand Down Expand Up @@ -525,6 +527,7 @@ class Intake::GyrIntake < Intake
enum receive_written_communication: { unfilled: 0, yes: 1, no: 2 }, _prefix: :receive_written_communication
enum presidential_campaign_fund_donation: { unfilled: 0, primary: 1, spouse: 2, primary_and_spouse: 3, no: 4 }, _prefix: :presidential_campaign_fund_donation
enum register_to_vote: { unfilled: 0, yes: 1, no: 2 }, _prefix: :register_to_vote
enum new_vehicle_purchased: { unfilled: 0, yes: 1, no: 2, unsure: 3 }, _prefix: :new_vehicle_purchased
enum cv_1098_cb: { unfilled: 0, yes: 1, no: 2 }, _prefix: :cv_1098_cb
enum cv_med_expense_standard_deduction_cb: { unfilled: 0, yes: 1, no: 2 }, _prefix: :cv_med_expense_standard_deduction_cb
enum cv_med_expense_itemized_deduction_cb: { unfilled: 0, yes: 1, no: 2 }, _prefix: :cv_med_expense_itemized_deduction_cb
Expand Down
13 changes: 12 additions & 1 deletion app/views/hub/clients/edit_13614c_form_page3.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,18 @@
windows, furnace, insulation, etc.)", yes_no_options_for_select) %>
</div>
<div class="grid__item width-one-half" style="background-color:#e5e5e5; padding: 10px; display: flex; align-items: flex-start; justify-content: space-between;">
<%= f.cfa_select(:cv_energy_efficient_home_improv_credit_cb, "(B) Energy efficient home improvement credits", yes_no_options_for_select) %>
<%= f.cfa_select(:cv_energy_efficient_home_improv_credit_cb, "(A) Energy efficient home improvement credit (Form 5695, Part II only)", yes_no_options_for_select) %>
</div>
</div>
<hr style="margin: 5px;"/>

<!-- VEHICLE PURCHASED INFO HERE -->
<div class="grid">
<div class="grid__item width-one-half" style="display: flex; align-items: flex-start; justify-content: space-between;">
<%= f.cfa_select(:new_vehicle_purchased, "(A) Other (example: purchased a new vehicle, etc.)", yes_no_options_for_select) %>
</div>
<div class="grid__item width-one-half" style="background-color:#e5e5e5; padding: 10px; display: flex; align-items: flex-start; justify-content: space-between;">
<%= f.cfa_input_field(:vin_number, "VIN #", classes: ["form-width--short"], options: { maxlength: 17 }) %>
</div>
</div>
<hr style="margin: 5px;"/>
Expand Down
3 changes: 3 additions & 0 deletions app/views/questions/vehicle_credit/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<% content_for :form_question, t("views.questions.vehicle_credit.title", :year => current_intake.most_recent_filing_year, :count => current_intake.filer_count)%>

<% content_for :form_help_text, t("views.questions.vehicle_credit.body") %>
5 changes: 5 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5905,6 +5905,11 @@ en:
title:
one: Have you had the Earned Income Credit, Child Tax Credit, American Opportunity Credit, or Head of Household filing status disallowed in a prior year?
other: Have you or your spouse had the Earned Income Credit, Child Tax Credit, American Opportunity Credit, or Head of Household filing status disallowed in a prior year?
vehicle_credit:
body: If you purchased a vehicle assembled in the US, you may be eligible for a tax credit! Your tax preparer will collect your VIN number to confirm if you qualify.
title:
one: Did you purchase a new vehicle in %{year}?
other: Did you or your spouse purchase a new vehicle in %{year}?
verification:
body: 'A message with your code has been sent to:'
error_message: Incorrect verification code.
Expand Down
5 changes: 5 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5927,6 +5927,11 @@ es:
many: "¿Ha tenido usted o su pareja el crédito por ingreso del trabajo, el crédito tributario por hijos, el crédito por oportunidad estadounidense o el estado civil de cabeza de familia rechazado en un año anterior?"
one: "¿Ha sido rechazado en el año anterior el Crédito por Ingreso del Trabajo, el Crédito Tributario por Hijos, el Crédito por Oportunidad Estadounidense o el estado civil de Jefe de Familia?"
other: "¿Ha tenido usted o su pareja el crédito por ingreso del trabajo, el crédito tributario por hijos, el crédito por oportunidad estadounidense o el estado civil de cabeza de familia rechazado en un año anterior?"
vehicle_credit:
body: Si compró un vehículo ensamblado en Estados Unidos, es posible que califique para un crédito fiscal. La persona que prepare sus impuestos usará el número VIN para confirmar si califica.
title:
one: "¿Compró usted un vehículo nuevo en %{year}?"
other: "¿Usted o su cónyuge compraron un vehículo nuevo en %{year}?"
verification:
body: 'Se le ha enviado un mensaje con su código a:'
error_message: El código de verificación es incorrecto
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddNewVehiclePurchasedToIntakes < ActiveRecord::Migration[7.1]
def change
add_column :intakes, :new_vehicle_purchased, :integer, default: 0
add_column :intakes, :vin_number, :string
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: 2025_11_19_181821) do
ActiveRecord::Schema[7.1].define(version: 2025_12_01_215441) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "plpgsql"
Expand Down Expand Up @@ -1367,6 +1367,7 @@
t.integer "needs_help_previous_year_2", default: 0, null: false
t.integer "needs_help_previous_year_3", default: 0, null: false
t.datetime "needs_to_flush_searchable_data_set_at", precision: nil
t.integer "new_vehicle_purchased", default: 0
t.integer "no_eligibility_checks_apply", default: 0, null: false
t.integer "no_ssn", default: 0, null: false
t.integer "not_full_time_student", default: 0, null: false
Expand Down Expand Up @@ -1494,6 +1495,7 @@
t.integer "usps_address_late_verification_attempts", default: 0
t.datetime "usps_address_verified_at"
t.boolean "viewed_at_capacity", default: false
t.string "vin_number"
t.string "visitor_id"
t.bigint "vita_partner_id"
t.integer "wants_to_itemize", default: 0, null: false
Expand Down
9 changes: 7 additions & 2 deletions spec/controllers/hub/clients_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,9 @@
commit: I18n.t('general.save'),
hub_update13614c_form_page3: {
bought_energy_efficient_items: "unfilled",
tax_credit_disallowed_year: "2001"
tax_credit_disallowed_year: "2001",
new_vehicle_purchased: "yes",
vin_number: "123456",
}
}
}
Expand All @@ -2082,7 +2084,10 @@
system_note = SystemNote::ClientChange.last
expect(system_note.client).to eq(client)
expect(system_note.user).to eq(user)
expect(system_note.data['changes']).to match({"bought_energy_efficient_items"=>[nil, "unfilled"], "tax_credit_disallowed_year"=>[nil, 2001]})
expect(system_note.data['changes']).to match({"bought_energy_efficient_items" => [nil, "unfilled"],
"tax_credit_disallowed_year" => [nil, 2001],
"new_vehicle_purchased" => ["unfilled", "yes"],
"vin_number" => [nil, "123456"]})
expect(client.last_13614c_update_at).to be_within(1.second).of(DateTime.now)
end

Expand Down
7 changes: 7 additions & 0 deletions spec/features/web_intake/new_joint_filers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ def intake_up_to_documents(backtax_year_offsets: [0, 2])
click_on "Yes"
end

page_change_block do
screenshot_after do
expect(page).to have_selector("h1", text: "Did you or your spouse purchase a new vehicle in #{current_tax_year}?")
end
click_on "Yes"
end

page_change_block do
screenshot_after do
expect(page).to have_selector("h1", text: "In #{current_tax_year}, did you or your spouse purchase energy efficient home items?")
Expand Down
5 changes: 5 additions & 0 deletions spec/features/web_intake/new_single_filer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ def intake_after_triage_up_to_documents(intake)
click_on "No"
end

page_change_block do
expect(page).to have_selector("h1", text: "Did you purchase a new vehicle in #{current_tax_year}?")
click_on "Yes"
end

page_change_block do
expect(page).to have_selector("h1", text: "In #{current_tax_year}, did you purchase energy efficient home items?")
click_on "Yes"
Expand Down
5 changes: 5 additions & 0 deletions spec/lib/pdf_filler/f13614c_pdf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
made_estimated_tax_payments_amount: 0,
married: "yes",
multiple_states: "yes",
new_vehicle_purchased: "yes",
had_other_income: "yes",
other_income_types: "garden gnoming",
paid_alimony: "yes",
Expand Down Expand Up @@ -130,6 +131,7 @@
state: "nj",
street_address: "789 Garden Green Ln",
tax_credit_disallowed_year: 2018,
vin_number: "123456",
wants_to_itemize: "yes",
was_blind: "no",
was_full_time_student: "no",
Expand Down Expand Up @@ -529,6 +531,7 @@
"form1[0].page3[0].followingHappenDuring[0].forgaveByLender[0].forgaveByLender[0]" => "1",
"form1[0].page3[0].followingHappenDuring[0].healthSavingsAccount[0]" => "Off",
"form1[0].page3[0].followingHappenDuring[0].lossRelatedDisaster[0]" => "1",
"form1[0].page3[0].followingHappenDuring[0].otherPurchase[0]" => "1",
"form1[0].page3[0].followingHappenDuring[0].purchaseMarketplaceInsurance[0]" => "1",
"form1[0].page3[0].followingHappenDuring[0].receivedLetterBill[0]" => "Off",
"form1[0].page3[0].followingHappenDuring[0].sellAHome[0]" => "Off",
Expand All @@ -555,6 +558,8 @@
"form1[0].page3[0].informationToReport[0].lastYearsRefund[0].refundAmount[0]" => "",
"form1[0].page3[0].informationToReport[0].saleOfHome[0]" => "",
"form1[0].page3[0].informationToReport[0].taxableScholarshipIncome[0]" => "",
"form1[0].page3[0].informationToReport[0].vinNumber[0].numberVIN[0]" => "1",
"form1[0].page3[0].informationToReport[0].vinNumber[0].vinNumber[0]" => "123456",
"form1[0].page3[0].paidExpenses[0].alimonyPayments[0]" => "1",
"form1[0].page3[0].paidExpenses[0].childDependentCare[0]" => "Off",
"form1[0].page3[0].paidExpenses[0].contributionsRetirementAccount[0]" => "Off",
Expand Down
Loading
Loading