diff --git a/app/models/case_log.rb b/app/models/case_log.rb index 1cb3a4cc9..38e8deb0e 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -243,22 +243,6 @@ private self.month = startdate.month self.year = startdate.year end - case net_income_known - when "Weekly" - self.incfreq = "Weekly" - self.incref = nil - when "Monthly" - self.incfreq = "Monthly" - self.incref = nil - when "Annually" - self.incfreq = "Yearly" - self.incref = nil - when "Tenant prefers not to say" - self.incref = 1 - self.incfreq = nil - when "Don’t know" - self.incfreq = nil - end self.hhmemb = other_hhmemb + 1 if other_hhmemb.present? self.renttype = RENT_TYPE_MAPPING[rent_type] self.lettype = "#{renttype} #{needstype} #{owning_organisation[:provider_type]}" if renttype.present? && needstype.present? && owning_organisation[:provider_type].present? diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 0a836a9c2..34d753d07 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -2311,76 +2311,33 @@ } } }, - "weekly_net_income": { - "depends_on": [{ "net_income_known": "Weekly" }], + "net_income": { + "depends_on": [{ "net_income_known": "Yes" }], "header": "", "description": "", "questions": { "earnings": { "check_answer_label": "Total household income", - "header": "How much income does the household have in total every week?", + "header": "How much income does the household have in total", + "guidance_partial": "what_counts_as_income", "hint_text": "", "type": "numeric", "min": 0, "step": "1", "width": 5, - "prefix": "£", - "suffix": " every week" - } - }, - "soft_validations": { - "override_net_income_validation": { - "check_answer_label": "Net income confirmed?", - "type": "validation_override", - "answer_options": { - "override_net_income_validation": "Yes" - } - } - } - }, - "monthly_net_income": { - "depends_on": [{ "net_income_known": "Monthly" }], - "header": "", - "description": "", - "questions": { - "earnings": { - "check_answer_label": "Total household income", - "header": "How much income does the household have in total every month?", + "prefix": "£" + }, + "incfreq": { + "check_answer_label": "How often does the household receive this amount?", + "header": "How often does the household receive this amount?", "hint_text": "", - "type": "numeric", - "min": 0, - "step": "1", - "width": 5, - "prefix": "£", - "suffix": " every month" - } - }, - "soft_validations": { - "override_net_income_validation": { - "check_answer_label": "Net income confirmed?", - "type": "validation_override", + "type": "radio", "answer_options": { - "override_net_income_validation": "Yes" + "0": "Weekly", + "1": "Monthly", + "2": "Yearly" } } - } - }, - "yearly_net_income": { - "depends_on": [{ "net_income_known": "Annually" }], - "header": "", - "description": "", - "questions": { - "earnings": { - "check_answer_label": "Total household income", - "header": "How much income does the household have in total every year?", - "hint_text": "", - "type": "numeric", - "min": 0, - "step": "1", - "width": 5, - "prefix": "£", - "suffix": " every year" - } }, "soft_validations": { "override_net_income_validation": {