<li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li>
</ul>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023/24 data.") %>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023 to 2024 data.") %>
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span>
<span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of lettings logs.</p>
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span>
<span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of sales logs.</p>
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
later_than_14_days_after:"The tenancy start date must not be later than 14 days from today’s date."
before_scheme_end_date:"The tenancy start date must be before the end date for this supported housing scheme."
after_void_date:"Enter a tenancy start date that is after the void date."
next_two_weeks:"Sale completion date must not be later than 14 days from today’s date."
must_be_within:
current_collection_year:
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{current_start_year_short} to %{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
"Enter a date within the %{previous_start_year_short} to %{previous_end_year_short} or %{previous_end_year_short} to %{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
invalid:
merged_organisations:
"Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{2}\/\d{2} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{4} to \d{4} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
end
end
@ -47,7 +47,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{2}\/\d{2} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
expect(record.errors[:saledate]).toinclude(/Enter a date within the \d{4} to \d{4} collection year, which is between 1st April \d{4} and 31st March \d{4}/)
end
end
end
@ -91,7 +91,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors[:saledate]).toinclude("Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors[:saledate]).toinclude("Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
end
@ -105,7 +105,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors[:saledate]).toinclude("Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors[:saledate]).toinclude("Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
end
@ -119,7 +119,7 @@ RSpec.describe Validations::Sales::SetupValidations do
it"cannot create new logs for the archived collection year"do
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
it"can edit already created logs for the previous collection year"do
@ -127,7 +127,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["saledate"]).not_toinclude(match"Enter a date within the 24/25 collection year, which is between 1st April 2024 and 31st March 2025.")
expect(record.errors["saledate"]).not_toinclude(match"Enter a date within the 2024 to 2025 collection year, which is between 1st April 2024 and 31st March 2025.")
end
end
@ -142,7 +142,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
end
it"cannot edit already created logs for the archived collection year"do
@ -150,7 +150,7 @@ RSpec.describe Validations::Sales::SetupValidations do
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 23/24 or 24/25 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["saledate"]).toinclude(match"Enter a date within the 2023 to 2024 or 2024 to 2025 collection years, which is between 1st April 2023 and 31st March 2025.")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 21/22 or 22/23 collection years, which is between 1st April 2021 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2021 to 2022 or 2022 to 2023 collection years, which is between 1st April 2021 and 31st March 2023")
end
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 21/22 or 22/23 collection years, which is between 1st April 2021 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2021 to 2022 or 2022 to 2023 collection years, which is between 1st April 2021 and 31st March 2023")
end
end
@ -39,19 +39,19 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 collection year, which is between 1st April 2022 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 collection year, which is between 1st April 2022 and 31st March 2023")
end
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 collection year, which is between 1st April 2022 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 collection year, which is between 1st April 2022 and 31st March 2023")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 or 23/24 collection years, which is between 1st April 2022 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 or 2023 to 2024 collection years, which is between 1st April 2022 and 31st March 2024")
end
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 22/23 or 23/24 collection years, which is between 1st April 2022 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2022 to 2023 or 2023 to 2024 collection years, which is between 1st April 2022 and 31st March 2024")
end
end
@ -83,14 +83,14 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
it"cannot be after the second collection window end date"do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
@ -104,7 +104,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
xit"can edit already created logs for the previous collection year"do
@ -113,7 +113,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).not_toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).not_toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
@ -127,7 +127,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
it"cannot edit already created logs for the previous collection year"do
@ -136,7 +136,7 @@ RSpec.describe Validations::SetupValidations do
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024")
expect(record.errors["startdate"]).toinclude(match"Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024")
end
end
end
@ -157,7 +157,7 @@ RSpec.describe Validations::SetupValidations do
record.startdate=Time.zone.local(2024,4,1)
setup_validator.validate_startdate_setup(record)
expect(record.errors["startdate"].length).tobe>=2
expect(record.errors["startdate"][0]).toeq("Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024.")
expect(record.errors["startdate"][0]).toeq("Enter a date within the 2023 to 2024 collection year, which is between 1st April 2023 and 31st March 2024.")