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 122 driver license #5045

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions app/lib/navigation/state_file_nj_question_navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class StateFileNjQuestionNavigation < Navigation::StateFileBaseQuestionNavigatio
Navigation::NavigationStep.new(StateFile::Questions::NjEstimatedTaxPaymentsController),
Navigation::NavigationStep.new(StateFile::Questions::NjSalesUseTaxController),
Navigation::NavigationStep.new(StateFile::Questions::NjGubernatorialElectionsController),
Navigation::NavigationStep.new(StateFile::Questions::PrimaryStateIdController),
Navigation::NavigationStep.new(StateFile::Questions::SpouseStateIdController),
Navigation::NavigationStep.new(StateFile::Questions::TaxesOwedController),
Navigation::NavigationStep.new(StateFile::Questions::TaxRefundController),
Navigation::NavigationStep.new(StateFile::Questions::NjReviewController),
Expand Down
25 changes: 25 additions & 0 deletions app/lib/pdf_filler/nj1040_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,31 @@ def hash_for_pdf
"undefined_162",
]))
end

# Driver License/State ID
id_number_xml = @xml_document.at("PrimDrvrLcnsOrStateIssdIdGrp DrvrLcnsNum") ||
@xml_document.at("PrimDrvrLcnsOrStateIssdIdGrp StateIssdIdNum")
if id_number_xml.present?
id_number = id_number_xml&.text
answers.merge!({
"Drivers License Number Voluntary Instructions page 44": id_number[0],
Text246: id_number[1],
Text247: id_number[2],
Text248: id_number[3],
Text249: id_number[4],
Text250: id_number[5],
Text251: id_number[6],
Text252: id_number[7],
Text253: id_number[8],
Text254: id_number[9],
Text255: id_number[10],
Text256: id_number[11],
Text257: id_number[12],
Text258: id_number[13],
Text259: id_number[14]
})
end

answers
end

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<% content_for :info_box do %>
<div class="reveal">
<p><button href="#" class="reveal__button"><%= t(".why_ask_this") %></button></p>
<div class="reveal__content">
<div>
<p>
<%= t('.protect_identity') %>
</p>
<p>
<%= t('.not_required') %>
</p>
</div>
</div>
</div>
<% end %>

<% content_for :card do %>
<h1 class="h2"><%= t(".title") %></h1>
<p> <%= t(".subtitle") %></p>
<%= render 'state_file/questions/primary_state_id/state_id', options: {
dmv_bmv_label: t(".dmv_bmv"), # mismatch is known; holding off on refactoring enum name at CFA's request
no_id_label: t(".no_id")
} %>
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<% content_for :info_box do %>
<div class="reveal">
<p><button href="#" class="reveal__button"><%= t(".why_ask_this") %></button></p>
<div class="reveal__content">
<div>
<p>
<%= t('.protect_identity') %>
</p>
<p>
<%= t('.not_required') %>
</p>
</div>
</div>
</div>
<% end %>

