Browse Source

CLDC-4184: Use the standard question hash function

pull/3221/head
samyou-softwire 2 months ago
parent
commit
14b2dfdd09
  1. 2
      app/models/form/sales/questions/address_line1.rb
  2. 2
      app/models/form/sales/questions/address_search.rb
  3. 2
      app/models/form/sales/questions/age1.rb
  4. 2
      app/models/form/sales/questions/age2.rb
  5. 2
      app/models/form/sales/questions/armed_forces.rb
  6. 2
      app/models/form/sales/questions/armed_forces_spouse.rb
  7. 2
      app/models/form/sales/questions/building_height_class.rb
  8. 2
      app/models/form/sales/questions/buyer1_age_known.rb
  9. 2
      app/models/form/sales/questions/buyer1_ethnic_background_arab.rb
  10. 2
      app/models/form/sales/questions/buyer1_ethnic_background_asian.rb
  11. 2
      app/models/form/sales/questions/buyer1_ethnic_background_black.rb
  12. 2
      app/models/form/sales/questions/buyer1_ethnic_background_mixed.rb
  13. 2
      app/models/form/sales/questions/buyer1_ethnic_background_white.rb
  14. 2
      app/models/form/sales/questions/buyer1_ethnic_group.rb
  15. 2
      app/models/form/sales/questions/buyer1_income.rb
  16. 2
      app/models/form/sales/questions/buyer1_income_known.rb
  17. 2
      app/models/form/sales/questions/buyer1_live_in_property.rb
  18. 2
      app/models/form/sales/questions/buyer1_mortgage.rb
  19. 2
      app/models/form/sales/questions/buyer1_nationality.rb
  20. 2
      app/models/form/sales/questions/buyer1_previous_tenure.rb
  21. 2
      app/models/form/sales/questions/buyer1_working_situation.rb
  22. 2
      app/models/form/sales/questions/buyer2_age_known.rb
  23. 2
      app/models/form/sales/questions/buyer2_ethnic_background_arab.rb
  24. 2
      app/models/form/sales/questions/buyer2_ethnic_background_asian.rb
  25. 2
      app/models/form/sales/questions/buyer2_ethnic_background_black.rb
  26. 2
      app/models/form/sales/questions/buyer2_ethnic_background_mixed.rb
  27. 2
      app/models/form/sales/questions/buyer2_ethnic_background_white.rb
  28. 2
      app/models/form/sales/questions/buyer2_ethnic_group.rb
  29. 2
      app/models/form/sales/questions/buyer2_income.rb
  30. 2
      app/models/form/sales/questions/buyer2_income_known.rb
  31. 2
      app/models/form/sales/questions/buyer2_live_in_property.rb
  32. 2
      app/models/form/sales/questions/buyer2_living_in.rb
  33. 2
      app/models/form/sales/questions/buyer2_mortgage.rb
  34. 2
      app/models/form/sales/questions/buyer2_nationality.rb
  35. 2
      app/models/form/sales/questions/buyer2_relationship_to_buyer1.rb
  36. 2
      app/models/form/sales/questions/buyer2_relationship_to_buyer1_yes_no.rb
  37. 2
      app/models/form/sales/questions/buyer2_working_situation.rb
  38. 2
      app/models/form/sales/questions/buyer_company.rb
  39. 2
      app/models/form/sales/questions/buyer_interview.rb
  40. 2
      app/models/form/sales/questions/buyer_live.rb
  41. 2
      app/models/form/sales/questions/buyer_previous.rb
  42. 2
      app/models/form/sales/questions/buyer_still_serving.rb
  43. 2
      app/models/form/sales/questions/buyers_organisations.rb
  44. 2
      app/models/form/sales/questions/county.rb
  45. 2
      app/models/form/sales/questions/deposit_discount.rb
  46. 2
      app/models/form/sales/questions/discount.rb
  47. 2
      app/models/form/sales/questions/discounted_ownership_type.rb
  48. 2
      app/models/form/sales/questions/exchange_date.rb
  49. 2
      app/models/form/sales/questions/fromprop.rb
  50. 2
      app/models/form/sales/questions/gender_identity1.rb
  51. 2
      app/models/form/sales/questions/gender_identity2.rb
  52. 2
      app/models/form/sales/questions/grant.rb
  53. 2
      app/models/form/sales/questions/handover_date.rb
  54. 2
      app/models/form/sales/questions/has_management_fee.rb
  55. 2
      app/models/form/sales/questions/has_service_charges_changed.rb
  56. 2
      app/models/form/sales/questions/household_disability.rb
  57. 2
      app/models/form/sales/questions/household_wheelchair.rb
  58. 2
      app/models/form/sales/questions/housing_benefits.rb
  59. 2
      app/models/form/sales/questions/joint_purchase.rb
  60. 2
      app/models/form/sales/questions/la_nominations.rb
  61. 2
      app/models/form/sales/questions/management_fee.rb
  62. 2
      app/models/form/sales/questions/managing_organisation.rb
  63. 2
      app/models/form/sales/questions/monthly_rent.rb
  64. 2
      app/models/form/sales/questions/monthly_rent_after_staircasing.rb
  65. 2
      app/models/form/sales/questions/monthly_rent_before_staircasing.rb
  66. 2
      app/models/form/sales/questions/new_service_charges.rb
  67. 2
      app/models/form/sales/questions/number_joint_buyers.rb
  68. 2
      app/models/form/sales/questions/number_of_others_in_property.rb
  69. 2
      app/models/form/sales/questions/other_ownership_type.rb
  70. 2
      app/models/form/sales/questions/outright_ownership_type.rb
  71. 2
      app/models/form/sales/questions/ownership_scheme.rb
  72. 2
      app/models/form/sales/questions/owning_organisation_id.rb
  73. 2
      app/models/form/sales/questions/postcode_for_full_address.rb
  74. 2
      app/models/form/sales/questions/previous_bedrooms.rb
  75. 2
      app/models/form/sales/questions/previous_la_known.rb
  76. 2
      app/models/form/sales/questions/previous_postcode.rb
  77. 2
      app/models/form/sales/questions/previous_postcode_known.rb
  78. 2
      app/models/form/sales/questions/previous_tenure.rb
  79. 2
      app/models/form/sales/questions/previous_tenure_buyer2.rb
  80. 2
      app/models/form/sales/questions/prevloc.rb
  81. 2
      app/models/form/sales/questions/prevown.rb
  82. 2
      app/models/form/sales/questions/prevshared.rb
  83. 2
      app/models/form/sales/questions/privacy_notice.rb
  84. 2
      app/models/form/sales/questions/property_building_type.rb
  85. 2
      app/models/form/sales/questions/property_local_authority.rb
  86. 2
      app/models/form/sales/questions/property_number_of_bedrooms.rb
  87. 2
      app/models/form/sales/questions/property_unit_type.rb
  88. 2
      app/models/form/sales/questions/property_wheelchair_accessible.rb
  89. 2
      app/models/form/sales/questions/purchaser_code.rb
  90. 2
      app/models/form/sales/questions/resale.rb
  91. 2
      app/models/form/sales/questions/sale_date.rb
  92. 2
      app/models/form/sales/questions/savings.rb
  93. 2
      app/models/form/sales/questions/savings_nk.rb
  94. 2
      app/models/form/sales/questions/sex_registered_at_birth1.rb
  95. 2
      app/models/form/sales/questions/sex_registered_at_birth2.rb
  96. 2
      app/models/form/sales/questions/shared_ownership_type.rb
  97. 2
      app/models/form/sales/questions/staircase.rb
  98. 2
      app/models/form/sales/questions/staircase_bought.rb
  99. 2
      app/models/form/sales/questions/staircase_count.rb
  100. 2
      app/models/form/sales/questions/staircase_first_time.rb
  101. Some files were not shown because too many files have changed in this diff Show More

