|
|
@ -95,6 +95,8 @@ module DerivedVariables::LettingsLogVariables |
|
|
|
|
|
|
|
|
|
|
|
set_housingneeds_fields if housingneeds? |
|
|
|
set_housingneeds_fields if housingneeds? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.uprn_known = 0 if address_answered? |
|
|
|
|
|
|
|
|
|
|
|
if uprn_known&.zero? |
|
|
|
if uprn_known&.zero? |
|
|
|
self.uprn = nil |
|
|
|
self.uprn = nil |
|
|
|
end |
|
|
|
end |
|
|
@ -310,6 +312,10 @@ private |
|
|
|
self.county = nil |
|
|
|
self.county = nil |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def address_answered? |
|
|
|
|
|
|
|
[address_line1, town_or_city].all?(&:present?) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def get_lar |
|
|
|
def get_lar |
|
|
|
return 1 if rent_type == 2 |
|
|
|
return 1 if rent_type == 2 |
|
|
|
return 2 if rent_type == 1 |
|
|
|
return 2 if rent_type == 1 |
|
|
|