diff --git a/config/locales/en.yml b/config/locales/en.yml index 0c8ec1bf6..1def54df7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -645,7 +645,7 @@ en: previous_property_type: property_type_bedsit: "A bedsit cannot have more than 1 bedroom" discounted_ownership_value: "The mortgage%{mortgage}, cash deposit (%{deposit}), and grant%{grant} added together is %{mortgage_deposit_and_grant_total}.

The full purchase price%{discount_sentence} is %{value_with_discount}.

These two amounts should be the same." - outright_sale_value: "The mortgage%{mortgage} and deposit (%{deposit}) when added together is %{mortgage_and_deposit_total}.

The full purchase price is %{value}.

These two amounts should be the same." + outright_sale_value: "The mortgage%{mortgage} and cash deposit (%{deposit}) when added together is %{mortgage_and_deposit_total}.

The full purchase price is %{value}.

These two amounts should be the same." monthly_rent: higher_than_expected: "Basic monthly rent must be between £0.00 and £9,999.00" grant: @@ -656,15 +656,15 @@ en: over_discounted_london_max: "The percentage discount multiplied by the purchase price is %{discount_value}. This figure should not be more than £136,400 for properties in London." over_discounted_max: "The percentage discount multiplied by the purchase price is %{discount_value}. This figure should not be more than £102,400 for properties outside of London." non_staircasing_mortgage: - mortgage_used: "The mortgage (%{mortgage}) and deposit (%{deposit}) added together is %{mortgage_and_deposit_total}.

The full purchase price (%{value}) multiplied by the percentage equity stake purchased (%{equity}) is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." - mortgage_not_used: "The deposit is %{deposit}.