2
app/models/form/sales/questions/address_line1.rb

@ -7,7 +7,7 @@ class Form::Sales::Questions::AddressLine1 < ::Form::Question
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@hide_question_number_on_page = true @hide_question_number_on_page = true
end end

2
app/models/form/sales/questions/address_search.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::AddressSearch < ::Form::Question
@copy_key = "sales.property_information.address_search" @copy_key = "sales.property_information.address_search"
@plain_label = true @plain_label = true
@bottom_guidance_partial = "address_search" @bottom_guidance_partial = "address_search"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@hide_question_number_on_page = true @hide_question_number_on_page = true
end end

2
app/models/form/sales/questions/age1.rb

@ -19,7 +19,7 @@ class Form::Sales::Questions::Age1 < ::Form::Question
@min = 16 @min = 16
@max = 110 @max = 110
@step = 1 @step = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 20, 2024 => 22, 2025 => 20, 2026 => 21 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 20, 2024 => 22, 2025 => 20, 2026 => 21 }.freeze

2
app/models/form/sales/questions/age2.rb

@ -13,7 +13,7 @@ class Form::Sales::Questions::Age2 < ::Form::Question
@max = 110 @max = 110
@min = 16 @min = 16
@step = 1 @step = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 28, 2024 => 30, 2025 => 28, 2026 => 30 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 28, 2024 => 30, 2025 => 28, 2026 => 30 }.freeze

