diff --git a/app/models/form/sales/pages/deposit.rb b/app/models/form/sales/pages/deposit.rb index b204227b2..4fc5e1b83 100644 --- a/app/models/form/sales/pages/deposit.rb +++ b/app/models/form/sales/pages/deposit.rb @@ -3,6 +3,7 @@ class Form::Sales::Pages::Deposit < ::Form::Page super(id, hsh, subsection) @ownershipsch = ownershipsch @optional = optional + @copy_key = copy_key end def questions @@ -18,4 +19,10 @@ class Form::Sales::Pages::Deposit < ::Form::Page log.ownershipsch == 1 end + + def copy_key + return "sales.sale_information.deposit.shared_ownership" if @ownershipsch == 1 + return "sales.sale_information.deposit.discounted_ownership" if @ownershipsch == 2 + return "sales.sale_information.deposit.outright_sale" if @ownershipsch == 3 + end end diff --git a/app/models/form/sales/questions/deposit_amount.rb b/app/models/form/sales/questions/deposit_amount.rb index aec119496..55d1244f4 100644 --- a/app/models/form/sales/questions/deposit_amount.rb +++ b/app/models/form/sales/questions/deposit_amount.rb @@ -12,6 +12,7 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question @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] @optional = optional @top_guidance_partial = top_guidance_partial + @copy_key = copy_key end def derived?(log) @@ -29,4 +30,10 @@ class Form::Sales::Questions::DepositAmount < ::Form::Question return "financial_calculations_discounted_ownership" if @ownershipsch == 2 return "financial_calculations_outright_sale" if @ownershipsch == 3 end + + def copy_key + return "sales.sale_information.deposit.shared_ownership" if @ownershipsch == 1 + return "sales.sale_information.deposit.discounted_ownership" if @ownershipsch == 2 + return "sales.sale_information.deposit.outright_sale" if @ownershipsch == 3 + end end diff --git a/config/locales/forms/2023/sales/sale_information.en.yml b/config/locales/forms/2023/sales/sale_information.en.yml index 2962bc54b..cd46e9a1e 100644 --- a/config/locales/forms/2023/sales/sale_information.en.yml +++ b/config/locales/forms/2023/sales/sale_information.en.yml @@ -174,11 +174,24 @@ en: question_text: "Does this include any extra borrowing?" deposit: - page_header: "About the deposit" - check_answer_label: "Deposit amount" - check_answer_prompt: "" - 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?" + discounted_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + 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?" + shared_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" + outright_sale: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" cashdis: page_header: "About the deposit" diff --git a/config/locales/forms/2024/sales/sale_information.en.yml b/config/locales/forms/2024/sales/sale_information.en.yml index c72eff035..e8f898e3a 100644 --- a/config/locales/forms/2024/sales/sale_information.en.yml +++ b/config/locales/forms/2024/sales/sale_information.en.yml @@ -179,11 +179,24 @@ en: question_text: "Does this include any extra borrowing?" deposit: - page_header: "About the deposit" - check_answer_label: "Deposit amount" - check_answer_prompt: "" - 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?" + discounted_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + 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?" + shared_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" + outright_sale: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" cashdis: page_header: "About the deposit" diff --git a/config/locales/forms/2025/sales/sale_information.en.yml b/config/locales/forms/2025/sales/sale_information.en.yml index ba38c3540..e81e82940 100644 --- a/config/locales/forms/2025/sales/sale_information.en.yml +++ b/config/locales/forms/2025/sales/sale_information.en.yml @@ -212,11 +212,18 @@ en: question_text: "Does this include any extra borrowing?" deposit: - page_header: "About the deposit" - check_answer_label: "Deposit amount" - check_answer_prompt: "" - 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?" + discounted_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + 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?" + shared_ownership: + page_header: "About the deposit" + check_answer_label: "Deposit amount" + check_answer_prompt: "" + hint_text: "Enter the total cash sum paid by the buyer towards the property that was not funded by the mortgage." + question_text: "How much cash deposit was paid on the property?" cashdis: page_header: "About the deposit"