@ -76,8 +76,8 @@ module DerivedVariables::LettingsLogVariables
self.voiddate = startdate
self.unitletas = form.start_date.year >= 2023 ? UNITLETAS_MAPPING_23_24[rent_type] : UNITLETAS_MAPPING[rent_type]
if is_general_needs?
self.prevten = 32 if managing_organisation&.provider_type == "PRP"
self.prevten = 32 if owning_organisation&.provider_type == "PRP"
self.prevten = 30 if managing_organisation&.provider_type == "LA"
self.prevten = 30 if owning_organisation&.provider_type == "LA"
end
@ -2,7 +2,7 @@ class Form::Lettings::Pages::Referral < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "referral"
@depends_on = [{ "managing_organisation_provider_type" => "LA", "needstype" => 1, "renewal" => 0 }]
@depends_on = [{ "owning_organisation_provider_type" => "LA", "needstype" => 1, "renewal" => 0 }]
def questions
@ -2,7 +2,7 @@ class Form::Lettings::Pages::ReferralPrp < ::Form::Page
@id = "referral_prp"
@depends_on = [{ "managing_organisation_provider_type" => "PRP", "needstype" => 1, "renewal" => 0 }]
@depends_on = [{ "owning_organisation_provider_type" => "PRP", "needstype" => 1, "renewal" => 0 }]
@ -2,7 +2,7 @@ class Form::Lettings::Pages::ReferralSupportedHousing < ::Form::Page
@id = "referral_supported_housing"
@depends_on = [{ "managing_organisation_provider_type" => "LA", "needstype" => 2, "renewal" => 0 }]
@depends_on = [{ "owning_organisation_provider_type" => "LA", "needstype" => 2, "renewal" => 0 }]
@ -2,7 +2,7 @@ class Form::Lettings::Pages::ReferralSupportedHousingPrp < ::Form::Page
@id = "referral_supported_housing_prp"
@depends_on = [{ "managing_organisation_provider_type" => "PRP", "needstype" => 2, "renewal" => 0 }]
@depends_on = [{ "owning_organisation_provider_type" => "PRP", "needstype" => 2, "renewal" => 0 }]
@ -493,8 +493,8 @@ class LettingsLog < Log
update(unresolved: false)
def managing_organisation_provider_type
def owning_organisation_provider_type
managing_organisation&.provider_type
owning_organisation&.provider_type
def reset_created_by!
@ -7010,7 +7010,7 @@
},
"depends_on": [
{
"managing_organisation_provider_type": "LA",
"owning_organisation_provider_type": "LA",
"needstype": 1,
"renewal": 0
}
@ -7067,7 +7067,7 @@
"managing_organisation_provider_type": "PRP",
"owning_organisation_provider_type": "PRP",
@ -7124,7 +7124,7 @@
"needstype": 2,
@ -7184,7 +7184,7 @@