|
|
|
@ -259,6 +259,11 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
hb == 7 |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def receives_housing_related_benefits? |
|
|
|
|
receives_housing_benefit_only? || receives_uc_with_housing_element_excl_housing_benefit? || |
|
|
|
|
receives_housing_benefit_and_universal_credit? |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def benefits_unknown? |
|
|
|
|
hb == 3 |
|
|
|
|
end |
|
|
|
@ -351,10 +356,8 @@ private
|
|
|
|
|
self.wtcharge = weekly_value(tcharge) if tcharge.present? |
|
|
|
|
end |
|
|
|
|
self.has_benefits = get_has_benefits |
|
|
|
|
if tshortfall && (receives_housing_benefit_only? || |
|
|
|
|
receives_housing_benefit_and_universal_credit? || |
|
|
|
|
receives_uc_with_housing_element_excl_housing_benefit?) |
|
|
|
|
self.wtshortfall = weekly_value(tshortfall) |
|
|
|
|
self.wtshortfall = if tshortfall && receives_housing_related_benefits? |
|
|
|
|
weekly_value(tshortfall) |
|
|
|
|
end |
|
|
|
|
self.nocharge = household_charge&.zero? ? 1 : 0 |
|
|
|
|
self.underoccupation_benefitcap = 3 if renewal == 1 && year == 2021 |
|
|
|
|