Browse Source

Extract shared ownership copy

pull/2711/head
Kat 8 months ago
parent
commit
f1bd6bb8bb
  1. 2
      app/models/form/sales/pages/about_staircase.rb
  2. 1
      app/models/form/sales/pages/buyer_previous.rb
  3. 2
      app/models/form/sales/pages/deposit.rb
  4. 2
      app/models/form/sales/pages/deposit_discount.rb
  5. 2
      app/models/form/sales/pages/equity.rb
  6. 1
      app/models/form/sales/pages/exchange_date.rb
  7. 2
      app/models/form/sales/pages/extra_borrowing.rb
  8. 1
      app/models/form/sales/pages/handover_date.rb
  9. 1
      app/models/form/sales/pages/la_nominations.rb
  10. 1
      app/models/form/sales/pages/leasehold_charges.rb
  11. 3
      app/models/form/sales/pages/living_before_purchase.rb
  12. 1
      app/models/form/sales/pages/monthly_rent.rb
  13. 2
      app/models/form/sales/pages/mortgage_amount.rb
  14. 2
      app/models/form/sales/pages/mortgage_lender.rb
  15. 2
      app/models/form/sales/pages/mortgage_lender_other.rb
  16. 1
      app/models/form/sales/pages/mortgage_length.rb
  17. 2
      app/models/form/sales/pages/mortgageused.rb
  18. 2
      app/models/form/sales/pages/previous_bedrooms.rb
  19. 2
      app/models/form/sales/pages/previous_property_type.rb
  20. 1
      app/models/form/sales/pages/previous_tenure.rb
  21. 1
      app/models/form/sales/pages/resale.rb
  22. 1
      app/models/form/sales/pages/staircase.rb
  23. 2
      app/models/form/sales/pages/value_shared_ownership.rb
  24. 3
      app/models/form/sales/questions/buyer_previous.rb
  25. 11
      app/models/form/sales/questions/deposit_amount.rb
  26. 4
      app/models/form/sales/questions/deposit_discount.rb
  27. 4
      app/models/form/sales/questions/equity.rb
  28. 3
      app/models/form/sales/questions/exchange_date.rb
  29. 4
      app/models/form/sales/questions/extra_borrowing.rb
  30. 4
      app/models/form/sales/questions/fromprop.rb
  31. 4
      app/models/form/sales/questions/handover_date.rb
  32. 4
      app/models/form/sales/questions/has_leasehold_charges.rb
  33. 4
      app/models/form/sales/questions/la_nominations.rb
  34. 3
      app/models/form/sales/questions/leasehold_charges.rb
  35. 4
      app/models/form/sales/questions/living_before_purchase.rb
  36. 22
      app/models/form/sales/questions/living_before_purchase_years.rb
  37. 4
      app/models/form/sales/questions/monthly_rent.rb
  38. 4
      app/models/form/sales/questions/mortgage_amount.rb
  39. 4
      app/models/form/sales/questions/mortgage_lender.rb
  40. 3
      app/models/form/sales/questions/mortgage_lender_other.rb
  41. 4
      app/models/form/sales/questions/mortgage_length.rb
  42. 3
      app/models/form/sales/questions/mortgageused.rb
  43. 4
      app/models/form/sales/questions/previous_bedrooms.rb
  44. 4
      app/models/form/sales/questions/previous_tenure.rb
  45. 4
      app/models/form/sales/questions/resale.rb
  46. 4
      app/models/form/sales/questions/staircase.rb
  47. 3
      app/models/form/sales/questions/staircase_bought.rb
  48. 3
      app/models/form/sales/questions/staircase_owned.rb
  49. 4
      app/models/form/sales/questions/value.rb
  50. 14
      config/locales/en.yml
  51. 178
      config/locales/forms/2023/sales/sale_information.yml
  52. 178
      config/locales/forms/2024/sales/sale_information.yml
  53. 2
      spec/models/form/sales/questions/living_before_purchase_years_spec.rb

2
app/models/form/sales/pages/about_staircase.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::AboutStaircase < ::Form::Page
def initialize(id, hsh, subsection, joint_purchase:) def initialize(id, hsh, subsection, joint_purchase:)
super(id, hsh, subsection) super(id, hsh, subsection)
@joint_purchase = joint_purchase @joint_purchase = joint_purchase
@header = "About the staircasing transaction" @copy_key = "sales.sale_information.about_staircasing.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@depends_on = [{ @depends_on = [{
"staircase" => 1, "staircase" => 1,
"joint_purchase?" => joint_purchase, "joint_purchase?" => joint_purchase,

1
app/models/form/sales/pages/buyer_previous.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::BuyerPrevious < ::Form::Page
def initialize(id, hsh, subsection, joint_purchase:) def initialize(id, hsh, subsection, joint_purchase:)
super(id, hsh, subsection) super(id, hsh, subsection)
@joint_purchase = joint_purchase @joint_purchase = joint_purchase
@copy_key = "sales.sale_information.soctenant.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@depends_on = [{ "joint_purchase?" => joint_purchase, "soctenant_is_inferred?" => false }] @depends_on = [{ "joint_purchase?" => joint_purchase, "soctenant_is_inferred?" => false }]
end end

