|
|
@ -468,9 +468,19 @@ private |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def dynamically_not_required |
|
|
|
def dynamically_not_required |
|
|
|
previous_la_known_field = postcode_known? ? %w[previous_la_known] : [] |
|
|
|
not_required = [] |
|
|
|
tshortfall_field = tshortfall_unknown? ? %w[tshortfall] : [] |
|
|
|
not_required << "previous_la_known" if postcode_known? |
|
|
|
previous_la_known_field + tshortfall_field |
|
|
|
not_required << "tshortfall" if tshortfall_unknown? |
|
|
|
|
|
|
|
not_required << "tenancylength" if tenancylength_optional? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
not_required |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def tenancylength_optional? |
|
|
|
|
|
|
|
return false unless collection_start_year |
|
|
|
|
|
|
|
return true if collection_start_year < 2022 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collection_start_year >= 2022 && ![4, 6].include?(tenancy) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def set_derived_fields! |
|
|
|
def set_derived_fields! |
|
|
|