2
app/models/form/sales/questions/armed_forces.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::ArmedForces < ::Form::Question
@id = "hhregres" @id = "hhregres"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/armed_forces_spouse.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::ArmedForcesSpouse < ::Form::Question
@id = "armedforcesspouse" @id = "armedforcesspouse"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/building_height_class.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::BuildingHeightClass < ::Form::Question
@id = "buildheightclass" @id = "buildheightclass"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_age_known.rb

@ -22,7 +22,7 @@ class Form::Sales::Questions::Buyer1AgeKnown < ::Form::Question
], ],
} }
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_ethnic_background_arab.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundArab < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_ethnic_background_asian.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundAsian < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_ethnic_background_black.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundBlack < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_ethnic_background_mixed.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundMixed < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_ethnic_background_white.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundWhite < ::Form::Question
@copy_key = "sales.household_characteristics.ethnic.ethnic_background_white" @copy_key = "sales.household_characteristics.ethnic.ethnic_background_white"
@type = "radio" @type = "radio"
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/buyer1_ethnic_group.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer1EthnicGroup < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_income.rb

@ -10,7 +10,7 @@ class Form::Sales::Questions::Buyer1Income < ::Form::Question
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/buyer1_income_known.rb

@ -9,7 +9,7 @@ class Form::Sales::Questions::Buyer1IncomeKnown < ::Form::Question
"income1" => [0], "income1" => [0],
} }
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@hidden_in_check_answers = { @hidden_in_check_answers = {
"depends_on" => [ "depends_on" => [
{ {

2
app/models/form/sales/questions/buyer1_live_in_property.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer1LiveInProperty < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_mortgage.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer1Mortgage < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_nationality.rb

@ -11,7 +11,7 @@ class Form::Sales::Questions::Buyer1Nationality < ::Form::Question
}, },
"value" => "Prefers not to say", "value" => "Prefers not to say",
}] }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer1_previous_tenure.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::Buyer1PreviousTenure < ::Form::Question
@id = "prevten" @id = "prevten"
@type = "radio" @type = "radio"
@answer_options = answer_options @answer_options = answer_options
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/buyer1_working_situation.rb

@ -11,7 +11,7 @@ class Form::Sales::Questions::Buyer1WorkingSituation < ::Form::Question
}, },
"value" => "Prefers not to say", "value" => "Prefers not to say",
}] }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/buyer2_age_known.rb

@ -19,7 +19,7 @@ class Form::Sales::Questions::Buyer2AgeKnown < ::Form::Question
], ],
} }
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_ethnic_background_arab.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer2EthnicBackgroundArab < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_ethnic_background_asian.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer2EthnicBackgroundAsian < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_ethnic_background_black.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer2EthnicBackgroundBlack < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_ethnic_background_mixed.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::Buyer2EthnicBackgroundMixed < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_ethnic_background_white.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer2EthnicBackgroundWhite < ::Form::Question
@copy_key = "sales.household_characteristics.ethnicbuy2.ethnic_background_white" @copy_key = "sales.household_characteristics.ethnicbuy2.ethnic_background_white"
@type = "radio" @type = "radio"
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/buyer2_ethnic_group.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer2EthnicGroup < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_income.rb

@ -10,7 +10,7 @@ class Form::Sales::Questions::Buyer2Income < ::Form::Question
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/buyer2_income_known.rb