<% content_for :card do %>
<h1 class="h2"><%= t(".title") %></h1>
<p> <%= t(".subtitle") %></p>
<%= render 'state_file/questions/primary_state_id/state_id', options: {
dmv_bmv_label: t(".dmv_bmv"),
no_id_label: t(".no_id")
} %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
:id_type,
collection: [
{ value: :driver_license, label: t("state_file.questions.primary_state_id.state_id.id_type_question.drivers_license"), input_html: { "data-follow-up": "#id-details-fields" } },
{ value: :dmv_bmv, label: t("state_file.questions.primary_state_id.state_id.id_type_question.dmv"), input_html: { "data-follow-up": "#id-details-fields" } },
{ value: :no_id, label: t("state_file.questions.primary_state_id.state_id.id_type_question.no_id") },
{ value: :dmv_bmv, label: (options[:dmv_bmv_label] || t("state_file.questions.primary_state_id.state_id.id_type_question.dmv")), input_html: { "data-follow-up": "#id-details-fields" } },
{ value: :no_id, label: (options[:no_id_label] || t("state_file.questions.primary_state_id.state_id.id_type_question.no_id")) },
]
)
%>
Expand Down
18 changes: 18 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,15 @@ en:
helper_heading: The place where I live is not listed
municipality: Municipality
title: Select the municipality where you lived on December 31, %{filing_year}
nj_primary_state_id:
nj_primary:
dmv_bmv: Non-driver identification card
no_id: No driver's license or state ID / Prefer not to share
not_required: You do NOT need to supply this information to file your taxes. The return will not be rejected if you do not have ID or prefer not to share.
protect_identity: Many state revenue agencies, including New Jersey, are requesting additional information in an effort to combat stolen-identity tax fraud and to protect you and your tax refund. Providing some details about your state-issued identification will help identify you as the taxpayer.
subtitle: Details from your state-issued ID, if you have one, will help New Jersey combat stolen-identity tax fraud and protect you and your tax refund.
title: Confirming Your Identity (Optional)
why_ask_this: Why are you asking for this information?
nj_review:
edit:
amount: Amount
Expand Down Expand Up @@ -3024,6 +3033,15 @@ en:
use_tax_method_automated: All of my purchases were less than $1000 each. Calculate the amount of use tax for me.
use_tax_method_manual: I had an untaxed purchase over $1000, or I would prefer to calculate my use tax manually.
use_tax_radio_label: Did you have any untaxed out-of-state purchases?
nj_spouse_state_id:
nj_spouse:
dmv_bmv: Non-driver identification card
no_id: No driver's license or state ID / Prefer not to share
not_required: You do NOT need to supply this information to file your taxes. The return will not be rejected if you do not have ID or prefer not to share.
protect_identity: To protect your identity and combat tax fraud, many state agencies are asking people to give their driver's license or state ID number.
subtitle: Details from your spouse's state-issued ID, if they have one, would also help.
title: Confirming Your Spouse's Identity (Optional)
why_ask_this: Why are you asking for this information?
nj_tenant_eligibility:
edit:
helper_description: I was a tenant in a tax-exempt property (e.g.,subsidized and campus housing, property owned by nonprofit organizations, residence on which P.I.L.O.T. payments were made)
Expand Down
18 changes: 18 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2959,6 +2959,15 @@ es:
helper_heading: El lugar donde vivo no está en la lista
municipality: Municipio
title: Seleccione el municipio donde residía el 31 de diciembre de %{filing_year}
nj_primary_state_id:
nj_primary:
dmv_bmv: Non-driver identification card
no_id: No driver's license or state ID / Prefer not to share
not_required: You do NOT need to supply this information to file your taxes. The return will not be rejected if you do not have ID or prefer not to share.
protect_identity: Many state revenue agencies, including New Jersey, are requesting additional information in an effort to combat stolen-identity tax fraud and to protect you and your tax refund. Providing some details about your state-issued identification will help identify you as the taxpayer.
subtitle: Details from your state-issued ID, if you have one, will help New Jersey combat stolen-identity tax fraud and protect you and your tax refund.
title: Confirming Your Identity (Optional)
why_ask_this: Why are you asking for this information?
nj_review:
edit:
amount: Cantidad
Expand Down Expand Up @@ -2997,6 +3006,15 @@ es:
use_tax_method_automated: Todas mis compras fueron de menos de $1000 cada una. Calcule el monto del impuesto al consumo para mí.
use_tax_method_manual: Hice una compra no gravada por más de $1000 o preferiría calcular mi impuesto sobre el uso manualmente.
use_tax_radio_label: "¿Realizó alguna compra fuera del estado que no pagó impuestos?"
nj_spouse_state_id:
nj_spouse:
dmv_bmv: Non-driver identification card
no_id: No driver's license or state ID / Prefer not to share
not_required: You do NOT need to supply this information to file your taxes. The return will not be rejected if you do not have ID or prefer not to share.
protect_identity: To protect your identity and combat tax fraud, many state agencies are asking people to give their driver's license or state ID number.
subtitle: Details from your spouse's state-issued ID, if they have one, would also help.
title: Confirming Your Spouse's Identity (Optional)
why_ask_this: Why are you asking for this information?
nj_tenant_eligibility:
edit:
helper_description: Fui inquilino de una propiedad exenta de impuestos (por ejemplo, vivienda subsidiada y en el campus, propiedad de organizaciones sin fines de lucro, residencia en la que se realizaron pagos P.I.L.O.T.)
Expand Down
5 changes: 5 additions & 0 deletions spec/features/state_file/complete_intake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,11 @@
expect(page).to be_axe_clean.within "main"
click_on I18n.t("general.continue")

