diff --git a/app/lib/navigation/state_file_nj_question_navigation.rb b/app/lib/navigation/state_file_nj_question_navigation.rb index 6eb4bbd5e5..c214ad7b6d 100644 --- a/app/lib/navigation/state_file_nj_question_navigation.rb +++ b/app/lib/navigation/state_file_nj_question_navigation.rb @@ -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), diff --git a/app/lib/pdf_filler/nj1040_pdf.rb b/app/lib/pdf_filler/nj1040_pdf.rb index b9ee337a0d..e0039dcb2a 100644 --- a/app/lib/pdf_filler/nj1040_pdf.rb +++ b/app/lib/pdf_filler/nj1040_pdf.rb @@ -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 diff --git a/app/views/state_file/questions/nj_primary_state_id/_nj_primary.html.erb b/app/views/state_file/questions/nj_primary_state_id/_nj_primary.html.erb new file mode 100644 index 0000000000..75ca9460f6 --- /dev/null +++ b/app/views/state_file/questions/nj_primary_state_id/_nj_primary.html.erb @@ -0,0 +1,24 @@ +<% content_for :info_box do %> +
+

+
+
+

+ <%= t('.protect_identity') %> +

+

+ <%= t('.not_required') %> +

+
+
+
+<% end %> + +<% content_for :card do %> +

<%= t(".title") %>

+

<%= t(".subtitle") %>

+ <%= 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 %> diff --git a/app/views/state_file/questions/nj_spouse_state_id/_nj_spouse.html.erb b/app/views/state_file/questions/nj_spouse_state_id/_nj_spouse.html.erb new file mode 100644 index 0000000000..eaa3fed961 --- /dev/null +++ b/app/views/state_file/questions/nj_spouse_state_id/_nj_spouse.html.erb @@ -0,0 +1,24 @@ +<% content_for :info_box do %> +
+

+
+
+

+ <%= t('.protect_identity') %> +

+

+ <%= t('.not_required') %> +

+
+
+
+<% end %> + +<% content_for :card do %> +

<%= t(".title") %>

+

<%= t(".subtitle") %>

+ <%= render 'state_file/questions/primary_state_id/state_id', options: { + dmv_bmv_label: t(".dmv_bmv"), + no_id_label: t(".no_id") + } %> +<% end %> diff --git a/app/views/state_file/questions/primary_state_id/_state_id.html.erb b/app/views/state_file/questions/primary_state_id/_state_id.html.erb index fb78f9b6bf..aa065bb1ca 100644 --- a/app/views/state_file/questions/primary_state_id/_state_id.html.erb +++ b/app/views/state_file/questions/primary_state_id/_state_id.html.erb @@ -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")) }, ] ) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 9a5d1889e4..b112f2d5e1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 @@ -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) diff --git a/config/locales/es.yml b/config/locales/es.yml index 4065002ee3..e714ac6500 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -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 @@ -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.) diff --git a/spec/features/state_file/complete_intake_spec.rb b/spec/features/state_file/complete_intake_spec.rb index 1acb43c515..f8e7d9a77f 100644 --- a/spec/features/state_file/complete_intake_spec.rb +++ b/spec/features/state_file/complete_intake_spec.rb @@ -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" diff --git a/spec/lib/pdf_filler/nj1040_pdf_spec.rb b/spec/lib/pdf_filler/nj1040_pdf_spec.rb index 8e3b5d815a..6a6c042419 100644 --- a/spec/lib/pdf_filler/nj1040_pdf_spec.rb +++ b/spec/lib/pdf_filler/nj1040_pdf_spec.rb @@ -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 \ No newline at end of file +end