Browse Source

Use helper

pull/578/head
baarkerlounger 3 years ago
parent
commit
2e0e5361ca
  1. 6
      app/models/case_log.rb

6
app/models/case_log.rb

@ -191,6 +191,10 @@ class CaseLog < ApplicationRecord
tshortfall_known == 1 tshortfall_known == 1
end end
def is_fixed_term_tenancy?
[4, 6].include?(tenancy)
end
def is_secure_tenancy? def is_secure_tenancy?
return unless collection_start_year return unless collection_start_year
@ -480,7 +484,7 @@ private
return false unless collection_start_year return false unless collection_start_year
return true if collection_start_year < 2022 return true if collection_start_year < 2022
collection_start_year >= 2022 && ![4, 6].include?(tenancy) collection_start_year >= 2022 && !is_fixed_term_tenancy?
end end
def set_derived_fields! def set_derived_fields!

Loading…
Cancel
Save