# Driver License
choose I18n.t('state_file.questions.nj_primary_state_id.nj_primary.no_id')
expect(page).to be_axe_clean.within "main"
click_on I18n.t("general.continue")

# Review
expect(page).to have_text I18n.t("state_file.questions.shared.review_header.title")
expect(page).to be_axe_clean.within "main"
Expand Down
70 changes: 69 additions & 1 deletion spec/lib/pdf_filler/nj1040_pdf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1967,5 +1967,73 @@
end
end
end

describe "driver license/ID number" do
context "primary ID not given" do
it "leaves all boxes blank" do
expect(pdf_fields["Drivers License Number Voluntary Instructions page 44"]).to eq ""
expect(pdf_fields["Text246"]).to eq ""
expect(pdf_fields["Text247"]).to eq ""
expect(pdf_fields["Text248"]).to eq ""
expect(pdf_fields["Text249"]).to eq ""
expect(pdf_fields["Text250"]).to eq ""
expect(pdf_fields["Text251"]).to eq ""
expect(pdf_fields["Text252"]).to eq ""
expect(pdf_fields["Text253"]).to eq ""
expect(pdf_fields["Text254"]).to eq ""
expect(pdf_fields["Text255"]).to eq ""
expect(pdf_fields["Text256"]).to eq ""
expect(pdf_fields["Text257"]).to eq ""
expect(pdf_fields["Text258"]).to eq ""
expect(pdf_fields["Text259"]).to eq ""
end
end

context "primary ID is state issued ID" do
let(:state_id) { create(:state_id, :state_issued_id)}
let(:intake) { create(:state_file_nj_intake, primary_state_id: state_id) }

it "fills in the ID number" do
expect(pdf_fields["Drivers License Number Voluntary Instructions page 44"]).to eq "1"
expect(pdf_fields["Text246"]).to eq "2"
expect(pdf_fields["Text247"]).to eq "3"
expect(pdf_fields["Text248"]).to eq "4"
expect(pdf_fields["Text249"]).to eq "5"
expect(pdf_fields["Text250"]).to eq "6"
expect(pdf_fields["Text251"]).to eq "7"
expect(pdf_fields["Text252"]).to eq "8"
expect(pdf_fields["Text253"]).to eq "9"
expect(pdf_fields["Text254"]).to eq ""
expect(pdf_fields["Text255"]).to eq ""
expect(pdf_fields["Text256"]).to eq ""
expect(pdf_fields["Text257"]).to eq ""
expect(pdf_fields["Text258"]).to eq ""
expect(pdf_fields["Text259"]).to eq ""
end
end

context "primary ID is driver license" do
let(:state_id) { create(:state_id)}
let(:intake) { create(:state_file_nj_intake, primary_state_id: state_id) }

it "fills in the ID number" do
expect(pdf_fields["Drivers License Number Voluntary Instructions page 44"]).to eq "1"
expect(pdf_fields["Text246"]).to eq "2"
expect(pdf_fields["Text247"]).to eq "3"
expect(pdf_fields["Text248"]).to eq "4"
expect(pdf_fields["Text249"]).to eq "5"
expect(pdf_fields["Text250"]).to eq "6"
expect(pdf_fields["Text251"]).to eq "7"
expect(pdf_fields["Text252"]).to eq "8"
expect(pdf_fields["Text253"]).to eq "9"
expect(pdf_fields["Text254"]).to eq ""
expect(pdf_fields["Text255"]).to eq ""
expect(pdf_fields["Text256"]).to eq ""
expect(pdf_fields["Text257"]).to eq ""
expect(pdf_fields["Text258"]).to eq ""
expect(pdf_fields["Text259"]).to eq ""
end
end
end
end
end
end