diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index d58e1cf47..677344f5a 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -296,7 +296,6 @@ module Validations::Sales::SaleInformationValidations deposit: record.field_formatted_as_currency("deposit"), mortgage_and_deposit_total: record.field_formatted_as_currency("mortgage_and_deposit_total"), value: record.field_formatted_as_currency("value"), - equity: "#{record.equity}%", stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value")).html_safe end record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.staircasing_mortgage.mortgage_used", @@ -304,7 +303,6 @@ module Validations::Sales::SaleInformationValidations deposit: record.field_formatted_as_currency("deposit"), mortgage_and_deposit_total: record.field_formatted_as_currency("mortgage_and_deposit_total"), value: record.field_formatted_as_currency("value"), - equity: "#{record.equity}%", stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value")).html_safe end elsif over_tolerance?(record.deposit, record.stairbought_part_of_value, 1) diff --git a/app/views/form/guidance/_financial_calculations_shared_ownership.html.erb b/app/views/form/guidance/_financial_calculations_shared_ownership.html.erb index 6ccfae6cf..1a8db70ea 100644 --- a/app/views/form/guidance/_financial_calculations_shared_ownership.html.erb +++ b/app/views/form/guidance/_financial_calculations_shared_ownership.html.erb @@ -1,28 +1,20 @@ -<% mortgage_page = log.form.get_question("mortgage", log).page %> -<% deposit_page = log.form.get_question("deposit", log).page %> -<% equity_page = log.form.get_question("equity", log).page %> -<% value_page = log.form.get_question("value", log).page %> <%= govuk_details(summary_text: "How the financial values are calculated") do %>

<% if log.type == 18 %> The mortgage amount <%= question_link("mortgage", log, current_user) %>, cash deposit <%= question_link("deposit", log, current_user) %>, and cash discount <%= question_link("cashdis", log, current_user) %> - added together must equal - the purchase price <%= question_link("value", log, current_user) %> - <% stairbought_page = log.form.get_question("stairbought", log).page %> - <% equity_page = log.form.get_question("equity", log).page %> - <% if stairbought_page.routed_to?(log, current_user) %> - multiplied by the percentage bought <%= question_link("stairbought", log, current_user) %> - <% else %> - multiplied by the percentage equity stake <%= question_link("equity", log, current_user) %> - <% end %> <% else %> - The mortgage amount (<%= govuk_link_to "Q92", send("#{log.class.name.underscore}_#{mortgage_page.id}_path", log) %>) - and deposit (<%= govuk_link_to "Q96", send("#{log.class.name.underscore}_#{deposit_page.id}_path", log) %>) - added together must equal - the purchase price (<%= govuk_link_to "Q89", send("#{log.class.name.underscore}_#{value_page.id}_path", log) %>) - multiplied by the percentage equity stake (<%= govuk_link_to "Q90", send("#{log.class.name.underscore}_#{equity_page.id}_path", log) %>) + The mortgage amount <%= question_link("mortgage", log, current_user) %> + and cash deposit <%= question_link("deposit", log, current_user) %> + <% end %> + added together must equal + the purchase price <%= question_link("value", log, current_user) %> + <% stairbought_page = log.form.get_question("stairbought", log).page %> + <% if stairbought_page.routed_to?(log, current_user) %> + multiplied by the percentage bought <%= question_link("stairbought", log, current_user) %> + <% else %> + multiplied by the percentage equity stake <%= question_link("equity", log, current_user) %> <% end %>

<% end %>