diff --git a/app/models/form/sales/pages/extra_borrowing_value_check.rb b/app/models/form/sales/pages/extra_borrowing_value_check.rb deleted file mode 100644 index 5e7f9f10a..000000000 --- a/app/models/form/sales/pages/extra_borrowing_value_check.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Form::Sales::Pages::ExtraBorrowingValueCheck < Form::Page - def initialize(id, hsh, subsection) - super - @depends_on = [ - { - "extra_borrowing_expected?" => true, - }, - ] - @title_text = { - "translation" => "soft_validations.extra_borrowing.title", - } - @informative_text = { - "translation" => "soft_validations.extra_borrowing.hint_text", - "arguments" => [], - } - end - - def questions - @questions ||= [ - Form::Sales::Questions::ExtraBorrowingValueCheck.new(nil, nil, self), - ] - end -end diff --git a/app/models/form/sales/questions/extra_borrowing_value_check.rb b/app/models/form/sales/questions/extra_borrowing_value_check.rb deleted file mode 100644 index a0bae0ba7..000000000 --- a/app/models/form/sales/questions/extra_borrowing_value_check.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Form::Sales::Questions::ExtraBorrowingValueCheck < ::Form::Question - def initialize(id, hsh, page) - super(id, hsh, page) - @id = "extrabor_value_check" - @check_answer_label = "Extra borrowing confirmation" - @type = "interruption_screen" - @answer_options = { - "0" => { "value" => "Yes" }, - "1" => { "value" => "No" }, - } - @hidden_in_check_answers = { - "depends_on" => [ - { - "extrabor_value_check" => 0, - }, - { - "extrabor_value_check" => 1, - }, - ], - } - @header = "Are you sure this there is no extra borrowing?" - end -end diff --git a/app/models/form/sales/subsections/discounted_ownership_scheme.rb b/app/models/form/sales/subsections/discounted_ownership_scheme.rb index 9b58e4ab3..b527cd7d4 100644 --- a/app/models/form/sales/subsections/discounted_ownership_scheme.rb +++ b/app/models/form/sales/subsections/discounted_ownership_scheme.rb @@ -18,7 +18,6 @@ class Form::Sales::Subsections::DiscountedOwnershipScheme < ::Form::Subsection Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_discounted_ownership", nil, self), Form::Sales::Pages::MortgageLength.new("mortgage_length_discounted_ownership", nil, self), Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_discounted_ownership", nil, self), - Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_discounted_ownership", nil, self), Form::Sales::Pages::AboutDepositWithoutDiscount.new("about_deposit_discounted_ownership", nil, self), Form::Sales::Pages::DepositValueCheck.new("discounted_ownership_deposit_value_check", nil, self), Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_discounted_ownership", nil, self), diff --git a/app/models/form/sales/subsections/outright_sale.rb b/app/models/form/sales/subsections/outright_sale.rb index 9994a6d8f..82099dab6 100644 --- a/app/models/form/sales/subsections/outright_sale.rb +++ b/app/models/form/sales/subsections/outright_sale.rb @@ -15,7 +15,6 @@ class Form::Sales::Subsections::OutrightSale < ::Form::Subsection Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_outright_sale", nil, self), Form::Sales::Pages::MortgageLength.new("mortgage_length_outright_sale", nil, self), Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_outright_sale", nil, self), - Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_outright_sale", nil, self), Form::Sales::Pages::AboutDepositWithoutDiscount.new("about_deposit_outright_sale", nil, self), Form::Sales::Pages::DepositValueCheck.new("outright_sale_deposit_value_check", nil, self), Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_outright_sale", nil, self), diff --git a/app/models/form/sales/subsections/shared_ownership_scheme.rb b/app/models/form/sales/subsections/shared_ownership_scheme.rb index 28b24e887..8b5ff0902 100644 --- a/app/models/form/sales/subsections/shared_ownership_scheme.rb +++ b/app/models/form/sales/subsections/shared_ownership_scheme.rb @@ -26,7 +26,6 @@ class Form::Sales::Subsections::SharedOwnershipScheme < ::Form::Subsection Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_shared_ownership", nil, self), Form::Sales::Pages::MortgageLength.new("mortgage_length_shared_ownership", nil, self), Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_shared_ownership", nil, self), - Form::Sales::Pages::ExtraBorrowingValueCheck.new("extra_borrowing_value_check_shared_ownership", nil, self), Form::Sales::Pages::AboutDepositWithDiscount.new(nil, nil, self), Form::Sales::Pages::AboutDepositWithoutDiscount.new("about_deposit_shared_ownership", nil, self), Form::Sales::Pages::DepositValueCheck.new("shared_ownership_deposit_value_check", nil, self), diff --git a/app/models/validations/sales/soft_validations.rb b/app/models/validations/sales/soft_validations.rb index 719075c06..db061704d 100644 --- a/app/models/validations/sales/soft_validations.rb +++ b/app/models/validations/sales/soft_validations.rb @@ -36,8 +36,4 @@ module Validations::Sales::SoftValidations deposit > savings * 4 / 3 end - - def extra_borrowing_expected? - true - end end diff --git a/config/locales/en.yml b/config/locales/en.yml index a2d1a2eab..788b3a710 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -410,9 +410,6 @@ en: max: title: "You told us this person is %{age} or over and not retired" hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." - extra_borrowing: - title: "You told us this doesn't include any extra borrowing" - hint_text: "The mortgage and deposit are higher than the purchase minus the discount" pregnancy: title: "You told us somebody in the household is pregnant" no_females: "You also told us there are no female tenants living at the property." diff --git a/db/migrate/20230118170602_add_extra_borrowing_value_check_to_sales.rb b/db/migrate/20230118170602_add_extra_borrowing_value_check_to_sales.rb deleted file mode 100644 index ce4e79718..000000000 --- a/db/migrate/20230118170602_add_extra_borrowing_value_check_to_sales.rb +++ /dev/null @@ -1,7 +0,0 @@ -class AddExtraBorrowingValueCheckToSales < ActiveRecord::Migration[7.0] - def change - change_table :sales_logs, bulk: true do |t| - t.column :extrabor_value_check, :integer - end - end -end diff --git a/db/schema.rb b/db/schema.rb index fc9828247..620a49c79 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_01_18_170602) do +ActiveRecord::Schema[7.0].define(version: 2023_01_13_125117) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -497,7 +497,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_18_170602) do t.integer "pcodenk" t.string "postcode_full" t.boolean "is_la_inferred" - t.integer "extrabor_value_check" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id" t.index ["updated_by_id"], name: "index_sales_logs_on_updated_by_id"