|
|
|
@ -28,7 +28,7 @@ module Validations::SoftValidations
|
|
|
|
|
def rent_in_soft_min_range? |
|
|
|
|
return unless brent && weekly_value(brent) && startdate |
|
|
|
|
|
|
|
|
|
beds = needstype == 2 ? 0 : self.beds |
|
|
|
|
beds = needstype == 2 ? 0 : [self.beds, 4].min |
|
|
|
|
la = needstype == 2 ? Location.find(location_id).location_code : self.la |
|
|
|
|
|
|
|
|
|
rent_range = LaRentRange.find_by(start_year: collection_start_year, la:, beds:, lettype: get_lettype) |
|
|
|
@ -38,7 +38,7 @@ module Validations::SoftValidations
|
|
|
|
|
def rent_in_soft_max_range? |
|
|
|
|
return unless brent && weekly_value(brent) && startdate |
|
|
|
|
|
|
|
|
|
beds = needstype == 2 ? 0 : self.beds |
|
|
|
|
beds = needstype == 2 ? 0 : [self.beds, 4].min |
|
|
|
|
la = needstype == 2 ? Location.find(location_id).location_code : self.la |
|
|
|
|
|
|
|
|
|
rent_range = LaRentRange.find_by(start_year: collection_start_year, la:, beds:, lettype: get_lettype) |
|
|
|
|