@ -9,7 +9,7 @@ class Form::Sales::Questions::Buyer2IncomeKnown < ::Form::Question
"income2" => [0], "income2" => [0],
} }
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@hidden_in_check_answers = { @hidden_in_check_answers = {
"depends_on" => [ "depends_on" => [
{ {

2
app/models/form/sales/questions/buyer2_live_in_property.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer2LiveInProperty < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_living_in.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::Buyer2LivingIn < ::Form::Question
@id = "buy2living" @id = "buy2living"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_mortgage.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer2Mortgage < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer2_nationality.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Buyer2Nationality < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@inferred_check_answers_value = [{ @inferred_check_answers_value = [{
"condition" => { "condition" => {
"national" => 13, "national" => 13,

2
app/models/form/sales/questions/buyer2_relationship_to_buyer1.rb

@ -12,7 +12,7 @@ class Form::Sales::Questions::Buyer2RelationshipToBuyer1 < ::Form::Question
}, },
"value" => "Prefers not to say", "value" => "Prefers not to say",
}] }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/buyer2_relationship_to_buyer1_yes_no.rb

@ -16,7 +16,7 @@ class Form::Sales::Questions::Buyer2RelationshipToBuyer1YesNo < ::Form::Question
"value" => "Prefers not to say", "value" => "Prefers not to say",
}] }]
@check_answers_card_number = 2 @check_answers_card_number = 2
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2025 => 27, 2026 => 29 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2025 => 27, 2026 => 29 }.freeze

2
app/models/form/sales/questions/buyer2_working_situation.rb

@ -12,7 +12,7 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question
}, },
"value" => "Prefers not to say", "value" => "Prefers not to say",
}] }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def displayed_answer_options(_log, _user = nil) def displayed_answer_options(_log, _user = nil)

2
app/models/form/sales/questions/buyer_company.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::BuyerCompany < ::Form::Question
@id = "companybuy" @id = "companybuy"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer_interview.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::BuyerInterview < ::Form::Question
@copy_key = "sales.#{subsection.copy_key}.noint.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}" @copy_key = "sales.#{subsection.copy_key}.noint.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer_live.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::BuyerLive < ::Form::Question
@id = "buylivein" @id = "buylivein"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer_previous.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::BuyerPrevious < ::Form::Question
@copy_key = "sales.sale_information.soctenant.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}" @copy_key = "sales.sale_information.soctenant.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyer_still_serving.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::BuyerStillServing < ::Form::Question
@id = "hhregresstill" @id = "hhregresstill"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/buyers_organisations.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::BuyersOrganisations < ::Form::Question
@id = "buyers_organisations" @id = "buyers_organisations"
@type = "checkbox" @type = "checkbox"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/county.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::County < ::Form::Question
@type = "text" @type = "text"
@plain_label = true @plain_label = true
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@hide_question_number_on_page = true @hide_question_number_on_page = true
end end

2
app/models/form/sales/questions/deposit_discount.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::DepositDiscount < ::Form::Question
@step = 1 @step = 1
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@top_guidance_partial = "financial_calculations_shared_ownership" @top_guidance_partial = "financial_calculations_shared_ownership"
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/discount.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::Discount < ::Form::Question
@step = 0.1 @step = 0.1
@width = 5 @width = 5
@suffix = "%" @suffix = "%"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@top_guidance_partial = "financial_calculations_discounted_ownership" @top_guidance_partial = "financial_calculations_discounted_ownership"
end end

2
app/models/form/sales/questions/discounted_ownership_type.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::DiscountedOwnershipType < ::Form::Question
@type = "radio" @type = "radio"
@top_guidance_partial = guidance_partial @top_guidance_partial = guidance_partial
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/exchange_date.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::ExchangeDate < ::Form::Question
@id = "exdate" @id = "exdate"
@copy_key = "sales.sale_information.exchange_date" @copy_key = "sales.sale_information.exchange_date"
@type = "date" @type = "date"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 81, 2024 => 83 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 81, 2024 => 83 }.freeze

2
app/models/form/sales/questions/fromprop.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Fromprop < ::Form::Question
@type = "radio" @type = "radio"
@page = page @page = page
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/gender_identity1.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::GenderIdentity1 < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/gender_identity2.rb

