|
|
|
|
@ -651,10 +651,11 @@ private
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def validate_lettings_allocation |
|
|
|
|
if cbl.blank? && cap.blank? && chr.blank? |
|
|
|
|
if cbl.blank? && cap.blank? && chr.blank? && accessible_register.blank? |
|
|
|
|
errors.add(:field_112, I18n.t("validations.not_answered", question: "was the letting made under the Choice-Based Lettings (CBL)?")) |
|
|
|
|
errors.add(:field_113, I18n.t("validations.not_answered", question: "was the letting made under the Common Allocation Policy (CAP)?")) |
|
|
|
|
errors.add(:field_114, I18n.t("validations.not_answered", question: "was the letting made under the Common Housing Register (CHR)?")) |
|
|
|
|
errors.add(:field_115, I18n.t("validations.not_answered", question: "was the letting made under the Accessible Register?")) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
@ -947,7 +948,7 @@ private
|
|
|
|
|
cbl: %i[field_112], |
|
|
|
|
chr: %i[field_114], |
|
|
|
|
cap: %i[field_113], |
|
|
|
|
letting_allocation: %i[field_112 field_113 field_114], |
|
|
|
|
letting_allocation: %i[field_112 field_113 field_114 field_115], |
|
|
|
|
|
|
|
|
|
referral: %i[field_116], |
|
|
|
|
|
|
|
|
|
@ -1401,7 +1402,7 @@ private
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def letting_allocation_unknown |
|
|
|
|
[cbl, chr, cap].all?(0) ? 1 : 0 |
|
|
|
|
[cbl, chr, cap, accessible_register].all?(0) ? 1 : 0 |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def net_income_known |
|
|
|
|
|