|
|
@ -28,14 +28,14 @@ module Validations::SoftValidations |
|
|
|
def rent_in_soft_min_range? |
|
|
|
def rent_in_soft_min_range? |
|
|
|
return unless brent && weekly_value(brent) && startdate |
|
|
|
return unless brent && weekly_value(brent) && startdate |
|
|
|
|
|
|
|
|
|
|
|
rent_range = LaRentRange.find_by(start_year: collection_start_year, la:, beds:, lettype:) |
|
|
|
rent_range = LaRentRange.find_by(start_year: collection_start_year, la:, beds:, lettype: get_lettype) |
|
|
|
rent_range.present? && weekly_value(brent).between?(rent_range.hard_min, rent_range.soft_min) |
|
|
|
rent_range.present? && weekly_value(brent).between?(rent_range.hard_min, rent_range.soft_min) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def rent_in_soft_max_range? |
|
|
|
def rent_in_soft_max_range? |
|
|
|
return unless brent && weekly_value(brent) && startdate |
|
|
|
return unless brent && weekly_value(brent) && startdate |
|
|
|
|
|
|
|
|
|
|
|
rent_range = LaRentRange.find_by(start_year: collection_start_year, la:, beds:, lettype:) |
|
|
|
rent_range = LaRentRange.find_by(start_year: collection_start_year, la:, beds:, lettype: get_lettype) |
|
|
|
rent_range.present? && weekly_value(brent).between?(rent_range.soft_max, rent_range.hard_max) |
|
|
|
rent_range.present? && weekly_value(brent).between?(rent_range.soft_max, rent_range.hard_max) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|