@ -12,7 +12,7 @@ class Form::Sales::Questions::GenderIdentity2 < ::Form::Question
}, },
"value" => "Prefers not to say", "value" => "Prefers not to say",
}] }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/grant.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::Grant < ::Form::Question
@step = 1 @step = 1
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@top_guidance_partial = "financial_calculations_discounted_ownership" @top_guidance_partial = "financial_calculations_discounted_ownership"
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/handover_date.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::HandoverDate < ::Form::Question
@id = "hodate" @id = "hodate"
@copy_key = "sales.sale_information.handover_date" @copy_key = "sales.sale_information.handover_date"
@type = "date" @type = "date"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 82, 2024 => 84, 2025 => 76, 2026 => 84 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 82, 2024 => 84, 2025 => 76, 2026 => 84 }.freeze

2
app/models/form/sales/questions/has_management_fee.rb

@ -15,7 +15,7 @@ class Form::Sales::Questions::HasManagementFee < ::Form::Question
}, },
], ],
} }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/has_service_charges_changed.rb

@ -15,7 +15,7 @@ class Form::Sales::Questions::HasServiceChargesChanged < ::Form::Question
], ],
} }
@copy_key = "sales.sale_information.servicecharges_changed.has_service_charges_changed" @copy_key = "sales.sale_information.servicecharges_changed.has_service_charges_changed"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/household_disability.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::HouseholdDisability < ::Form::Question
@id = "disabled" @id = "disabled"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/household_wheelchair.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::HouseholdWheelchair < ::Form::Question
@id = "wheel" @id = "wheel"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/housing_benefits.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::HousingBenefits < ::Form::Question
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_title = "All buyers" if form.start_year_2026_or_later? @check_answers_card_title = "All buyers" if form.start_year_2026_or_later?
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/joint_purchase.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::JointPurchase < ::Form::Question
@id = "jointpur" @id = "jointpur"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/la_nominations.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::LaNominations < ::Form::Question
@copy_key = "sales.sale_information.la_nominations" @copy_key = "sales.sale_information.la_nominations"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/management_fee.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::ManagementFee < ::Form::Question
@step = 0.01 @step = 0.01
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/managing_organisation.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::ManagingOrganisation < ::Form::Question
@id = "managing_organisation_id" @id = "managing_organisation_id"
@derived = true @derived = true
@type = "select" @type = "select"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options(log = nil, user = nil) def answer_options(log = nil, user = nil)

2
app/models/form/sales/questions/monthly_rent.rb

@ -7,7 +7,7 @@ class Form::Sales::Questions::MonthlyRent < ::Form::Question
@step = 0.01 @step = 0.01
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/monthly_rent_after_staircasing.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::MonthlyRentAfterStaircasing < ::Form::Question
@step = 0.01 @step = 0.01
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/monthly_rent_before_staircasing.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::MonthlyRentBeforeStaircasing < ::Form::Question
@step = 0.01 @step = 0.01
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/new_service_charges.rb

@ -9,7 +9,7 @@ class Form::Sales::Questions::NewServiceCharges < ::Form::Question
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@copy_key = "sales.sale_information.servicecharges_changed.new_service_charges" @copy_key = "sales.sale_information.servicecharges_changed.new_service_charges"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/number_joint_buyers.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::NumberJointBuyers < ::Form::Question
@id = "jointmore" @id = "jointmore"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/number_of_others_in_property.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::NumberOfOthersInProperty < ::Form::Question
@min = 0 @min = 0
@max = 15 @max = 15
@step = 1 @step = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 37, 2025 => 35, 2026 => 38 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 35, 2024 => 37, 2025 => 35, 2026 => 38 }.freeze

2
app/models/form/sales/questions/other_ownership_type.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::OtherOwnershipType < ::Form::Question
@copy_key = "sales.setup.type.outright_ownership.othtype" @copy_key = "sales.setup.type.outright_ownership.othtype"
@type = "text" @type = "text"
@width = 10 @width = 10
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 6, 2024 => 8 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 6, 2024 => 8 }.freeze

2
app/models/form/sales/questions/outright_ownership_type.rb

