From ce6cee88a8fe60124513e9e8780610236d8e2365 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:39:54 +0100 Subject: [PATCH] CLDC-3569 Update missed errors (#2548) * Update some skipped error messages * Remove repeating deposit question --- .../subsections/shared_ownership_scheme.rb | 6 +-- .../sales/sale_information_validations.rb | 50 ++++++++++++++++--- config/locales/en.yml | 8 +-- .../shared_ownership_scheme_spec.rb | 3 +- .../sale_information_validations_spec.rb | 48 +++++++++--------- 5 files changed, 75 insertions(+), 40 deletions(-) diff --git a/app/models/form/sales/subsections/shared_ownership_scheme.rb b/app/models/form/sales/subsections/shared_ownership_scheme.rb index 0d9f363a0..bcf6d8be6 100644 --- a/app/models/form/sales/subsections/shared_ownership_scheme.rb +++ b/app/models/form/sales/subsections/shared_ownership_scheme.rb @@ -39,14 +39,12 @@ class Form::Sales::Subsections::SharedOwnershipScheme < ::Form::Subsection Form::Sales::Pages::MortgageLenderOther.new("mortgage_lender_other_shared_ownership", nil, self, ownershipsch: 1), Form::Sales::Pages::MortgageLength.new("mortgage_length_shared_ownership", nil, self, ownershipsch: 1), Form::Sales::Pages::ExtraBorrowing.new("extra_borrowing_shared_ownership", nil, self, ownershipsch: 1), - Form::Sales::Pages::Deposit.new("deposit", nil, self, optional: false, ownershipsch: 1), - Form::Sales::Pages::Discount.new("discount", nil, self, optional: false), - (Form::Sales::Pages::Deposit.new("deposit_optional", nil, self, optional: true, ownershipsch: 1) if form.start_year_after_2024?), - (Form::Sales::Pages::Discount.new("discount_optional", nil, self, optional: true) if form.start_year_after_2024?), Form::Sales::Pages::Deposit.new("deposit_shared_ownership", nil, self, ownershipsch: 1, optional: false), (Form::Sales::Pages::Deposit.new("deposit_shared_ownership_optional", nil, self, ownershipsch: 1, optional: true) if form.start_year_after_2024?), Form::Sales::Pages::DepositValueCheck.new("deposit_joint_purchase_value_check", nil, self, joint_purchase: true), Form::Sales::Pages::DepositValueCheck.new("deposit_value_check", nil, self, joint_purchase: false), + Form::Sales::Pages::Discount.new("discount", nil, self, optional: false), + (Form::Sales::Pages::Discount.new("discount_optional", nil, self, optional: true) if form.start_year_after_2024?), Form::Sales::Pages::SharedOwnershipDepositValueCheck.new("shared_ownership_deposit_value_check", nil, self), Form::Sales::Pages::MonthlyRent.new(nil, nil, self), Form::Sales::Pages::LeaseholdCharges.new("leasehold_charges_shared_ownership", nil, self, ownershipsch: 1), diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index 92a1cd172..e2706c751 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -176,9 +176,21 @@ module Validations::Sales::SaleInformationValidations elsif record.mortgage_not_used? if over_tolerance?(record.deposit_and_discount_total, record.expected_shared_ownership_deposit_value, 1) %i[mortgageused value deposit cashdis equity].each do |field| - record.errors.add field, I18n.t("validations.sale_information.non_staircasing_mortgage.mortgage_not_used_socialhomebuy", deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), expected_shared_ownership_deposit_value: record.field_formatted_as_currency("expected_shared_ownership_deposit_value")) + record.errors.add field, I18n.t("validations.sale_information.non_staircasing_mortgage.mortgage_not_used_socialhomebuy", + deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), + expected_shared_ownership_deposit_value: record.field_formatted_as_currency("expected_shared_ownership_deposit_value"), + value: record.field_formatted_as_currency("value"), + deposit: record.field_formatted_as_currency("deposit"), + cashdis: record.field_formatted_as_currency("cashdis"), + equity: "#{record.equity}%").html_safe end - record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.non_staircasing_mortgage.mortgage_not_used_socialhomebuy", deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), expected_shared_ownership_deposit_value: record.field_formatted_as_currency("expected_shared_ownership_deposit_value")) + record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.non_staircasing_mortgage.mortgage_not_used_socialhomebuy", + deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), + expected_shared_ownership_deposit_value: record.field_formatted_as_currency("expected_shared_ownership_deposit_value"), + value: record.field_formatted_as_currency("value"), + deposit: record.field_formatted_as_currency("deposit"), + cashdis: record.field_formatted_as_currency("cashdis"), + equity: "#{record.equity}%").html_safe end end end @@ -211,15 +223,41 @@ module Validations::Sales::SaleInformationValidations if over_tolerance?(record.mortgage_deposit_and_discount_total, record.stairbought_part_of_value, 1) %i[mortgage value deposit cashdis stairbought].each do |field| - record.errors.add field, I18n.t("validations.sale_information.staircasing_mortgage.mortgage_used_socialhomebuy", mortgage_deposit_and_discount_total: record.field_formatted_as_currency("mortgage_deposit_and_discount_total"), stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value")) + record.errors.add field, I18n.t("validations.sale_information.staircasing_mortgage.mortgage_used_socialhomebuy", + mortgage_deposit_and_discount_total: record.field_formatted_as_currency("mortgage_deposit_and_discount_total"), + stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value"), + mortgage: record.field_formatted_as_currency("mortgage"), + value: record.field_formatted_as_currency("value"), + deposit: record.field_formatted_as_currency("deposit"), + cashdis: record.field_formatted_as_currency("cashdis"), + stairbought: "#{record.stairbought}%").html_safe end - record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.staircasing_mortgage.mortgage_used_socialhomebuy", mortgage_deposit_and_discount_total: record.field_formatted_as_currency("mortgage_deposit_and_discount_total"), stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value")) + record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.staircasing_mortgage.mortgage_used_socialhomebuy", + mortgage_deposit_and_discount_total: record.field_formatted_as_currency("mortgage_deposit_and_discount_total"), + stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value"), + mortgage: record.field_formatted_as_currency("mortgage"), + value: record.field_formatted_as_currency("value"), + deposit: record.field_formatted_as_currency("deposit"), + cashdis: record.field_formatted_as_currency("cashdis"), + stairbought: "#{record.stairbought}%").html_safe end elsif over_tolerance?(record.deposit_and_discount_total, record.stairbought_part_of_value, 1) %i[mortgageused value deposit cashdis stairbought].each do |field| - record.errors.add field, I18n.t("validations.sale_information.staircasing_mortgage.mortgage_not_used_socialhomebuy", deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value")) + record.errors.add field, I18n.t("validations.sale_information.staircasing_mortgage.mortgage_not_used_socialhomebuy", + deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), + stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value"), + value: record.field_formatted_as_currency("value"), + deposit: record.field_formatted_as_currency("deposit"), + cashdis: record.field_formatted_as_currency("cashdis"), + stairbought: "#{record.stairbought}%").html_safe end - record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.staircasing_mortgage.mortgage_not_used_socialhomebuy", deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value")) + record.errors.add :type, :skip_bu_error, message: I18n.t("validations.sale_information.staircasing_mortgage.mortgage_not_used_socialhomebuy", + deposit_and_discount_total: record.field_formatted_as_currency("deposit_and_discount_total"), + stairbought_part_of_value: record.field_formatted_as_currency("stairbought_part_of_value"), + value: record.field_formatted_as_currency("value"), + deposit: record.field_formatted_as_currency("deposit"), + cashdis: record.field_formatted_as_currency("cashdis"), + stairbought: "#{record.stairbought}%").html_safe end end diff --git a/config/locales/en.yml b/config/locales/en.yml index e4cc52ecf..c204d91e6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -658,13 +658,13 @@ en: non_staircasing_mortgage: mortgage_used: "The mortgage and deposit added together is %{mortgage_and_deposit_total}. The value multiplied by the percentage bought is %{expected_shared_ownership_deposit_value}. These figures should be the same." mortgage_not_used: "The deposit is %{deposit} and the value multiplied by the percentage bought is %{expected_shared_ownership_deposit_value}. These figures 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 and cash discount added together is %{deposit_and_discount_total}. The value multiplied by the percentage bought is %{expected_shared_ownership_deposit_value}. These figures 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." staircasing_mortgage: mortgage_used: "The mortgage and deposit added together is %{mortgage_and_deposit_total}. The value multiplied by the percentage bought is %{stairbought_part_of_value}. These figures should be the same." mortgage_not_used: "The deposit is %{deposit} and the value multiplied by the percentage bought is %{stairbought_part_of_value}. These figures should be the same." - mortgage_used_socialhomebuy: "The mortgage, deposit, and cash discount added together is %{mortgage_deposit_and_discount_total}. The value multiplied by the percentage bought is %{stairbought_part_of_value}. These figures should be the same." - mortgage_not_used_socialhomebuy: "The deposit and cash discount added together is %{deposit_and_discount_total}. The value multiplied by the percentage bought is %{stairbought_part_of_value}. These figures 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." 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/form/sales/subsections/shared_ownership_scheme_spec.rb b/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb index 685e92877..e28fad3cc 100644 --- a/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb +++ b/spec/models/form/sales/subsections/shared_ownership_scheme_spec.rb @@ -49,11 +49,10 @@ RSpec.describe Form::Sales::Subsections::SharedOwnershipScheme, type: :model do mortgage_lender_other_shared_ownership mortgage_length_shared_ownership extra_borrowing_shared_ownership - deposit - discount deposit_shared_ownership deposit_joint_purchase_value_check deposit_value_check + discount shared_ownership_deposit_value_check monthly_rent leasehold_charges_shared_ownership diff --git a/spec/models/validations/sales/sale_information_validations_spec.rb b/spec/models/validations/sales/sale_information_validations_spec.rb index d1becd432..65359b30f 100644 --- a/spec/models/validations/sales/sale_information_validations_spec.rb +++ b/spec/models/validations/sales/sale_information_validations_spec.rb @@ -882,12 +882,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), 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.") end end @@ -982,12 +982,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 and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["value"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["deposit"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["equity"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["cashdis"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["type"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") + 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.") end end @@ -1101,12 +1101,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, deposit, and cash discount added together is £15,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["value"]).to include("The mortgage, deposit, and cash discount added together is £15,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["deposit"]).to include("The mortgage, deposit, and cash discount added together is £15,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["stairbought"]).to include("The mortgage, deposit, and cash discount added together is £15,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["cashdis"]).to include("The mortgage, deposit, and cash discount added together is £15,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["type"]).to include("The mortgage, deposit, and cash discount added together is £15,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") + 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.") end end @@ -1220,12 +1220,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 and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["value"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["deposit"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["stairbought"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["cashdis"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") - expect(record.errors["type"]).to include("The deposit and cash discount added together is £5,200.00. The value multiplied by the percentage bought is £8,400.00. These figures should be the same.") + 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.") end end