CLDC-3987: Change BU validation message for charge fields related to missing charge (#3055)
* Add validation message for missing charge fields in bulk upload
* Update error messages for missing charges in row parser tests
* only annotate errors to the other fields if there was an error
---------
Co-authored-by: Samuel <samuel.young@softwire.com>
missing_charges:"Please enter the %{sentence_fragment}. If there is no %{sentence_fragment}, please enter '0'."
related_to_missing_charge:"You must enter all these fields: basic rent, service charge, personal service charge and support charge. Please enter ‘0' for any types of charges that you don’t issue."
reasonpref:
conflict:
dont_know:"You cannot select 'Don't know' if any of the other reasonable preference reasons are also selected."
missing_charges:"Please enter the %{sentence_fragment}. If there is no %{sentence_fragment}, please enter '0'."
related_to_missing_charge:"You must enter all these fields: basic rent, service charge, personal service charge and support charge. Please enter ‘0' for any types of charges that you don’t issue."
reasonpref:
conflict:
dont_know:"You cannot select 'Don't know' if any of the other reasonable preference reasons are also selected."
expect(parser.errors[:field_127]).toeql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges",sentence_fragment:"personal service charge")])
expect(parser.errors[:field_128]).toeql([I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges",sentence_fragment:"basic rent"),I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges",sentence_fragment:"service charge"),I18n.t("validations.lettings.2024.bulk_upload.charges.missing_charges",sentence_fragment:"personal service charge")])
expect(parser.errors[:field_126]).toeql([I18n.t("validations.lettings.2025.bulk_upload.charges.missing_charges",sentence_fragment:"personal service charge")])
expect(parser.errors[:field_127]).toeql([I18n.t("validations.lettings.2025.bulk_upload.charges.missing_charges",sentence_fragment:"basic rent"),I18n.t("validations.lettings.2025.bulk_upload.charges.missing_charges",sentence_fragment:"service charge"),I18n.t("validations.lettings.2025.bulk_upload.charges.missing_charges",sentence_fragment:"personal service charge")])