From 7bce9be9bece4fe97884819c926947577c2c551d Mon Sep 17 00:00:00 2001 From: Aaron Spencer Date: Wed, 21 Jun 2023 22:40:15 +0100 Subject: [PATCH] CLDC-2545: Mortgage used validation condition --- app/models/validations/sales/sale_information_validations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index bf3c2af86..b802fa08f 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -50,7 +50,7 @@ module Validations::Sales::SaleInformationValidations def validate_discounted_ownership_value(record) return unless record.saledate && collection_start_year_for_date(record.saledate) >= 2024 return unless record.value && record.deposit && record.ownershipsch - return unless record.mortgage || record.mortgageused == 2 + return unless record.mortgage || record.mortgageused == 2 || record.mortgageused == 3 return unless record.discount || record.grant || record.type == 29 if record.mortgage_deposit_and_grant_total != record.value_with_discount && record.discounted_ownership_sale?