Browse Source

CLDC-2882 Added 20 "Tenant moved to long-stay hospital or similar institution" as a non-renewal or first let vacancy reason, and changed the conditions for the void date to only rely on whether a letting is a renewal.

pull/1982/head
David May-Miller 3 years ago
parent
commit
00ed7e6dc6
  1. 3
      app/models/form/lettings/pages/void_date.rb
  2. 2
      app/models/lettings_log.rb

3
app/models/form/lettings/pages/void_date.rb

@ -2,8 +2,7 @@ class Form::Lettings::Pages::VoidDate < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "void_date"
@depends_on = [{ "is_renewal?" => false, "vacancy_reason_not_renewal_or_first_let?" => true },
{ "is_renewal?" => false, "has_first_let_vacancy_reason?" => true }]
@depends_on = [{ "is_renewal?" => false }]
end
def questions

2
app/models/lettings_log.rb

@ -338,7 +338,7 @@ class LettingsLog < Log
end
def vacancy_reason_not_renewal_or_first_let?
[5, 6, 8, 9, 10, 11, 12, 13, 18, 19].include? rsnvac
[5, 6, 8, 9, 10, 11, 12, 13, 18, 19, 20].include? rsnvac
end
def previous_tenancy_was_temporary?

Loading…
Cancel
Save