From 2d639e45a65d965515df225848e64d663e97e3a0 Mon Sep 17 00:00:00 2001 From: Kevin Diale Date: Wed, 6 Nov 2024 11:52:44 -0600 Subject: [PATCH 1/2] Fyst 789/add child credit xml pdf (#4903) Adds XML and PDF renditions of child care credit. --- .../state_file/questions/df_return_sample.xml | 65 +++++++++++++- app/lib/efile/id/id39_r_calculator.rb | 11 +++ app/lib/efile/id/id40_calculator.rb | 3 +- app/lib/efile/id/id_39r_calculator.rb | 29 +++++++ app/lib/efile/line_data.yml | 2 + app/lib/pdf_filler/id39r_pdf.rb | 11 +-- .../ty2024/states/id/documents/id39_r.rb | 3 +- .../ty2024/states/id/documents/id40.rb | 3 +- .../ty2024/states/id/id_return_xml.rb | 2 +- app/models/direct_file_data.rb | 17 +++- .../questions/md_county/edit.html.erb | 2 +- doc/created.rid | 0 .../2023/id/john_mfj_8_deps.xml | 63 +++++++++++++- spec/lib/efile/id/id39_r_calculator_spec.rb | 74 +++++++++++++++- spec/lib/pdf_filler/id39r_pdf_spec.rb | 84 ++++++++++++++++++- .../ty2024/states/id/documents/id39_r_spec.rb | 69 ++++++++++++++- .../ty2024/states/id/id_return_xml_spec.rb | 2 +- 17 files changed, 419 insertions(+), 21 deletions(-) create mode 100644 app/lib/efile/id/id_39r_calculator.rb create mode 100644 doc/created.rid diff --git a/app/controllers/state_file/questions/df_return_sample.xml b/app/controllers/state_file/questions/df_return_sample.xml index 30cb31887f..324f307aae 100644 --- a/app/controllers/state_file/questions/df_return_sample.xml +++ b/app/controllers/state_file/questions/df_return_sample.xml @@ -71,7 +71,68 @@ - + + + + Mrs + Doubtfire + + DOUB + + 543 + Great Falls + ME + 40332 + + 111111111 + false + 2000 + + + + Uno + testerface + + TEST + 222001111 + + + + Duo + testerface + + TEST + 123001234 + 2000 + + 2000 + 50000 + 50000 + 2000 + 50000 + 0.20 + 400 + 400 + 3193 + 400 + 2000 + 2000 + 2000 + 2000 + 48000 + 48000 + 2000 + 5000 + 2000 + 2000 + 0 + 6000 + 2000 + 4000 + 2000 + 2000 + + 4 false X @@ -259,4 +320,4 @@ S - \ No newline at end of file + diff --git a/app/lib/efile/id/id39_r_calculator.rb b/app/lib/efile/id/id39_r_calculator.rb index a398298200..03078bed7c 100644 --- a/app/lib/efile/id/id39_r_calculator.rb +++ b/app/lib/efile/id/id39_r_calculator.rb @@ -7,11 +7,13 @@ def initialize(value_access_tracker:, lines:, intake:) @value_access_tracker = value_access_tracker @lines = lines @intake = intake + @direct_file_data = intake.direct_file_data @direct_file_json_data = intake.direct_file_json_data end def calculate set_line(:ID39R_B_LINE_3, :calculate_sec_b_line_3) + set_line(:ID39R_B_LINE_6, :calculate_sec_b_line_6) set_line(:ID39R_B_LINE_18, :calculate_sec_b_line_18) @lines.transform_values(&:value) end @@ -27,6 +29,15 @@ def calculate_sec_b_line_3 sum.round end + def calculate_sec_b_line_6 + [ + @direct_file_data.total_qualifying_dependent_care_expenses, + [12_000 - @direct_file_data.excluded_benefits_amount, 0].max, + @direct_file_data.primary_earned_income_amount, + @direct_file_data.spouse_earned_income_amount, + ].min + end + def calculate_sec_b_line_18 @intake.has_health_insurance_premium_yes? ? @intake.health_insurance_paid_amount&.round : 0 end diff --git a/app/lib/efile/id/id40_calculator.rb b/app/lib/efile/id/id40_calculator.rb index 1e5ae95bf0..c85263c1b2 100644 --- a/app/lib/efile/id/id40_calculator.rb +++ b/app/lib/efile/id/id40_calculator.rb @@ -8,11 +8,12 @@ def initialize(year:, intake:, include_source: false) @id39r = Efile::Id::Id39RCalculator.new( value_access_tracker: @value_access_tracker, lines: @lines, - intake: @intake + intake: @intake, ) end def calculate + @id39r.calculate set_line(:ID40_LINE_6A, :calculate_line_6a) set_line(:ID40_LINE_6B, :calculate_line_6b) set_line(:ID40_LINE_6C, :calculate_line_6c) diff --git a/app/lib/efile/id/id_39r_calculator.rb b/app/lib/efile/id/id_39r_calculator.rb new file mode 100644 index 0000000000..a6e5be2c10 --- /dev/null +++ b/app/lib/efile/id/id_39r_calculator.rb @@ -0,0 +1,29 @@ +module Efile + module Id + class Id39rCalculator < ::Efile::TaxCalculator + attr_reader :lines + + def initialize(value_access_tracker:, lines:, intake:, year:) + super(intake: intake, year: year) + + @value_access_tracker = value_access_tracker + @lines = lines + @intake = intake + @direct_file_data = intake.direct_file_data + end + + def calculate + set_line(:ID39R_B_LINE_6, :calculate_line_b_6) + end + + def calculate_line_b_6 + [ + @direct_file_data.total_qualifying_dependent_care_expenses, + [12_000 - @direct_file_data.excluded_benefits_amount, 0].max, + @direct_file_data.primary_earned_income_amount, + @direct_file_data.spouse_earned_income_amount, + ].min + end + end + end +end diff --git a/app/lib/efile/line_data.yml b/app/lib/efile/line_data.yml index 3a48da3e51..2933ff92fa 100644 --- a/app/lib/efile/line_data.yml +++ b/app/lib/efile/line_data.yml @@ -166,6 +166,8 @@ NYC_EIC_RATE_WK_LINE_5: label: 'Enter the decimal from the NYC EIC rate table.' NYC_EIC_RATE_WK_LINE_6: label: 'Subtract line 4 from line 5 or enter the decimal from the NYC EIC rate table. Also enter on Worksheet C, line 2.' +ID39R_B_LINE_6: + label: 'Child/dependent care. Complete worksheet on page 30, and include federal Form 2441' ID39R_B_LINE_3: label: 'Interest from U.S. government obligations' ID39R_B_LINE_18: diff --git a/app/lib/pdf_filler/id39r_pdf.rb b/app/lib/pdf_filler/id39r_pdf.rb index 36a7d49e08..79b2ef88fc 100644 --- a/app/lib/pdf_filler/id39r_pdf.rb +++ b/app/lib/pdf_filler/id39r_pdf.rb @@ -16,18 +16,19 @@ def initialize(submission) def hash_for_pdf answers = { + "BL6" => @xml_document.at('Form39R ChildCareCreditAmt')&.text, "BL3" => @xml_document.at('IncomeUSObligations')&.text, "BL18" => @xml_document.at('HealthInsurancePaid')&.text, } @submission.data_source.dependents.drop(4).first(3).each_with_index do |dependent, index| answers.merge!( - "FR#{index+1}FirstName" => dependent.first_name, - "FR#{index+1}LastName" => dependent.last_name, - "FR#{index+1}SSN" => dependent.ssn, - "FR#{index+1}Birthdate" => dependent.dob.strftime('%m/%d/%Y'), + "FR#{index + 1}FirstName" => dependent.first_name, + "FR#{index + 1}LastName" => dependent.last_name, + "FR#{index + 1}SSN" => dependent.ssn, + "FR#{index + 1}Birthdate" => dependent.dob.strftime('%m/%d/%Y'), ) end answers end end -end \ No newline at end of file +end diff --git a/app/lib/submission_builder/ty2024/states/id/documents/id39_r.rb b/app/lib/submission_builder/ty2024/states/id/documents/id39_r.rb index db83388300..5662d3ae0f 100644 --- a/app/lib/submission_builder/ty2024/states/id/documents/id39_r.rb +++ b/app/lib/submission_builder/ty2024/states/id/documents/id39_r.rb @@ -9,6 +9,7 @@ class Id39R < SubmissionBuilder::Document def document build_xml_doc("Form39R") do |xml| xml.IncomeUSObligations calculated_fields.fetch(:ID39R_B_LINE_3) + xml.ChildCareCreditAmt calculated_fields.fetch(:ID39R_B_LINE_6) xml.HealthInsurancePaid calculated_fields.fetch(:ID39R_B_LINE_18) end end @@ -22,4 +23,4 @@ def calculated_fields end end end -end \ No newline at end of file +end diff --git a/app/lib/submission_builder/ty2024/states/id/documents/id40.rb b/app/lib/submission_builder/ty2024/states/id/documents/id40.rb index 10dbbd48ff..6854e28b6e 100644 --- a/app/lib/submission_builder/ty2024/states/id/documents/id40.rb +++ b/app/lib/submission_builder/ty2024/states/id/documents/id40.rb @@ -37,6 +37,7 @@ def document end private + def filing_status FILING_STATUS_OPTIONS[@submission.data_source.filing_status] end @@ -49,4 +50,4 @@ def calculated_fields end end end -end \ No newline at end of file +end diff --git a/app/lib/submission_builder/ty2024/states/id/id_return_xml.rb b/app/lib/submission_builder/ty2024/states/id/id_return_xml.rb index 25ab1d6f9d..86f3aedb8a 100644 --- a/app/lib/submission_builder/ty2024/states/id/id_return_xml.rb +++ b/app/lib/submission_builder/ty2024/states/id/id_return_xml.rb @@ -58,4 +58,4 @@ def supported_documents end end end -end \ No newline at end of file +end diff --git a/app/models/direct_file_data.rb b/app/models/direct_file_data.rb index 7f581adf85..e1d517f8b2 100644 --- a/app/models/direct_file_data.rb +++ b/app/models/direct_file_data.rb @@ -70,6 +70,9 @@ class DirectFileData < DfXmlAccessor primary_blind: 'IRS1040 PrimaryBlindInd', spouse_blind: 'IRS1040 SpouseBlindInd', qualifying_children_under_age_ssn_count: 'IRS1040Schedule8812 QlfyChildUnderAgeSSNCnt', + excluded_benefits_amount: 'IRS2441 ExcludedBenefitsAmt', + primary_earned_income_amount: 'IRS2441 PrimaryEarnedIncomeAmt', + spouse_earned_income_amount: 'IRS2441 SpouseEarnedIncomeAmt', spouse_claimed_dependent: 'IRS1040 SpouseClaimAsDependentInd', total_qualifying_dependent_care_expenses: 'IRS2441 TotalQlfdExpensesOrLimitAmt' }.freeze @@ -723,6 +726,18 @@ def determine_eic_attribute(node) 'unfilled' end end + + def excluded_benefits_amount=(value) + write_df_xml_value(__method__, value) + end + + def primary_earned_income_amount=(value) + write_df_xml_value(__method__, value) + end + + def spouse_earned_income_amount=(value) + write_df_xml_value(__method__, value) + end class DfW2 < DfW2Accessor def w2_box12 @@ -854,4 +869,4 @@ def can_override?(attribute) respond_to?("#{attribute}=") end -end \ No newline at end of file +end diff --git a/app/views/state_file/questions/md_county/edit.html.erb b/app/views/state_file/questions/md_county/edit.html.erb index c87d88f854..4c11155a34 100644 --- a/app/views/state_file/questions/md_county/edit.html.erb +++ b/app/views/state_file/questions/md_county/edit.html.erb @@ -54,4 +54,4 @@ populateSubdivisions(countySelect.value); }); -<% end %> \ No newline at end of file +<% end %> diff --git a/doc/created.rid b/doc/created.rid new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/fixtures/state_file/fed_return_xmls/2023/id/john_mfj_8_deps.xml b/spec/fixtures/state_file/fed_return_xmls/2023/id/john_mfj_8_deps.xml index e2f851891b..f6396ff822 100644 --- a/spec/fixtures/state_file/fed_return_xmls/2023/id/john_mfj_8_deps.xml +++ b/spec/fixtures/state_file/fed_return_xmls/2023/id/john_mfj_8_deps.xml @@ -27,6 +27,67 @@ + + + + Mrs + Doubtfire + + DOUB + + 543 + Great Falls + ME + 40332 + + 111111111 + false + 2000 + + + + Uno + testerface + + TEST + 222001111 + + + + Duo + testerface + + TEST + 123001234 + 2000 + + 2000 + 50000 + 50000 + 2000 + 50000 + 0.20 + 400 + 400 + 3193 + 400 + 2000 + 2000 + 2000 + 2000 + 48000 + 48000 + 2000 + 5000 + 2000 + 2000 + 0 + 6000 + 2000 + 4000 + 2000 + 2000 + 2 Moira O'Hara @@ -276,4 +337,4 @@ S - \ No newline at end of file + diff --git a/spec/lib/efile/id/id39_r_calculator_spec.rb b/spec/lib/efile/id/id39_r_calculator_spec.rb index 2c9ea2a4fb..5f6d75dc27 100644 --- a/spec/lib/efile/id/id39_r_calculator_spec.rb +++ b/spec/lib/efile/id/id39_r_calculator_spec.rb @@ -29,6 +29,78 @@ end end + describe "#calculate_line_sec_b_6" do + context "when TotalQlfdExpensesOrLimitAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 200 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with qualified expenses amount' do + instance.calculate + expect(instance.lines[:ID39R_B_LINE_6].value).to eq 200 + end + end + + context "when ExcludedBenefitsAmt is least after subtracting from 12,000" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 11_800 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with excluded benefits amount' do + instance.calculate + expect(instance.lines[:ID39R_B_LINE_6].value).to eq 200 + end + end + + context "when ExcludedBenefitsAmt is greater than 12,000" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 12_800 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with excluded benefits amount' do + instance.calculate + expect(instance.lines[:ID39R_B_LINE_6].value).to eq 0 + end + end + + context "when PrimaryEarnedIncomeAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 200 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with primary earned income amount' do + instance.calculate + expect(instance.lines[:ID39R_B_LINE_6].value).to eq 200 + end + end + + context "when SpouseEarnedIncomeAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 200 + end + + it 'should expect to fill with primary earned income amount' do + instance.calculate + expect(instance.lines[:ID39R_B_LINE_6].value).to eq 200 + end + end + end + describe "Section B Line 18: Health Insurance Premium" do context "when there are health insurance premiums" do before do @@ -47,4 +119,4 @@ end end end -end \ No newline at end of file +end diff --git a/spec/lib/pdf_filler/id39r_pdf_spec.rb b/spec/lib/pdf_filler/id39r_pdf_spec.rb index b837f3b99e..5938a5bda5 100644 --- a/spec/lib/pdf_filler/id39r_pdf_spec.rb +++ b/spec/lib/pdf_filler/id39r_pdf_spec.rb @@ -4,16 +4,93 @@ include PdfSpecHelper let(:intake) { create(:state_file_id_intake) } - let(:submission) { create :efile_submission, tax_return: nil, data_source: intake } + let(:submission) { create(:efile_submission, tax_return: nil, data_source: intake) } let(:pdf) { described_class.new(submission) } + let(:file_path) { described_class.new(submission).output_file.path } + let(:pdf_fields) { filled_in_values(file_path) } + let!(:dependents) do + [ + create(:state_file_dependent, intake: intake, first_name: "Child", last_name: "One", ssn: "123456789", dob: Date.new(2010, 1, 1)), + create(:state_file_dependent, intake: intake, first_name: "Child", last_name: "Two", ssn: "987654321", dob: Date.new(2012, 2, 2)), + create(:state_file_dependent, intake: intake, first_name: "Child", last_name: "Three", ssn: "456789123", dob: Date.new(2014, 3, 3)), + create(:state_file_dependent, intake: intake, first_name: "Child", last_name: "Four", ssn: "321654987", dob: Date.new(2016, 4, 4)), + create(:state_file_dependent, intake: intake, first_name: "Child", last_name: "Five", ssn: "789123456", dob: Date.new(2018, 5, 5)) + ] + end - describe '#hash_for_pdf' do + describe "#hash_for_pdf" do let(:pdf_fields) { filled_in_values(submission.generate_filing_pdf.path) } - it 'uses field names that exist in the pdf' do missing_fields = pdf.hash_for_pdf.keys.map(&:to_s) - pdf_fields.keys expect(missing_fields).to eq([]) end + end + + describe "child care credit amount" do + context "when TotalQlfdExpensesOrLimitAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 200 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with qualified expenses amount' do + expect(pdf_fields["BL6"]).to eq "200" + end + end + + context "when ExcludedBenefitsAmt is least after subtracting from 12,000" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 11_800 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with excluded benefits amount' do + expect(pdf_fields["BL6"]).to eq "200" + end + end + + context "when ExcludedBenefitsAmt is greater than 12,000" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 12_800 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with excluded benefits amount' do + expect(pdf_fields["BL6"]).to eq "0" + end + end + + context "when PrimaryEarnedIncomeAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 200 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with primary earned income amount' do + expect(pdf_fields["BL6"]).to eq "200" + end + end + + context "when SpouseEarnedIncomeAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 200 + end + + it 'should expect to fill with primary earned income amount' do + expect(pdf_fields["BL6"]).to eq "200" + end + end context 'when there are more than 4 dependents' do let!(:dependents) do @@ -60,4 +137,3 @@ end end end - diff --git a/spec/lib/submission_builder/ty2024/states/id/documents/id39_r_spec.rb b/spec/lib/submission_builder/ty2024/states/id/documents/id39_r_spec.rb index 0afaf8d8d1..b67ac53064 100644 --- a/spec/lib/submission_builder/ty2024/states/id/documents/id39_r_spec.rb +++ b/spec/lib/submission_builder/ty2024/states/id/documents/id39_r_spec.rb @@ -14,5 +14,72 @@ expect(xml.at("HealthInsurancePaid").text).to eq "0" end end + + describe "child care credit amount" do + context "when TotalQlfdExpensesOrLimitAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 200 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with qualified expenses amount' do + expect(xml.document.at('ChildCareCreditAmt')&.text).to eq "200" + end + end + + context "when ExcludedBenefitsAmt is least after subtracting from 12,000" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 11_800 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with excluded benefits amount' do + expect(xml.document.at('ChildCareCreditAmt')&.text).to eq "200" + end + end + + context "when ExcludedBenefitsAmt is greater than 12,000" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 12_800 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with excluded benefits amount' do + expect(xml.document.at('ChildCareCreditAmt')&.text).to eq "0" + end + end + + context "when PrimaryEarnedIncomeAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 200 + intake.direct_file_data.spouse_earned_income_amount = 500 + end + + it 'should expect to fill with primary earned income amount' do + expect(xml.document.at('ChildCareCreditAmt')&.text).to eq "200" + end + end + + context "when SpouseEarnedIncomeAmt is least" do + before do + intake.direct_file_data.total_qualifying_dependent_care_expenses = 500 + intake.direct_file_data.excluded_benefits_amount = 500 + intake.direct_file_data.primary_earned_income_amount = 500 + intake.direct_file_data.spouse_earned_income_amount = 200 + end + + it 'should expect to fill with primary earned income amount' do + expect(xml.document.at('ChildCareCreditAmt')&.text).to eq "200" + end + end + end end -end \ No newline at end of file +end diff --git a/spec/lib/submission_builder/ty2024/states/id/id_return_xml_spec.rb b/spec/lib/submission_builder/ty2024/states/id/id_return_xml_spec.rb index 06f8a47c9b..679d7247fc 100644 --- a/spec/lib/submission_builder/ty2024/states/id/id_return_xml_spec.rb +++ b/spec/lib/submission_builder/ty2024/states/id/id_return_xml_spec.rb @@ -59,4 +59,4 @@ end end end -end \ No newline at end of file +end From 182cd4b6a9100815ad77ff99d577b6a1a0d08c1e Mon Sep 17 00:00:00 2001 From: Kevin Diale Date: Wed, 6 Nov 2024 14:19:21 -0600 Subject: [PATCH 2/2] Added sales / use tax for Idaho review page (#4935) Added review card for sales tax --- app/assets/stylesheets/_state-file.scss | 136 +++++++++++------- .../questions/id_review/edit.html.erb | 26 +++- config/locales/en.yml | 2 + config/locales/es.yml | 2 + 4 files changed, 108 insertions(+), 58 deletions(-) diff --git a/app/assets/stylesheets/_state-file.scss b/app/assets/stylesheets/_state-file.scss index 0b66a1b970..f4e8049293 100644 --- a/app/assets/stylesheets/_state-file.scss +++ b/app/assets/stylesheets/_state-file.scss @@ -1,50 +1,66 @@ // vietnamese @font-face { - font-family: 'Public Sans'; + font-family: "Public Sans"; font-style: normal; font-weight: 400; - src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwRs572Xtc6ZYQws9YVwnNJfJ7QwOk1Fig.woff2) format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; + src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwRs572Xtc6ZYQws9YVwnNJfJ7QwOk1Fig.woff2) + format("woff2"); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; } // latin-ext @font-face { - font-family: 'Public Sans'; + font-family: "Public Sans"; font-style: normal; font-weight: 400; - src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwRs572Xtc6ZYQws9YVwnNIfJ7QwOk1Fig.woff2) format('woff2'); - unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; + src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwRs572Xtc6ZYQws9YVwnNIfJ7QwOk1Fig.woff2) + format("woff2"); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; } // latin @font-face { - font-family: 'Public Sans'; + font-family: "Public Sans"; font-style: normal; font-weight: 400; - src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwRs572Xtc6ZYQws9YVwnNGfJ7QwOk1.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwRs572Xtc6ZYQws9YVwnNGfJ7QwOk1.woff2) + format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } // vietnamese @font-face { - font-family: 'Public Sans'; + font-family: "Public Sans"; font-style: normal; font-weight: 700; - src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwGs572Xtc6ZYQws9YVwllKVG8qX1oyOymu8Z6JywcofVotfzbj9m4.woff2) format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; + src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwGs572Xtc6ZYQws9YVwllKVG8qX1oyOymu8Z6JywcofVotfzbj9m4.woff2) + format("woff2"); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; } // latin-ext @font-face { - font-family: 'Public Sans'; + font-family: "Public Sans"; font-style: normal; font-weight: 700; - src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwGs572Xtc6ZYQws9YVwllKVG8qX1oyOymu8Z6JygcofVotfzbj9m4.woff2) format('woff2'); - unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; + src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwGs572Xtc6ZYQws9YVwllKVG8qX1oyOymu8Z6JygcofVotfzbj9m4.woff2) + format("woff2"); + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; } // latin @font-face { - font-family: 'Public Sans'; + font-family: "Public Sans"; font-style: normal; font-weight: 700; - src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwGs572Xtc6ZYQws9YVwllKVG8qX1oyOymu8Z6JxAcofVotfzbj.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + src: url(https://fonts.gstatic.com/s/publicsans/v15/ijwGs572Xtc6ZYQws9YVwllKVG8qX1oyOymu8Z6JxAcofVotfzbj.woff2) + format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } // when no us_state in the params, class will be "state-file-html-bg--" @@ -159,15 +175,15 @@ } .warning { - border: 2px solid #FFAE00; - background: #FFF2D1; + border: 2px solid #ffae00; + background: #fff2d1; padding: 1rem; } .white-group { .select { select.input-warning { - border: 2px solid #FFAE00; + border: 2px solid #ffae00; } } } @@ -210,7 +226,7 @@ width: auto; padding-left: 3.5rem; - input[type='checkbox'] { + input[type="checkbox"] { left: 0; } } @@ -224,7 +240,7 @@ min-height: auto; padding: 1rem 0 1rem 3.5rem; - input[type='radio'] { + input[type="radio"] { left: 0.5rem; top: 1.3rem; } @@ -239,7 +255,6 @@ font-weight: 400; border: 1px solid $color-state-file-input-border; padding: 0 4rem 0 1rem; - } } @@ -274,7 +289,6 @@ } .money-input-form-group { - .money-input-group { margin-bottom: 2rem; border: 1px solid $color-state-file-input-border; @@ -298,7 +312,7 @@ } } - .checkbox.is-selected{ + .checkbox.is-selected { background: white; } @@ -357,10 +371,10 @@ box-sizing: border-box; border: 2px solid #dc6565; box-shadow: 0 2px 0px rgba(0, 0, 0, 0.5); - background-color: #FFFFFF; + background-color: #ffffff; padding: 1.75rem 2.5rem; border-radius: 1rem; - color: #DC6565; + color: #dc6565; text-decoration: none; } @@ -410,11 +424,13 @@ margin-top: 0.5rem; } - .form-group, .input-group--inline { + .form-group, + .input-group--inline { margin-bottom: 0; } - .select, .text-input { + .select, + .text-input { margin-bottom: 2rem; } @@ -427,7 +443,7 @@ line-height: 1.9rem; padding: 1rem 0 1rem 3.5rem; - input[type='radio'] { + input[type="radio"] { left: 0.5rem; top: 1rem; } @@ -474,9 +490,22 @@ } } + .review-section { + .section-header { + font-size: 1.2em; + font-weight: bold; + margin: 2em 0; + } + } + .return-status { - p { text-align: center; } - img { height: 80px; width: 80px;} + p { + text-align: center; + } + img { + height: 80px; + width: 80px; + } } .info-link { @@ -548,10 +577,10 @@ a, .button, .radio-button, - .radio-button input[type='radio'], + .radio-button input[type="radio"], .select__element, .checkbox, - .checkbox input[type='checkbox'] { + .checkbox input[type="checkbox"] { box-shadow: 0 0 0 5px rgba($color-state-file-primary, 0); transition: box-shadow 0.2s ease; } @@ -560,18 +589,18 @@ a:focus, .button:focus, .button:hover, - .radio-button input[type='radio']:focus, + .radio-button input[type="radio"]:focus, .select__element:focus, - .checkbox input[type='checkbox']:focus { + .checkbox input[type="checkbox"]:focus { box-shadow: $focus-box-shadow; } - input[type='radio'] { + input[type="radio"] { accent-color: #000; } // Hack to make radio buttons black instead of green - input[type='radio']:checked:after { + input[type="radio"]:checked:after { width: 16px; height: 16px; border-radius: 15px; @@ -579,14 +608,14 @@ left: 0px; position: relative; background-color: #000; - content: ''; + content: ""; display: inline-block; visibility: visible; border: 2px solid white; } // Hack to make checkboxes black instead of green - input[type='checkbox']:checked:after { + input[type="checkbox"]:checked:after { content: " "; background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTczLjg5OCA0MzkuNDA0bC0xNjYuNC0xNjYuNGMtOS45OTctOS45OTctOS45OTctMjYuMjA2IDAtMzYuMjA0bDM2LjIwMy0zNi4yMDRjOS45OTctOS45OTggMjYuMjA3LTkuOTk4IDM2LjIwNCAwTDE5MiAzMTIuNjkgNDMyLjA5NSA3Mi41OTZjOS45OTctOS45OTcgMjYuMjA3LTkuOTk3IDM2LjIwNCAwbDM2LjIwMyAzNi4yMDRjOS45OTcgOS45OTcgOS45OTcgMjYuMjA2IDAgMzYuMjA0bC0yOTQuNCAyOTQuNDAxYy05Ljk5OCA5Ljk5Ny0yNi4yMDcgOS45OTctMzYuMjA0LS4wMDF6Ii8+PC9zdmc+); background-repeat: no-repeat; @@ -706,14 +735,14 @@ } @media screen and (max-width: $tablet-up) { .landing-page-container .fyst-home-image { - display: none + display: none; } } } .us-state-- { .button--intercom { - background: #FFF; + background: #fff; border: 2px solid $color-az-grey; color: $color-az-grey; } @@ -725,7 +754,7 @@ $state-colors: ( id: $color-id-green, nc: $color-nc-blue, nj: $color-nj-blue-darker, - md: $color-md-primary + md: $color-md-primary, ); @each $state_key, $state-color in $state-colors { @@ -749,7 +778,7 @@ $state-colors: ( } .button--intercom { - background: #FFF; + background: #fff; border: 2px solid $state-color; // icon: state primary color color: $state-color; @@ -775,9 +804,9 @@ $state-colors: ( } .loading-container { - width:100%; - display:flex; - justify-content:center; + width: 100%; + display: flex; + justify-content: center; } .state-file-html-bg--#{$state_key} { @@ -811,7 +840,8 @@ $state-colors: ( } } -.federal-info-controller-subform, .federal-info-controller-subform-section { +.federal-info-controller-subform, +.federal-info-controller-subform-section { table { td:first-child { vertical-align: middle; @@ -820,14 +850,16 @@ $state-colors: ( } } - .federal-info-controller-subform-title, .federal-info-controller-subform-section-title { + .federal-info-controller-subform-title, + .federal-info-controller-subform-section-title { padding: 5px; border-top-left-radius: 8px; border-top-right-radius: 8px; background-color: #c7c7c7; } - .federal-info-controller-subform-content, .federal-info-controller-subform-section-content { + .federal-info-controller-subform-content, + .federal-info-controller-subform-section-content { padding: 18px; border-width: 0 1px 1px 1px; border-style: dotted; @@ -850,7 +882,7 @@ $state-colors: ( } .search-container { padding-bottom: 2rem; - .hub-searchbar__input{ + .hub-searchbar__input { } } } diff --git a/app/views/state_file/questions/id_review/edit.html.erb b/app/views/state_file/questions/id_review/edit.html.erb index cc2a95c52a..fbec20a7e5 100644 --- a/app/views/state_file/questions/id_review/edit.html.erb +++ b/app/views/state_file/questions/id_review/edit.html.erb @@ -2,13 +2,27 @@ <% content_for :card do %> <%= render "state_file/questions/shared/review_header" %> -
-
-

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

-

<%=number_to_currency(current_intake.health_insurance_paid_amount || 0, precision: 2)%>

- <%= link_to t("general.edit"), StateFile::Questions::IdHealthInsurancePremiumController.to_path_helper(return_to_review: "y"), class: "button--small" %> +
+

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

+ <% if current_intake.total_purchase_amount.present? %> +
+
+

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

+

<%= number_to_currency(current_intake.total_purchase_amount) %>

+ <%= link_to t("general.edit"), StateFile::Questions::IdSalesUseTaxController.to_path_helper(return_to_review: 'y'), class: "button--small" %> +
+
+ <% end %> + +
+
+

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

+

<%=number_to_currency(current_intake.health_insurance_paid_amount || 0, precision: 2)%>

+ <%= link_to t("general.edit"), StateFile::Questions::IdHealthInsurancePremiumController.to_path_helper(return_to_review: "y"), class: "button--small" %> +
-
+ + <%= render "state_file/questions/shared/review_footer" %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8ec26b2284..8a79427fc8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2565,6 +2565,8 @@ en: id_review: edit: health_insurance_premium_title: Idaho Health Insurance Premium Subtraction + purchases_without_sales_tax: Purchases without paying sales or use tax + state_details_title: State Details id_sales_use_tax: edit: sales_tax_content: This is a tax collected at the point of sale when you buy goods within your state. diff --git a/config/locales/es.yml b/config/locales/es.yml index abf861fd04..f2f284ec35 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -2537,6 +2537,8 @@ es: id_review: edit: health_insurance_premium_title: Resta de primas de seguro médico de Idaho + purchases_without_sales_tax: Compras sin pagar impuestos sobre ventas o uso + state_details_title: Detalles del estado id_sales_use_tax: edit: sales_tax_content: Este es un impuesto que se recauda en el punto de venta cuando se compran productos dentro de su estado.