@ -9,7 +9,7 @@ class Form::Sales::Questions::OutrightOwnershipType < ::Form::Question
@conditional_for = { @conditional_for = {
"othtype" => [12], "othtype" => [12],
} }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/ownership_scheme.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::OwnershipScheme < ::Form::Question
super super
@id = "ownershipsch" @id = "ownershipsch"
@type = "radio" @type = "radio"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/owning_organisation_id.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::OwningOrganisationId < ::Form::Question
@id = "owning_organisation_id" @id = "owning_organisation_id"
@derived = true @derived = true
@type = "select" @type = "select"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options(log = nil, user = nil) def answer_options(log = nil, user = nil)

2
app/models/form/sales/questions/postcode_for_full_address.rb

@ -18,7 +18,7 @@ class Form::Sales::Questions::PostcodeForFullAddress < ::Form::Question
} }
@plain_label = true @plain_label = true
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@hide_question_number_on_page = true @hide_question_number_on_page = true
@bottom_guidance_partial = "address_fallback" @bottom_guidance_partial = "address_fallback"
end end

2
app/models/form/sales/questions/previous_bedrooms.rb

@ -7,7 +7,7 @@ class Form::Sales::Questions::PreviousBedrooms < ::Form::Question
@min = 1 @min = 1
@max = 6 @max = 6
@step = 1 @step = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 86, 2025 => 77, 2026 => 85 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 85, 2024 => 86, 2025 => 77, 2026 => 85 }.freeze

2
app/models/form/sales/questions/previous_la_known.rb

@ -18,7 +18,7 @@ class Form::Sales::Questions::PreviousLaKnown < ::Form::Question
@conditional_for = { @conditional_for = {
"prevloc" => [1], "prevloc" => [1],
} }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end

2
app/models/form/sales/questions/previous_postcode.rb

@ -16,7 +16,7 @@ class Form::Sales::Questions::PreviousPostcode < ::Form::Question
"is_previous_la_inferred" => true, "is_previous_la_inferred" => true,
}, },
} }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end

2
app/models/form/sales/questions/previous_postcode_known.rb

@ -18,7 +18,7 @@ class Form::Sales::Questions::PreviousPostcodeKnown < ::Form::Question
}, },
], ],
} }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end

2
app/models/form/sales/questions/previous_tenure.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::PreviousTenure < ::Form::Question
@type = "radio" @type = "radio"
@page = page @page = page
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/previous_tenure_buyer2.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::PreviousTenureBuyer2 < ::Form::Question
@id = "prevtenbuy2" @id = "prevtenbuy2"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/prevloc.rb

@ -10,7 +10,7 @@ class Form::Sales::Questions::Prevloc < ::Form::Question
}, },
"value" => "Not known", "value" => "Not known",
}] }]
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end

2
app/models/form/sales/questions/prevown.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Prevown < ::Form::Question
@copy_key = "sales.income_benefits_and_savings.prevown.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}" @copy_key = "sales.income_benefits_and_savings.prevown.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/prevshared.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::Prevshared < ::Form::Question
@id = "prevshared" @id = "prevshared"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/privacy_notice.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::PrivacyNotice < ::Form::Question
@id = "privacynotice" @id = "privacynotice"
@copy_key = "sales.#{subsection.copy_key}.privacynotice.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}" @copy_key = "sales.#{subsection.copy_key}.privacynotice.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@type = "checkbox" @type = "checkbox"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@joint_purchase = joint_purchase @joint_purchase = joint_purchase
@top_guidance_partial = guidance @top_guidance_partial = guidance
end end

2
app/models/form/sales/questions/property_building_type.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::PropertyBuildingType < ::Form::Question
@copy_key = "sales.property_information.builtype" @copy_key = "sales.property_information.builtype"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/property_local_authority.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::PropertyLocalAuthority < ::Form::Question
super super
@id = "la" @id = "la"
@type = "select" @type = "select"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@disable_clearing_if_not_routed_or_dynamic_answer_options = true @disable_clearing_if_not_routed_or_dynamic_answer_options = true
end end

2
app/models/form/sales/questions/property_number_of_bedrooms.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::PropertyNumberOfBedrooms < ::Form::Question
@min = 1 @min = 1
@max = 9 @max = 9
@step = 1 @step = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 11, 2024 => 18, 2025 => 17, 2026 => 18 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 11, 2024 => 18, 2025 => 17, 2026 => 18 }.freeze

