@ -59,14 +59,10 @@ module DerivedVariables::LettingsLogVariables
self.hhtype = household_type
self.new_old = new_or_existing_tenant
if is_supported_housing?
if location
if is_supported_housing? && location
self.wchair = location.mobility_type_before_type_cast == "W" ? 1 : 2
end
if is_renewal?
self.voiddate = startdate
self.voiddate = startdate if is_renewal?
self.vacdays = property_vacant_days
set_housingneeds_fields if housingneeds?
@ -245,6 +245,7 @@ RSpec.describe "Form Check Answers Page" do
reason: 4,
ppostcode_full: "SE2 6RT",
mrcdate: Time.zone.parse("03/11/2019"),
renewal: 0,
)
@ -10,6 +10,7 @@ RSpec.describe "validations" do
:in_progress,
owning_organisation: user.organisation,
managing_organisation: user.organisation,
let(:empty_lettings_log) do
@ -1395,7 +1395,6 @@ RSpec.describe LettingsLog do
renewal: 1,
startdate: Time.zone.local(2021, 4, 10),
created_at: Time.utc(2022, 2, 8, 16, 52, 15),
needstype: 2,
})