2
app/models/form/sales/pages/deposit.rb

@ -3,7 +3,7 @@ class Form::Sales::Pages::Deposit < ::Form::Page
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@optional = optional @optional = optional
@header = "About the deposit" @copy_key = "sales.sale_information.deposit"
end end
def questions def questions

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

@ -2,7 +2,7 @@ class Form::Sales::Pages::DepositDiscount < ::Form::Page
def initialize(id, hsh, subsection, optional:) def initialize(id, hsh, subsection, optional:)
super(id, hsh, subsection) super(id, hsh, subsection)
@optional = optional @optional = optional
@header = "About the deposit" @copy_key = "sales.sale_information.cashdis"
end end
def questions def questions

2
app/models/form/sales/pages/equity.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::Equity < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "equity" @id = "equity"
@header = "About the price of the property" @copy_key = "sales.sale_information.equity"
end end
def questions def questions

1
app/models/form/sales/pages/exchange_date.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::ExchangeDate < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "exchange_contracts" @id = "exchange_contracts"
@copy_key = "sales.sale_information.exchange_date"
@depends_on = [{ @depends_on = [{
"resale" => 2, "resale" => 2,
}] }]

2
app/models/form/sales/pages/extra_borrowing.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::ExtraBorrowing < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@header = "" @copy_key = "sales.sale_information.extrabor"
@description = "" @description = ""
@subsection = subsection @subsection = subsection
@depends_on = [{ @depends_on = [{

1
app/models/form/sales/pages/handover_date.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::HandoverDate < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "handover_date" @id = "handover_date"
@copy_key = "sales.sale_information.handover_date"
@depends_on = [ @depends_on = [
{ "ownershipsch" => 1, "resale" => 2 }, { "ownershipsch" => 1, "resale" => 2 },
] ]

1
app/models/form/sales/pages/la_nominations.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::LaNominations < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "la_nominations" @id = "la_nominations"
@copy_key = "sales.sale_information.la_nominations"
end end
def questions def questions

1
app/models/form/sales/pages/leasehold_charges.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::LeaseholdCharges < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@copy_key = "sales.sale_information.leaseholdcharges"
end end
def questions def questions

3
app/models/form/sales/pages/living_before_purchase.rb

@ -3,12 +3,13 @@ class Form::Sales::Pages::LivingBeforePurchase < ::Form::Page
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@joint_purchase = joint_purchase @joint_purchase = joint_purchase
@copy_key = "sales.sale_information.living_before_purchase.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
end end
def questions def questions
@questions ||= [ @questions ||= [
living_before_purchase, living_before_purchase,
Form::Sales::Questions::LivingBeforePurchaseYears.new(nil, nil, self, ownershipsch: @ownershipsch), Form::Sales::Questions::LivingBeforePurchaseYears.new(nil, nil, self, ownershipsch: @ownershipsch, joint_purchase: @joint_purchase),
].compact ].compact
end end

1
app/models/form/sales/pages/monthly_rent.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::MonthlyRent < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "monthly_rent" @id = "monthly_rent"
@copy_key = "sales.sale_information.mrent"
end end
def questions def questions

2
app/models/form/sales/pages/mortgage_amount.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::MortgageAmount < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@header = "Mortgage Amount" @copy_key = "sales.sale_information.mortgage"
@depends_on = [{ "mortgage_used?" => true }] @depends_on = [{ "mortgage_used?" => true }]
end end

2
app/models/form/sales/pages/mortgage_lender.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::MortgageLender < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@header = "" @copy_key = "sales.sale_information.mortgagelender"
@description = "" @description = ""
@subsection = subsection @subsection = subsection
@depends_on = [{ @depends_on = [{

2
app/models/form/sales/pages/mortgage_lender_other.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::MortgageLenderOther < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@header = "" @copy_key = "sales.sale_information.mortgagelenderother"
@description = "" @description = ""
@subsection = subsection @subsection = subsection
@depends_on = [{ @depends_on = [{

1
app/models/form/sales/pages/mortgage_length.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::MortgageLength < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@copy_key = "sales.sale_information.mortlen"
@depends_on = [{ @depends_on = [{
"mortgageused" => 1, "mortgageused" => 1,
}] }]

2
app/models/form/sales/pages/mortgageused.rb

@ -1,7 +1,7 @@
class Form::Sales::Pages::Mortgageused < ::Form::Page class Form::Sales::Pages::Mortgageused < ::Form::Page
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@header = "Mortgage Amount" @copy_key = "sales.sale_information.mortgageused"
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
end end

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

@ -2,7 +2,7 @@ class Form::Sales::Pages::PreviousBedrooms < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "previous_bedrooms" @id = "previous_bedrooms"
@header = "About the buyers’ previous property" @copy_key = "sales.sale_information.frombeds"
@depends_on = [ @depends_on = [
{ {
"soctenant" => 1, "soctenant" => 1,

2
app/models/form/sales/pages/previous_property_type.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::PreviousPropertyType < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "previous_property_type" @id = "previous_property_type"
@header = "" @copy_key = "sales.sale_information.fromprop"
@description = "" @description = ""
@subsection = subsection @subsection = subsection
@depends_on = [ @depends_on = [

1
app/models/form/sales/pages/previous_tenure.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::PreviousTenure < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "shared_ownership_previous_tenure" @id = "shared_ownership_previous_tenure"
@copy_key = "sales.sale_information.socprevten"
@header = "" @header = ""
@description = "" @description = ""
@subsection = subsection @subsection = subsection

1
app/models/form/sales/pages/resale.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::Resale < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "resale" @id = "resale"
@copy_key = "sales.sale_information.resale"
@depends_on = [ @depends_on = [
{ {
"staircase" => 2, "staircase" => 2,

1
app/models/form/sales/pages/staircase.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::Staircase < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "staircasing" @id = "staircasing"
@copy_key = "sales.sale_information.staircasing"
end end
def questions def questions

2
app/models/form/sales/pages/value_shared_ownership.rb

@ -2,7 +2,7 @@ class Form::Sales::Pages::ValueSharedOwnership < ::Form::Page
def initialize(id, hsh, subsection) def initialize(id, hsh, subsection)
super super
@id = "value_shared_ownership" @id = "value_shared_ownership"
@header = "About the price of the property" @copy_key = "sales.sale_information.value"
end end
def questions def questions

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

@ -2,8 +2,7 @@ class Form::Sales::Questions::BuyerPrevious < ::Form::Question
def initialize(id, hsh, page, joint_purchase:) def initialize(id, hsh, page, joint_purchase:)
super(id, hsh, page) super(id, hsh, page)
@id = "soctenant" @id = "soctenant"
@check_answer_label = I18n.t("check_answer_labels.soctenant", count: joint_purchase ? 2 : 1) @copy_key = "sales.sale_information.soctenant.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}"
@header = I18n.t("questions.soctenant", count: joint_purchase ? 2 : 1)
@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 = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

11
app/models/form/sales/questions/deposit_amount.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:, optional:) def initialize(id, hsh, subsection, ownershipsch:, optional:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "deposit" @id = "deposit"
@check_answer_label = "Cash deposit" @copy_key = "sales.sale_information.deposit"
@header = "How much cash deposit was paid on the property?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@max = 999_999 @max = 999_999
@ -25,14 +24,6 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question
2024 => { 1 => 96, 2 => 109, 3 => 116 }, 2024 => { 1 => 96, 2 => 109, 3 => 116 },
}.freeze }.freeze
def hint_text
if @optional
"Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue"
else
"Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan"
end
end
def top_guidance_partial def top_guidance_partial
return "financial_calculations_shared_ownership" if @ownershipsch == 1 return "financial_calculations_shared_ownership" if @ownershipsch == 1
return "financial_calculations_discounted_ownership" if @ownershipsch == 2 return "financial_calculations_discounted_ownership" if @ownershipsch == 2

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

@ -2,15 +2,13 @@ class Form::Sales::Questions::DepositDiscount < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "cashdis" @id = "cashdis"
@check_answer_label = "Cash discount through SocialHomeBuy" @copy_key = "sales.sale_information.cashdis"
@header = "How much cash discount was given through Social HomeBuy?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@max = 999_999 @max = 999_999
@step = 1 @step = 1
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@hint_text = "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@top_guidance_partial = "financial_calculations_shared_ownership" @top_guidance_partial = "financial_calculations_shared_ownership"
end end

4
app/models/form/sales/questions/equity.rb

@ -2,15 +2,13 @@ class Form::Sales::Questions::Equity < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "equity" @id = "equity"
@check_answer_label = "Initial percentage equity stake" @copy_key = "sales.sale_information.equity"
@header = "What was the initial percentage equity stake purchased?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@max = 100 @max = 100
@step = 1 @step = 1
@width = 5 @width = 5
@suffix = "%" @suffix = "%"
@hint_text = "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@top_guidance_partial = "financial_calculations_shared_ownership" @top_guidance_partial = "financial_calculations_shared_ownership"
end end

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

@ -2,8 +2,7 @@ class Form::Sales::Questions::ExchangeDate < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "exdate" @id = "exdate"
@check_answer_label = "Exchange of contracts date" @copy_key = "sales.sale_information.exchange_date"
@header = "What is the exchange of contracts 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 = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

4
app/models/form/sales/questions/extra_borrowing.rb

@ -2,12 +2,10 @@ class Form::Sales::Questions::ExtraBorrowing < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "extrabor" @id = "extrabor"
@check_answer_label = "Any other borrowing?" @copy_key = "sales.sale_information.extrabor"
@header = "Does this include any extra borrowing?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@page = page @page = page
@hint_text = ""
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch] @question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch]
end end

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

@ -2,10 +2,8 @@ class Form::Sales::Questions::Fromprop < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "fromprop" @id = "fromprop"
@check_answer_label = "Previous property type" @copy_key = "sales.sale_information.fromprop"
@header = "What was the previous property type?"
@type = "radio" @type = "radio"
@hint_text = ""
@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 = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

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

@ -2,10 +2,8 @@ class Form::Sales::Questions::HandoverDate < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "hodate" @id = "hodate"
@check_answer_label = "Practical completion or handover date" @copy_key = "sales.sale_information.handover_date"
@header = "What is the practical completion or handover date?"
@type = "date" @type = "date"
@hint_text = "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

4
app/models/form/sales/questions/has_leasehold_charges.rb

@ -2,9 +2,7 @@ class Form::Sales::Questions::HasLeaseholdCharges < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "has_mscharge" @id = "has_mscharge"
@check_answer_label = "Does the property have any monthly leasehold charges?" @copy_key = "sales.sale_information.leaseholdcharges.has_mscharge"
@header = "Does the property have any monthly leasehold charges?"
@hint_text = "For example, service and management charges"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@conditional_for = { @conditional_for = {

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

@ -2,11 +2,9 @@ class Form::Sales::Questions::LaNominations < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "lanomagr" @id = "lanomagr"
@check_answer_label = "Household rehoused under a local authority nominations agreement?" @copy_key = "sales.sale_information.la_nominations"
@header = "Was the household rehoused under a 'local authority nominations agreement'?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hint_text = "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

3
app/models/form/sales/questions/leasehold_charges.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::LeaseholdCharges < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "mscharge" @id = "mscharge"
@check_answer_label = "Monthly leasehold charges" @copy_key = "sales.sale_information.leaseholdcharges.mscharge"
@header = "Enter the total monthly charge"
@type = "numeric" @type = "numeric"
@min = 1 @min = 1
@step = 0.01 @step = 0.01

4
app/models/form/sales/questions/living_before_purchase.rb

@ -2,9 +2,7 @@ class Form::Sales::Questions::LivingBeforePurchase < ::Form::Question
def initialize(id, hsh, page, ownershipsch:, joint_purchase:) def initialize(id, hsh, page, ownershipsch:, joint_purchase:)
super(id, hsh, page) super(id, hsh, page)
@id = "proplen_asked" @id = "proplen_asked"
@check_answer_label = "#{joint_purchase ? 'Buyers' : 'Buyer'} lived in the property before purchasing" @copy_key = "sales.sale_information.living_before_purchase.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}.proplen_asked"
@header = "Did the #{joint_purchase ? 'buyers' : 'buyer'} live in the property before purchasing it?"
@hint_text = nil
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@conditional_for = { @conditional_for = {

22
app/models/form/sales/questions/living_before_purchase_years.rb

@ -1,10 +1,8 @@
class Form::Sales::Questions::LivingBeforePurchaseYears < ::Form::Question class Form::Sales::Questions::LivingBeforePurchaseYears < ::Form::Question
def initialize(id, hsh, page, ownershipsch:) def initialize(id, hsh, page, ownershipsch:, joint_purchase:)
super(id, hsh, page) super(id, hsh, page)
@id = "proplen" @id = "proplen"
@check_answer_label = "Number of years living in the property before purchase" @copy_key = "sales.sale_information.living_before_purchase.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}.proplen"
@header = header_text
@hint_text = hint_text
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@max = 80 @max = 80
@ -14,22 +12,6 @@ class Form::Sales::Questions::LivingBeforePurchaseYears < ::Form::Question
@question_number = question_number @question_number = question_number
end end
def header_text
if form.start_date.year >= 2023
"How long did they live there?"
else
"How long did the buyer(s) live in the property before purchase?"
end
end
def hint_text
if form.start_date.year >= 2023
"You should round up to the nearest year"
else
"You should round this up to the nearest year. If the buyers haven't been living in the property, enter '0'"
end
end
def suffix_label(log) def suffix_label(log)
" #{'year'.pluralize(log[id])}" " #{'year'.pluralize(log[id])}"
end end

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

@ -2,14 +2,12 @@ class Form::Sales::Questions::MonthlyRent < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "mrent" @id = "mrent"
@check_answer_label = "Monthly rent" @copy_key = "sales.sale_information.mrent"
@header = "What is the basic monthly rent?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@step = 0.01 @step = 0.01
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@hint_text = "Amount paid before any charges"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

4
app/models/form/sales/questions/mortgage_amount.rb

@ -2,14 +2,12 @@ class Form::Sales::Questions::MortgageAmount < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "mortgage" @id = "mortgage"
@check_answer_label = "Mortgage amount" @copy_key = "sales.sale_information.mortgage"
@header = "What is the mortgage amount?"
@type = "numeric" @type = "numeric"
@min = 1 @min = 1
@step = 1 @step = 1
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@hint_text = "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch] @question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch]
@top_guidance_partial = top_guidance_partial @top_guidance_partial = top_guidance_partial

4
app/models/form/sales/questions/mortgage_lender.rb

@ -2,10 +2,8 @@ class Form::Sales::Questions::MortgageLender < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "mortgagelender" @id = "mortgagelender"
@check_answer_label = "Mortgage Lender" @copy_key = "sales.sale_information.mortgagelender"
@header = "What is the name of the mortgage lender?"
@type = "select" @type = "select"
@hint_text = ""
@page = page @page = page
@bottom_guidance_partial = "mortgage_lender" @bottom_guidance_partial = "mortgage_lender"
@ownershipsch = ownershipsch @ownershipsch = ownershipsch

3
app/models/form/sales/questions/mortgage_lender_other.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::MortgageLenderOther < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "mortgagelenderother" @id = "mortgagelenderother"
@check_answer_label = "Other Mortgage Lender" @copy_key = "sales.sale_information.mortgagelenderother"
@header = "What is the other mortgage lender?"
@type = "text" @type = "text"
@page = page @page = page
@ownershipsch = ownershipsch @ownershipsch = ownershipsch

4
app/models/form/sales/questions/mortgage_length.rb

@ -2,14 +2,12 @@ class Form::Sales::Questions::MortgageLength < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "mortlen" @id = "mortlen"
@check_answer_label = "Length of mortgage" @copy_key = "sales.sale_information.mortlen"
@header = "What is the length of the mortgage?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@max = 60 @max = 60
@step = 1 @step = 1
@width = 5 @width = 5
@hint_text = "You should round up to the nearest year. Value should not exceed 60 years."
@ownershipsch = ownershipsch @ownershipsch = ownershipsch
@question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch] @question_number = QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.fetch(form.start_date.year, QUESTION_NUMBER_FROM_YEAR_AND_OWNERSHIP.max_by { |k, _v| k }.last)[ownershipsch]
end end

3
app/models/form/sales/questions/mortgageused.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::Mortgageused < ::Form::Question
def initialize(id, hsh, subsection, ownershipsch:) def initialize(id, hsh, subsection, ownershipsch:)
super(id, hsh, subsection) super(id, hsh, subsection)
@id = "mortgageused" @id = "mortgageused"
@check_answer_label = "Mortgage used" @copy_key = "sales.sale_information.mortgageused"
@header = "Was a mortgage used for the purchase of this property?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@ownershipsch = ownershipsch @ownershipsch = ownershipsch

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

@ -2,14 +2,12 @@ class Form::Sales::Questions::PreviousBedrooms < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "frombeds" @id = "frombeds"
@check_answer_label = "Number of bedrooms in previous property" @copy_key = "sales.sale_information.frombeds"
@header = "How many bedrooms did the property have?"
@type = "numeric" @type = "numeric"
@width = 5 @width = 5
@min = 1 @min = 1
@max = 6 @max = 6
@step = 1 @step = 1
@hint_text = "For bedsits enter 1"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,10 +2,8 @@ class Form::Sales::Questions::PreviousTenure < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "socprevten" @id = "socprevten"
@check_answer_label = "Previous property tenure" @copy_key = "sales.sale_information.socprevten"
@header = "What was the previous tenure of the buyer?"
@type = "radio" @type = "radio"
@hint_text = ""
@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 = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]

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

@ -2,11 +2,9 @@ class Form::Sales::Questions::Resale < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "resale" @id = "resale"
@check_answer_label = "Is this a resale?" @copy_key = "sales.sale_information.resale"
@header = "Is this a resale?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hint_text = "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,11 +2,9 @@ class Form::Sales::Questions::Staircase < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "staircase" @id = "staircase"
@check_answer_label = "Staircasing transaction" @copy_key = "sales.sale_information.staircasing"
@header = "Is this a staircasing transaction?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@hint_text = "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
end end

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

@ -2,8 +2,7 @@ class Form::Sales::Questions::StaircaseBought < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "stairbought" @id = "stairbought"
@check_answer_label = "Percentage bought in this staircasing transaction" @copy_key = "sales.sale_information.about_staircasing.stairbought"
@header = "What percentage of the property has been bought in this staircasing transaction?"
@type = "numeric" @type = "numeric"
@width = 5 @width = 5
@min = 0 @min = 0

3
app/models/form/sales/questions/staircase_owned.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::StaircaseOwned < ::Form::Question
def initialize(id, hsh, page, joint_purchase:) def initialize(id, hsh, page, joint_purchase:)
super(id, hsh, page) super(id, hsh, page)
@id = "stairowned" @id = "stairowned"
@check_answer_label = I18n.t("check_answer_labels.stairowned", count: joint_purchase ? 2 : 1) @copy_key = "sales.sale_information.about_staircasing.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}.stairowned"
@header = I18n.t("questions.stairowned", count: joint_purchase ? 2 : 1)
@type = "numeric" @type = "numeric"
@width = 5 @width = 5
@min = 0 @min = 0

4
app/models/form/sales/questions/value.rb

@ -2,14 +2,12 @@ class Form::Sales::Questions::Value < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "value" @id = "value"
@check_answer_label = "Full purchase price" @copy_key = "sales.sale_information.value"
@header = "What was the full purchase price?"
@type = "numeric" @type = "numeric"
@min = 0 @min = 0
@step = 1 @step = 1
@width = 5 @width = 5
@prefix = "£" @prefix = "£"
@hint_text = "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
@question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max] @question_number = QUESTION_NUMBER_FROM_YEAR[form.start_date.year] || QUESTION_NUMBER_FROM_YEAR[QUESTION_NUMBER_FROM_YEAR.keys.max]
@top_guidance_partial = "financial_calculations_shared_ownership" @top_guidance_partial = "financial_calculations_shared_ownership"
end end

14
config/locales/en.yml

@ -701,12 +701,6 @@ Make sure these answers are correct."
W: "Suitable for someone who uses a wheelchair and offers the full use of all rooms and facilities." W: "Suitable for someone who uses a wheelchair and offers the full use of all rooms and facilities."
A: "Fitted with stairlifts, ramps, level access showers or grab rails." A: "Fitted with stairlifts, ramps, level access showers or grab rails."
N: "Not designed to wheelchair-user standards or fitted with any equipment or adaptations." N: "Not designed to wheelchair-user standards or fitted with any equipment or adaptations."
soctenant:
one: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
other: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
stairowned:
one: "What percentage of the property does the buyer now own in total?"
other: "What percentage of the property do the buyers now own in total?"
hints: hints:
location: location:
@ -720,14 +714,6 @@ Make sure these answers are correct."
bulk_upload: bulk_upload:
needstype: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes." needstype: "General needs housing includes both self-contained and shared housing without support or specific adaptations. Supported housing can include direct access hostels, group homes, residential care and nursing homes."
check_answer_labels:
soctenant:
one: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
other: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
stairowned:
one: "Percentage the buyer now owns in total."
other: "Percentage the buyers now own in total."
warnings: warnings:
organisation: organisation:
deactivate: "All schemes and users at this organisation will be deactivated. All the organisation's relationships will be removed. It will no longer be possible to create logs for this organisation." deactivate: "All schemes and users at this organisation will be deactivated. All the organisation's relationships will be removed. It will no longer be possible to create logs for this organisation."

178
config/locales/forms/2023/sales/sale_information.yml

@ -0,0 +1,178 @@
en:
forms:
2023:
sales:
sale_information:
living_before_purchase:
joint_purchase:
page_header: ""
proplen:
check_answer_label: "Number of years living in the property before purchase"
hint_text: "You should round up to the nearest year"
question_text: "How long did they live there?"
proplen_asked:
check_answer_label: "Buyers lived in the property before purchasing"
hint_text: ""
question_text: "Did the buyers live in the property before purchasing it?"
not_joint_purchase:
page_header: ""
proplen:
check_answer_label: "Number of years living in the property before purchase"
hint_text: "You should round up to the nearest year"
question_text: "How long did they live there?"
proplen_asked:
check_answer_label: "Buyer lived in the property before purchasing"
hint_text: ""
question_text: "Did the buyer live in the property before purchasing it?"
staircasing:
page_header: ""
check_answer_label: "Staircasing transaction"
hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
question_text: "Is this a staircasing transaction?"
about_staircasing:
page_header: "About the staircasing transaction"
stairbought:
check_answer_label: "Percentage bought in this staircasing transaction"
hint_text: ""
question_text: "What percentage of the property has been bought in this staircasing transaction?"
stairowned:
joint_purchase:
check_answer_label: "Percentage the buyers now own in total."
hint_text: ""
question_text: "What percentage of the property do the buyers now own in total?"
not_joint_purchase:
check_answer_label: "Percentage the buyer now owns in total."
hint_text: ""
question_text: "What percentage of the property does the buyer now own in total?"
resale:
page_header: ""
check_answer_label: "Is this a resale?"
hint_text: "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
question_text: "Is this a resale?"
exchange_contracts":
page_header: ""
check_answer_label: "Exchange of contracts date"
hint_text: ""
question_text: "What is the exchange of contracts date?"
handover_date:
page_header: ""
check_answer_label: "Practical completion or handover date"
hint_text: "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
question_text: "What is the practical completion or handover date?"
la_nominations:
page_header: ""
check_answer_label: "Household rehoused under a local authority nominations agreement?"
hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
question_text: "Was the household rehoused under a 'local authority nominations agreement'?"
soctenant:
joint_purchase:
page_header: ""
check_answer_label: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
hint_text: ""
question_text: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
not_joint_purchase:
page_header: ""
check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
hint_text: ""
question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
frombeds:
page_header: "About the buyers’ previous property"
check_answer_label: "Number of bedrooms in previous property"
hint_text: "For bedsits enter 1"
question_text: "How many bedrooms did the property have?"
fromprop:
page_header: ""
check_answer_label: "Previous property type"
hint_text: ""
question_text: "What was the previous property type?"
socprevten:
page_header: ""
check_answer_label: "Previous property tenure"
hint_text: ""
question_text: "What was the previous tenure of the buyer?"
value:
page_header: "About the price of the property"
check_answer_label: "Full purchase price"
hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
question_text: "What was the full purchase price?"
equity:
page_header: "About the price of the property"
check_answer_label: "Initial percentage equity stake"
hint_text: "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
question_text: "What was the initial percentage equity stake purchased?"
mortgageused:
page_header: "Mortgage Amount"
check_answer_label: "Mortgage used"
hint_text: ""
question_text: "Was a mortgage used for the purchase of this property?"
mortgage:
page_header: "Mortgage Amount"
check_answer_label: "Mortgage amount"
hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
question_text: "What is the mortgage amount?"
mortgagelender:
page_header: ""
check_answer_label: "Mortgage lender"
hint_text: ""
question_text: "What is the name of the mortgage lender?"
mortgagelenderother:
page_header: ""
check_answer_label: "Other Mortgage Lender"
hint_text: ""
question_text: "What is the other mortgage lender?"
mortlen:
page_header: ""
check_answer_label: "Length of mortgage"
hint_text: "You should round up to the nearest year. Value should not exceed 60 years."
question_text: "What is the length of the mortgage?"
extrabor:
page_header: ""
check_answer_label: "Any other borrowing?"
hint_text: ""
question_text: "Does this include any extra borrowing?"
deposit:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan"
question_text: "How much cash deposit was paid on the property?"
cashdis:
page_header: "About the deposit"
check_answer_label: "Cash discount through SocialHomeBuy"
hint_text: "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
question_text: "How much cash discount was given through Social HomeBuy?"
mrent:
page_header: ""
check_answer_label: "Monthly rent"
hint_text: "Amount paid before any charges"
question_text: "What is the basic monthly rent?"
leaseholdcharges:
page_header: ""
has_mscharge:
check_answer_label: "Does the property have any monthly leasehold charges?"
hint_text: "For example, service and management charges"
question_text: "Does the property have any monthly leasehold charges?"
mscharge:
check_answer_label: "Monthly leasehold charges"
hint_text: ""
question_text: "Enter the total monthly charge"

178
config/locales/forms/2024/sales/sale_information.yml

@ -0,0 +1,178 @@
en:
forms:
2024:
sales:
sale_information:
living_before_purchase:
joint_purchase:
page_header: ""
proplen:
check_answer_label: "Number of years living in the property before purchase"
hint_text: "You should round up to the nearest year"
question_text: "How long did they live there?"
proplen_asked:
check_answer_label: "Buyers lived in the property before purchasing"
hint_text: ""
question_text: "Did the buyers live in the property before purchasing it?"
not_joint_purchase:
page_header: ""
proplen:
check_answer_label: "Number of years living in the property before purchase"
hint_text: "You should round up to the nearest year"
question_text: "How long did they live there?"
proplen_asked:
check_answer_label: "Buyer lived in the property before purchasing"
hint_text: ""
question_text: "Did the buyer live in the property before purchasing it?"
staircasing:
page_header: ""
check_answer_label: "Staircasing transaction"
hint_text: "A staircasing transaction is when the household purchases more shares in their property, increasing the proportion they own and decreasing the proportion the housing association owns. Once the household purchases 100% of the shares, they own the property"
question_text: "Is this a staircasing transaction?"
about_staircasing:
page_header: "About the staircasing transaction"
stairbought:
check_answer_label: "Percentage bought in this staircasing transaction"
hint_text: ""
question_text: "What percentage of the property has been bought in this staircasing transaction?"
stairowned:
joint_purchase:
check_answer_label: "Percentage the buyers now own in total."
hint_text: ""
question_text: "What percentage of the property do the buyers now own in total?"
not_joint_purchase:
check_answer_label: "Percentage the buyer now owns in total."
hint_text: ""
question_text: "What percentage of the property does the buyer now own in total?"
resale:
page_header: ""
check_answer_label: "Is this a resale?"
hint_text: "If the social landlord has previously sold the property to another buyer and is now reselling the property, select 'yes'. If this is the first time the property has been sold, select 'no'."
question_text: "Is this a resale?"
exchange_contracts":
page_header: ""
check_answer_label: "Exchange of contracts date"
hint_text: ""
question_text: "What is the exchange of contracts date?"
handover_date:
page_header: ""
check_answer_label: "Practical completion or handover date"
hint_text: "This is the date on which the building contractor hands over responsibility for the completed property to the private registered provider (PRP)"
question_text: "What is the practical completion or handover date?"
la_nominations:
page_header: ""
check_answer_label: "Household rehoused under a local authority nominations agreement?"
hint_text: "A local authority nominations agreement is a written agreement between a local authority and private registered provider (PRP) that some or all of its sales vacancies are offered to local authorities for rehousing"
question_text: "Was the household rehoused under a 'local authority nominations agreement'?"
soctenant:
joint_purchase:
page_header: ""
check_answer_label: "Any buyers were registered providers, housing association or local authority tenants immediately before this sale?"
hint_text: ""
question_text: "Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?"
not_joint_purchase:
page_header: ""
check_answer_label: "Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
hint_text: ""
question_text: "Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
frombeds:
page_header: "About the buyers’ previous property"
check_answer_label: "Number of bedrooms in previous property"
hint_text: "For bedsits enter 1"
question_text: "How many bedrooms did the property have?"
fromprop:
page_header: ""
check_answer_label: "Previous property type"
hint_text: ""
question_text: "What was the previous property type?"
socprevten:
page_header: ""
check_answer_label: "Previous property tenure"
hint_text: ""
question_text: "What was the previous tenure of the buyer?"
value:
page_header: "About the price of the property"
check_answer_label: "Full purchase price"
hint_text: "Enter the full purchase price of the property before any discounts are applied. For shared ownership, enter the full purchase price paid for 100% equity (this is equal to the value of the share owned by the PRP plus the value bought by the purchaser)"
question_text: "What was the full purchase price?"
equity:
page_header: "About the price of the property"
check_answer_label: "Initial percentage equity stake"
hint_text: "Enter the amount of initial equity held by the purchaser (for example, 25% or 50%)"
question_text: "What was the initial percentage equity stake purchased?"
mortgageused:
page_header: "Mortgage Amount"
check_answer_label: "Mortgage used"
hint_text: ""
question_text: "Was a mortgage used for the purchase of this property?"
mortgage:
page_header: "Mortgage Amount"
check_answer_label: "Mortgage amount"
hint_text: "Enter the amount of mortgage agreed with the mortgage lender. Exclude any deposits or cash payments. Numeric in pounds. Rounded to the nearest pound."
question_text: "What is the mortgage amount?"
mortgagelender:
page_header: ""
check_answer_label: "Mortgage lender"
hint_text: ""
question_text: "What is the name of the mortgage lender?"
mortgagelenderother:
page_header: ""
check_answer_label: "Other Mortgage Lender"
hint_text: ""
question_text: "What is the other mortgage lender?"
mortlen:
page_header: ""
check_answer_label: "Length of mortgage"
hint_text: "You should round up to the nearest year. Value should not exceed 60 years."
question_text: "What is the length of the mortgage?"
extrabor:
page_header: ""
check_answer_label: "Any other borrowing?"
hint_text: ""
question_text: "Does this include any extra borrowing?"
deposit:
page_header: "About the deposit"
check_answer_label: "Deposit amount"
hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage. This excludes any grant or loan. As this is a fully staircased sale this question is optional. If you do not have the information available click save and continue"
question_text: "How much cash deposit was paid on the property?"
cashdis:
page_header: "About the deposit"
check_answer_label: "Cash discount through SocialHomeBuy"
hint_text: "Enter the total cash discount given on the property being purchased through the Social HomeBuy scheme"
question_text: "How much cash discount was given through Social HomeBuy?"
mrent:
page_header: ""
check_answer_label: "Monthly rent"
hint_text: "Amount paid before any charges"
question_text: "What is the basic monthly rent?"
leaseholdcharges:
page_header: ""
has_mscharge:
check_answer_label: "Does the property have any monthly leasehold charges?"
hint_text: "For example, service and management charges"
question_text: "Does the property have any monthly leasehold charges?"
mscharge:
check_answer_label: "Monthly leasehold charges"
hint_text: ""
question_text: "Enter the total monthly charge"

2
spec/models/form/sales/questions/living_before_purchase_years_spec.rb

@ -1,7 +1,7 @@
require "rails_helper" require "rails_helper"
RSpec.describe Form::Sales::Questions::LivingBeforePurchaseYears, type: :model do RSpec.describe Form::Sales::Questions::LivingBeforePurchaseYears, type: :model do
subject(:question) { described_class.new(question_id, question_definition, page, ownershipsch: 1) } subject(:question) { described_class.new(question_id, question_definition, page, ownershipsch: 1, joint_purchase: true) }
let(:question_id) { nil } let(:question_id) { nil }
let(:question_definition) { nil } let(:question_definition) { nil }

Loading…
Cancel
Save