2
app/models/form/sales/questions/property_unit_type.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::PropertyUnitType < ::Form::Question
@copy_key = "sales.property_information.proptype" @copy_key = "sales.property_information.proptype"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/property_wheelchair_accessible.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::PropertyWheelchairAccessible < ::Form::Question
@copy_key = "sales.property_information.wchair" @copy_key = "sales.property_information.wchair"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/purchaser_code.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::PurchaserCode < ::Form::Question
@id = "purchid" @id = "purchid"
@type = "text" @type = "text"
@width = 10 @width = 10
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 2, 2024 => 4, 2025 => 4, 2026 => 4 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 2, 2024 => 4, 2025 => 4, 2026 => 4 }.freeze

2
app/models/form/sales/questions/resale.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::Resale < ::Form::Question
@id = "resale" @id = "resale"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/sale_date.rb

@ -3,7 +3,7 @@ class Form::Sales::Questions::SaleDate < ::Form::Question
super super
@id = "saledate" @id = "saledate"
@type = "date" @type = "date"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2023 => 1, 2024 => 3, 2025 => 3, 2026 => 3 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2023 => 1, 2024 => 3, 2025 => 3, 2026 => 3 }.freeze

2
app/models/form/sales/questions/savings.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::Savings < ::Form::Question
@prefix = "£" @prefix = "£"
@step = 10 @step = 10
@min = 0 @min = 0
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@strip_commas = true @strip_commas = true
end end

2
app/models/form/sales/questions/savings_nk.rb

@ -15,7 +15,7 @@ class Form::Sales::Questions::SavingsNk < ::Form::Question
}, },
], ],
} }
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/sex_registered_at_birth1.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::SexRegisteredAtBirth1 < ::Form::Question
@type = "radio" @type = "radio"
@check_answers_card_number = 1 @check_answers_card_number = 1
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/sex_registered_at_birth2.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::SexRegisteredAtBirth2 < ::Form::Question
@copy_key = "sales.household_characteristics.sexrab2.buyer" @copy_key = "sales.household_characteristics.sexrab2.buyer"
@check_answers_card_number = 2 @check_answers_card_number = 2
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

2
app/models/form/sales/questions/shared_ownership_type.rb

@ -6,7 +6,7 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
@top_guidance_partial = "shared_ownership_type_definitions" @top_guidance_partial = "shared_ownership_type_definitions"
@type = "radio" @type = "radio"
@answer_options = answer_options @answer_options = answer_options
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/staircase.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::Staircase < ::Form::Question
@id = "staircase" @id = "staircase"
@copy_key = "sales.#{page.subsection.copy_key}.staircasing" @copy_key = "sales.#{page.subsection.copy_key}.staircasing"
@type = "radio" @type = "radio"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
def answer_options def answer_options

2
app/models/form/sales/questions/staircase_bought.rb

@ -9,7 +9,7 @@ class Form::Sales::Questions::StaircaseBought < ::Form::Question
@max = 100 @max = 100
@step = 0.1 @step = 0.1
@suffix = "%" @suffix = "%"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
@top_guidance_partial = "financial_calculations_shared_ownership" @top_guidance_partial = "financial_calculations_shared_ownership"
end end

2
app/models/form/sales/questions/staircase_count.rb

@ -8,7 +8,7 @@ class Form::Sales::Questions::StaircaseCount < ::Form::Question
@min = 2 @min = 2
@max = 10 @max = 10
@step = 1 @step = 1
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
QUESTION_NUMBER_FROM_YEAR = { 2025 => 94, 2026 => 102 }.freeze QUESTION_NUMBER_FROM_YEAR = { 2025 => 94, 2026 => 102 }.freeze

2
app/models/form/sales/questions/staircase_first_time.rb

@ -4,7 +4,7 @@ class Form::Sales::Questions::StaircaseFirstTime < ::Form::Question
@id = "firststair" @id = "firststair"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = get_question_number_from_hash(QUESTION_NUMBER_FROM_YEAR)
end end
ANSWER_OPTIONS = { ANSWER_OPTIONS = {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save