The full purchase price (%{value}) multiplied by the percentage bought is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." - mortgage_used_socialhomebuy: "The mortgage amount (%{mortgage}), deposit (%{deposit}), and cash discount (%{cashdis}) added together is %{mortgage_deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage equity stake purchased (%{equity}) is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." - mortgage_not_used_socialhomebuy: "The deposit (%{deposit}) and cash discount (%{cashdis}) added together is %{deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage bought (%{equity}) is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." + mortgage_used: "The mortgage (%{mortgage}) and cash deposit (%{deposit}) added together is %{mortgage_and_deposit_total}.

The full purchase price (%{value}) multiplied by the percentage equity stake purchased (%{equity}) is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." + mortgage_not_used: "The cash deposit is %{deposit}.

The full purchase price (%{value}) multiplied by the percentage bought is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." + mortgage_used_socialhomebuy: "The mortgage amount (%{mortgage}), cash deposit (%{deposit}), and cash discount (%{cashdis}) added together is %{mortgage_deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage equity stake purchased (%{equity}) is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." + mortgage_not_used_socialhomebuy: "The cash deposit (%{deposit}) and cash discount (%{cashdis}) added together is %{deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage bought (%{equity}) is %{expected_shared_ownership_deposit_value}.

These two amounts should be the same." staircasing_mortgage: - mortgage_used: "The mortgage (%{mortgage}) and deposit (%{deposit}) added together is %{mortgage_and_deposit_total}.

The full purchase price (%{value}) multiplied by the percentage bought is %{stairbought_part_of_value}.

These two amounts should be the same." - mortgage_not_used: "The deposit is %{deposit}.

The full purchase price (%{value}) multiplied by the percentage bought is %{stairbought_part_of_value}.

These two amounts should be the same." - mortgage_used_socialhomebuy: "The mortgage amount (%{mortgage}), deposit (%{deposit}), and cash discount (%{cashdis}) added together is %{mortgage_deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage bought (%{stairbought}) is %{stairbought_part_of_value}.

These two amounts should be the same." - mortgage_not_used_socialhomebuy: "The deposit (%{deposit}) and cash discount (%{cashdis}) added together is %{deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage bought (%{stairbought}) is %{stairbought_part_of_value}.

These two amounts should be the same." + mortgage_used: "The mortgage (%{mortgage}) and cash deposit (%{deposit}) added together is %{mortgage_and_deposit_total}.

The full purchase price (%{value}) multiplied by the percentage bought is %{stairbought_part_of_value}.

These two amounts should be the same." + mortgage_not_used: "The cash deposit is %{deposit}.

The full purchase price (%{value}) multiplied by the percentage bought is %{stairbought_part_of_value}.

These two amounts should be the same." + mortgage_used_socialhomebuy: "The mortgage amount (%{mortgage}), cash deposit (%{deposit}), and cash discount (%{cashdis}) added together is %{mortgage_deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage bought (%{stairbought}) is %{stairbought_part_of_value}.

These two amounts should be the same." + mortgage_not_used_socialhomebuy: "The cash deposit (%{deposit}) and cash discount (%{cashdis}) added together is %{deposit_and_discount_total}.

The full purchase price (%{value}) multiplied by the percentage bought (%{stairbought}) is %{stairbought_part_of_value}.

These two amounts should be the same." stairowned: mortgageused_dont_know: "The percentage owned has to be 100% if the mortgage used is 'Don’t know'" merge_request: diff --git a/spec/models/validations/sales/sale_information_validations_spec.rb b/spec/models/validations/sales/sale_information_validations_spec.rb index 7a03f64aa..b12c85260 100644 --- a/spec/models/validations/sales/sale_information_validations_spec.rb +++ b/spec/models/validations/sales/sale_information_validations_spec.rb @@ -538,11 +538,11 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds errors" do sale_information_validator.validate_outright_sale_value_matches_mortgage_plus_deposit(record) - expect(record.errors["mortgageused"]).to include("The mortgage (£100,000.00) and deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") - expect(record.errors["mortgage"]).to include("The mortgage (£100,000.00) and deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The mortgage (£100,000.00) and deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The mortgage (£100,000.00) and deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") - expect(record.errors["ownershipsch"]).to include("The mortgage (£100,000.00) and deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") + expect(record.errors["mortgageused"]).to include("The mortgage (£100,000.00) and cash deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") + expect(record.errors["mortgage"]).to include("The mortgage (£100,000.00) and cash deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The mortgage (£100,000.00) and cash deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The mortgage (£100,000.00) and cash deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") + expect(record.errors["ownershipsch"]).to include("The mortgage (£100,000.00) and cash deposit (£100,000.00) when added together is £200,000.00.

The full purchase price is £300,000.00.

These two amounts should be the same.") end end @@ -868,12 +868,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_non_staircasing_mortgage(record) - expect(record.errors["mortgage"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["equity"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).not_to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgage"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["equity"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).not_to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") end context "and it is a social homebuy" do @@ -884,12 +884,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_non_staircasing_mortgage(record) - expect(record.errors["mortgage"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["equity"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgage"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["equity"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage equity stake purchased (28.0%) is £8,400.00.

These two amounts should be the same.") end end @@ -968,12 +968,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_non_staircasing_mortgage(record) - expect(record.errors["mortgageused"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["equity"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).not_to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgageused"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["equity"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).not_to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") end context "and it is a social homebuy" do @@ -984,12 +984,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_non_staircasing_mortgage(record) - expect(record.errors["mortgageused"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["equity"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgageused"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["equity"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28.0%) is £8,400.00.

These two amounts should be the same.") end end @@ -1087,12 +1087,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_staircasing_mortgage(record) - expect(record.errors["mortgage"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["stairbought"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).not_to include("The mortgage (£10,000.00) and deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgage"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["stairbought"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).not_to include("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") end context "and it is a social homebuy" do @@ -1103,12 +1103,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_staircasing_mortgage(record) - expect(record.errors["mortgage"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["stairbought"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The mortgage amount (£10,000.00), deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgage"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["stairbought"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") end end @@ -1206,12 +1206,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_staircasing_mortgage(record) - expect(record.errors["mortgageused"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["stairbought"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).not_to include("The deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgageused"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["stairbought"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).not_to include("The cash deposit is £5,000.00.

The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.

These two amounts should be the same.") end context "and it is a social homebuy" do @@ -1222,12 +1222,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "adds an error" do sale_information_validator.validate_staircasing_mortgage(record) - expect(record.errors["mortgageused"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["value"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["deposit"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["stairbought"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["cashdis"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") - expect(record.errors["type"]).to include("The deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["mortgageused"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["value"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["deposit"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["stairbought"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["cashdis"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") + expect(record.errors["type"]).to include("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.

The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.

These two amounts should be the same.") end end