From 3eacbcb0d8abafbdbee059cd7e4778e56e2144bb Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:24:06 +0000 Subject: [PATCH 1/9] CLDC-2951 Display postcodes error on ownership type (#2111) * Display postcodes error on ownership type * Add error to uprn --- app/models/validations/sales/property_validations.rb | 2 ++ .../models/validations/sales/property_validations_spec.rb | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/app/models/validations/sales/property_validations.rb b/app/models/validations/sales/property_validations.rb index b1bdb5b62..3a8f6a463 100644 --- a/app/models/validations/sales/property_validations.rb +++ b/app/models/validations/sales/property_validations.rb @@ -5,6 +5,8 @@ module Validations::Sales::PropertyValidations if record.discounted_ownership_sale? && record.ppostcode_full != record.postcode_full record.errors.add :postcode_full, I18n.t("validations.property.postcode.must_match_previous") record.errors.add :ppostcode_full, I18n.t("validations.property.postcode.must_match_previous") + record.errors.add :ownershipsch, I18n.t("validations.property.postcode.must_match_previous") + record.errors.add :uprn, I18n.t("validations.property.postcode.must_match_previous") end end diff --git a/spec/models/validations/sales/property_validations_spec.rb b/spec/models/validations/sales/property_validations_spec.rb index af65446fc..0152428d8 100644 --- a/spec/models/validations/sales/property_validations_spec.rb +++ b/spec/models/validations/sales/property_validations_spec.rb @@ -25,12 +25,16 @@ RSpec.describe Validations::Sales::PropertyValidations do record.postcode_full = "SW1A 1AA" property_validator.validate_postcodes_match_if_discounted_ownership(record) expect(record.errors["postcode_full"]).to be_empty + expect(record.errors["ppostcode_full"]).to be_empty + expect(record.errors["ownershipsch"]).to be_empty end it "when postcode_full is not present no error is added" do record.ppostcode_full = "SW1A 1AA" property_validator.validate_postcodes_match_if_discounted_ownership(record) expect(record.errors["postcode_full"]).to be_empty + expect(record.errors["ppostcode_full"]).to be_empty + expect(record.errors["ownershipsch"]).to be_empty end it "when postcodes match no error is added" do @@ -38,6 +42,8 @@ RSpec.describe Validations::Sales::PropertyValidations do record.ppostcode_full = "SW1A 1AA" property_validator.validate_postcodes_match_if_discounted_ownership(record) expect(record.errors["postcode_full"]).to be_empty + expect(record.errors["ppostcode_full"]).to be_empty + expect(record.errors["ownershipsch"]).to be_empty end it "when postcodes do not match an error is added" do @@ -45,6 +51,8 @@ RSpec.describe Validations::Sales::PropertyValidations do record.ppostcode_full = "SW1A 0AA" property_validator.validate_postcodes_match_if_discounted_ownership(record) expect(record.errors["postcode_full"]).to include(match I18n.t("validations.property.postcode.must_match_previous")) + expect(record.errors["ppostcode_full"]).to include(match I18n.t("validations.property.postcode.must_match_previous")) + expect(record.errors["ownershipsch"]).to include(match I18n.t("validations.property.postcode.must_match_previous")) end end end From 991d3a5ffa5d3881c5ef3ce889405c404d939910 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:37:21 +0000 Subject: [PATCH 2/9] CLDC-3067 Surface organisation and date errors in summary (#2104) * Surface organisation and date errors in summary * Refactor * Refactor sales row parser * Check that question is present --- .../lettings/year2023/row_parser.rb | 8 ++++++- .../bulk_upload/sales/year2023/row_parser.rb | 8 ++++++- .../lettings/year2023/row_parser_spec.rb | 23 +++++++++++++++++++ .../sales/year2023/row_parser_spec.rb | 23 +++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/app/services/bulk_upload/lettings/year2023/row_parser.rb b/app/services/bulk_upload/lettings/year2023/row_parser.rb index 3c5069063..094c63d45 100644 --- a/app/services/bulk_upload/lettings/year2023/row_parser.rb +++ b/app/services/bulk_upload/lettings/year2023/row_parser.rb @@ -415,7 +415,13 @@ class BulkUpload::Lettings::Year2023::RowParser fields = field_mapping_for_errors[error.attribute] || [] fields.each do |field| - unless errors.include?(field) + next if errors.include?(field) + + question = log.form.get_question(error.attribute, log) + + if question.present? && setup_question?(question) + errors.add(field, error.message, category: :setup) + else errors.add(field, error.message) end end diff --git a/app/services/bulk_upload/sales/year2023/row_parser.rb b/app/services/bulk_upload/sales/year2023/row_parser.rb index d5dca1c04..6ed79f3af 100644 --- a/app/services/bulk_upload/sales/year2023/row_parser.rb +++ b/app/services/bulk_upload/sales/year2023/row_parser.rb @@ -509,7 +509,13 @@ class BulkUpload::Sales::Year2023::RowParser fields = field_mapping_for_errors[error.attribute] || [] fields.each do |field| - unless errors.include?(field) + next if errors.include?(field) + + question = log.form.get_question(error.attribute, log) + + if question.present? && setup_question?(question) + errors.add(field, error.message, category: :setup) + else errors.add(field, error.message) end end diff --git a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb index 8ced94e45..d172321df 100644 --- a/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/lettings/year2023/row_parser_spec.rb @@ -1465,6 +1465,29 @@ RSpec.describe BulkUpload::Lettings::Year2023::RowParser do expect(parser.errors.where(:field_3)).not_to be_present end end + + context "when user's org has absorbed owning organisation before the startdate" do + let(:merged_org) { create(:organisation, :with_old_visible_id, holds_own_stock: true) } + + let(:attributes) { setup_section_params.merge({ field_1: merged_org.old_visible_id, field_2: merged_org.old_visible_id, field_3: user.email }) } + + before do + merged_org.update!(absorbing_organisation: user.organisation, merge_date: Time.zone.today - 5.years) + merged_org.reload + user.organisation.reload + end + + it "is not permitted" do + parser = described_class.new(attributes) + + parser.valid? + expect(parser.errors[:field_1]).to include(/The owning organisation must be active on the tenancy start date/) + expect(parser.errors[:field_2]).to include(/The managing organisation must be active on the tenancy start date/) + expect(parser.errors[:field_7]).to include(/Enter a date when the owning and managing organisation was active/) + expect(parser.errors[:field_8]).to include(/Enter a date when the owning and managing organisation was active/) + expect(parser.errors[:field_9]).to include(/Enter a date when the owning and managing organisation was active/) + end + end end describe "#field_2" do # managing org diff --git a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb index 58a077a1b..6f617b584 100644 --- a/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb +++ b/spec/services/bulk_upload/sales/year2023/row_parser_spec.rb @@ -420,6 +420,29 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do expect(parser.errors.where(:field_2)).not_to be_present end end + + context "when user's org has absorbed owning organisation before the startdate" do + let(:merged_org) { create(:organisation, :with_old_visible_id, holds_own_stock: true) } + + let(:attributes) { setup_section_params.merge({ field_1: merged_org.old_visible_id, field_2: user.email }) } + + before do + merged_org.update!(absorbing_organisation: user.organisation, merge_date: Time.zone.today - 3.years) + merged_org.reload + user.organisation.reload + user.reload + end + + it "is not permitted" do + parser = described_class.new(attributes) + + parser.valid? + expect(parser.errors[:field_1]).to include(/The owning organisation must be active on the sale completion date/) + expect(parser.errors[:field_3]).to include(/Enter a date when the owning organisation was active/) + expect(parser.errors[:field_4]).to include(/Enter a date when the owning organisation was active/) + expect(parser.errors[:field_5]).to include(/Enter a date when the owning organisation was active/) + end + end end describe "#field_2" do # username for created_by From d3a893522d60c7a7a77ae00a71bd3e9c2c04f936 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:47:12 +0000 Subject: [PATCH 3/9] CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page --- app/views/start/guidance.html.erb | 68 ++++++++++++++++++++++++++ app/views/start/index.html.erb | 1 + config/routes.rb | 1 + spec/requests/start_controller_spec.rb | 56 +++++++++++++++++++++ 4 files changed, 126 insertions(+) create mode 100644 app/views/start/guidance.html.erb create mode 100644 spec/requests/start_controller_spec.rb diff --git a/app/views/start/guidance.html.erb b/app/views/start/guidance.html.erb new file mode 100644 index 000000000..127b56b3b --- /dev/null +++ b/app/views/start/guidance.html.erb @@ -0,0 +1,68 @@ +
This page includes details of when a CORE log is and is not required, what to do if a tenant or buyer is reluctant to answer questions in a log, and other information about submitting logs using CORE.
+ <%= govuk_accordion do |accordion| %> + <%= accordion.with_section(heading_text: "How to create logs", expanded: true) do %> +There are 2 ways to create logs on CORE.
+You can create logs one at a time by answering questions using the online form. Click the “Create a new log” button on the logs page to create logs this way.
+You can also create many logs at once by uploading a CSV file. This might be faster than creating logs individually if your organisation has its own database and a way to export the data. Click the “Upload logs in bulk” button on the logs page to create logs this way. For more information, <%= govuk_link_to "read the full guidance on bulk upload", bulk_upload_lettings_log_path(id: "guidance", form: { year: current_collection_start_year }) %>.
+Once you have created and completed a log, there is nothing more you need to do to submit the data.
+ <% end %> + + <%= accordion.with_section(heading_text: "What scenarios require a new log?") do %> +For general needs, you should complete a log for each new tenancy intended to last 2 years or more if it is social rent or affordable rent, or of any length if it is intermediate rent.
+For supported housing, you should complete a log for each new letting of any length.
+If a new tenancy agreement is signed, create a new log.
+ <% end %> + + <%= accordion.with_section(heading_text: "Types of lettings you should create logs for") do %> +You’ll need to create a log for:
+You don’t need to create a log for:
+If a tenant or buyer is reluctant to answer questions as part of a log, you should explain that:
+If a tenant or buyer is still unwilling or unable to answer questions, select the ‘Don’t know’ or ‘Tenant/person prefers not to say’ options.
+ <% end %> + <% end %> +Use your account details to sign in.
If you need to set up a new account, speak to your organisation’s CORE data coordinator. If you don’t know who that is, <%= govuk_link_to("contact the helpdesk", GlobalConstants::HELPDESK_URL) %>.
You can <%= govuk_mail_to("dluhc.digital-services@levellingup.gov.uk", "request an account", subject: "CORE: Request a new account") %> if your organisation doesn’t have one.
+<%= govuk_link_to guidance_path do %>Guidance for submitting social housing lettings and sales data (CORE)<% end %>
<%= govuk_link_to "Read the full guidance", bulk_upload_lettings_log_path(id: "guidance", form: { year: @form.year }) %> before you start if you have not used bulk upload before.
Use one of these templates to upload logs for 2023/24:
There are 7 or 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.
<%= govuk_link_to "Read the full guidance", bulk_upload_sales_log_path(id: "guidance", form: { year: @form.year }) %> before you start if you have not used bulk upload before.
Use one of these templates to upload logs for 2023/24:
There are 7 or 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.
You can upload one sales or lettings log at a time, or many at once (known as ‘bulk upload’) with a comma-separated values (CSV) spreadsheet file.
-Bulk upload may be easier if your organisation deals with many logs, or if you can export CSV data from your Housing Management System (HMS). If your organisation only deals with a small amount of logs, or you cannot export CSV data, it’s probably easier to enter logs individually.
- <%= govuk_warning_text text: "You cannot upload lettings and sales logs with the same template - you must export each data type separately, then upload them" %> -Bulk upload may be easier if your organisation deals with many logs, or if you can export CSV data from your Housing Management System (HMS).
-To bulk upload successfully, all spreadsheets must be in the correct CSV format.
-In most programs, you must resave files as CSV - it’s not usually the default setting. CSV files are also unformatted, so any formatting added before saving (for example colours) will automatically disappear.
- <%= govuk_details(summary_text: "More about CSV") do %> -A CSV file is a basic spreadsheet with data values in plain text, and columns separated by commas. Each data row is a new text line.
-CSV data is easier to process than more common advanced spreadsheet formats, for example Excel. It means CSV is well suited to upload large, or multiple data sets.
- <% end %> +If your organisation only deals with a small amount of logs, or you cannot export CSV data, it’s probably easier to create logs individually using the online form.
Export CSV data directly from your current systems, or export then adjust it to CSV.
-You can then upload it via a button at the top of the lettings and sales logs pages.
- - <%= govuk_details(summary_text: "My organisation has a HMS") do %> -Some HMS providers sell an add-on "eCORE" module, which exports CSV data for you.
-It can take HMS providers a while to update these per new collection year, so you may have to wait for updates to export, or adjust your data manually post-export.
+ <%= govuk_accordion do |accordion| %> + <%= accordion.with_section(heading_text: "Exporting your data", expanded: true) do %> +Export CSV data directly from your current systems.
+You should export lettings and sales data separately, and data from different collection years separately.
+The exported CSV file should have one row per log so that the data can fit into the bulk upload template.
+If your organisation has an HMS
+Some HMS providers sell an add-on "eCORE" module, which exports CSV data in the format we require.
+If your organisation does not have an HMS
+Your organisation’s IT team may be able to export CSV data for you, depending on how data is stored in your organisation.
+Review the bulk upload template and specification carefully to understand how we expect data to be mapped and formatted. The next 2 sections explain more about these documents.
<% end %> - <%= govuk_details(summary_text: "My organisation does not have a HMS") do %> -Your organisation’s IT team may be able to export CSV data for you - <%= govuk_link_to "find out more about data specification", @form.specification_path, target: "_blank" %>. This document outlines:
+ <%= accordion.with_section(heading_text: "Using the bulk upload template") do %> +For each collection year, we publish a bulk upload template and specification.
+The bulk upload templates contain 7 or 8 rows of ‘headers’ with information about how to fill in the template, including:
Fields must be in the same order as <%= govuk_link_to "the template", @form.template_path %>. Copy each column of your exported data one at a time and paste into the correct template column.
- <% else %> -Fields can appear in any order, as long as you include the <%= govuk_link_to "template document", @form.template_path %> headers, to easily identify what each column represents. You can rearrange data columns to match your system exports, copy-pasting multiple columns at once. For data stored in multiple systems, you can copy-paste all columns for one system next to each other, repeating this for subsequent system exports.
- <% end %> +You can paste your data below the headers or copy the headers and insert them above the data in your file. The bulk upload fields start at column B. Leave column A blank.
+Make sure that each column of data aligns with the corresponding question in the headers. We recommend ordering your data to match the headers, but you can also reorder the headers to match your data. When processing the file, we check what each column of data represents based on the headers above.
+For 2023/24 uploads, there are 2 templates to choose from, a new template and a legacy template. They outline suggested ways of ordering your data.
+You must include the headers in your file when you upload, unless your data matches the exact order of the legacy template. If you choose to remove the headers, you must also remove the blank column A.
+ +New template: In this template, the questions are in the same order as the 2023/24 paper form and web form. Use this template if your organisation is new to bulk upload or if your housing management system matches the new column ordering.
+<%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) – New question ordering", @form.lettings_template_path %>
+<%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – New question ordering", @form.sales_template_path %>
+ +Legacy template: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end. Use this template if you have not updated your system to match the new template yet.
+<%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) - Legacy version", @form.lettings_legacy_template_path %>
+<%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – Legacy version", @form.sales_legacy_template_path %>
<% end %> -There is no step-by-step bulk upload guide like there is with single log upload. However, you can download <%= @form.year == 2022 ? govuk_link_to("our template", @form.template_path) : "one of our templates" %>, which you can copy-paste data into from your systems column-by-column. You can also view a post-upload report showing any data errors, and our <%= govuk_link_to "data specification", @form.specification_path, target: "_blank" %> can help fix these.
- <% if @form.year == 2023 %> - <%= govuk_details(summary_text: "How to choose the right template") do %> -Use one of these templates to upload logs for 2023/24:
-<%= govuk_link_to "New template", @form.template_path %>: In this template, the questions are in the same order as the 2023/24 paper form and web form. Use this template if your organisation is new to bulk upload or if your housing management system matches the new column ordering.
-<%= govuk_link_to "Legacy template", @form.legacy_template_path %>: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end. Use this template if you have not updated your system to match the new template yet.
- <% end %> + <%= accordion.with_section(heading_text: "Using the bulk upload specification") do %> +The bulk upload specification contains the same information as the template headers, as well as more details about the accepted responses for each question. For multiple-choice questions, we use number or letter codes to represent each option, and the specification shows what answer each code represents.
+There is a separate specification for lettings and sales:
+<%= govuk_link_to "Download the lettings bulk upload specification (2023 to 2024)", @form.lettings_specification_path, target: "_blank" %>
+<%= govuk_link_to "Download the sales bulk upload specification (2023 to 2024)", @form.sales_specification_path, target: "_blank" %>
+If your upload fails because there are errors in the data, you can use the specification to help correct the errors. Having your file, the error report, and the specification open at the same time will make it easy to cross-reference field numbers and check accepted responses.
<% end %> -If you still need support mapping data in the way we need, DLUHC’s helpdesk can help. If your data is across multiple systems, or is hard to export as a single file in the correct format, you could try different exports, or copy-pasting data by hand.
-To bulk upload successfully, all spreadsheets must be in the correct CSV format.
+If you’ve pasted your data into the template, you will need to resave the file as a CSV.
+CSV files are unformatted, so any formatting added before saving (for example colours) will automatically disappear.
+What is a CSV?
+A CSV file is a basic spreadsheet with data values in plain text, and columns separated by commas. Each data row is a new text line.
+CSV data is easier to process than more common advanced spreadsheet formats, for example Excel. It means CSV is well suited to upload large data sets.
+ + <% end %> + + <%= accordion.with_section(heading_text: "Next steps") do %> +Once you've saved your CSV file, you can upload it via a button at the top of the lettings and sales logs pages.
+When your file is done processing, you will receive an email explaining your next steps. If all your data is valid, your logs will be created. If some data is invalid, you’ll receive an email with instructions about how to resolve the errors.
+If your file has errors on fields 1 through 17, you must fix these in the CSV. This is because we need to know these answers to validate the rest of the data. Any errors in these fields will be featured in the error report’s summary tab.
+If none of your errors are in fields 1 through 17, you can choose how to fix the errors. You can either fix them in the CSV and reupload, or create partially complete logs and answer the remaining questions on the CORE site. Any errors that affect a significant number of logs will be featured in the error report’s summary tab to help you decide.
+ + <% end %> + + <%= accordion.with_section(heading_text: "Getting help") do %> +The bulk upload template and specification should contain all the information you need to format your data correctly and fix any errors found during processing. If you still need support with your bulk upload, <%= govuk_link_to "contact the helpdesk", GlobalConstants::HELPDESK_URL %>.
+ <% end %> + <% end %>- You have uploaded <%= pluralize(@bulk_upload.logs.count, "log") %>. There are errors in <%= pluralize(@bulk_upload.logs_with_errors_count, "log") %>, and <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in total. Select the log to fix the errors. + You have uploaded <%= pluralize(@bulk_upload.logs.count, "log") %>. There are errors in <%= pluralize(@bulk_upload.remaining_logs_with_errors_count, "log") %>, and <%= pluralize(@bulk_upload.remaining_errors_count, "error") %> in total. Select the log to fix the errors.
diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb
index d2ea715ff..6a33ee027 100644
--- a/spec/requests/lettings_logs_controller_spec.rb
+++ b/spec/requests/lettings_logs_controller_spec.rb
@@ -552,7 +552,7 @@ RSpec.describe LettingsLogsController, type: :request do
let(:user) { create(:user, organisation:) }
let(:bulk_upload) { create(:bulk_upload, :lettings, user:) }
- let!(:included_log) { create(:lettings_log, :in_progress, bulk_upload:, owning_organisation: organisation) }
+ let!(:included_log) { create(:lettings_log, :completed, age1: nil, bulk_upload:, owning_organisation: organisation) }
let!(:excluded_log) { create(:lettings_log, :in_progress, owning_organisation: organisation, tenancycode: "fake_code") }
before do
@@ -602,6 +602,12 @@ RSpec.describe LettingsLogsController, type: :request do
expect(page).to have_content("You have uploaded 1 log. There are errors in 1 log, and 1 error in total. Select the log to fix the errors.")
end
+ it "displays dynamic error number" do
+ included_log.update!(age2: nil)
+ get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}"
+ expect(page).to have_content("You have uploaded 1 log. There are errors in 1 log, and 2 errors in total. Select the log to fix the errors.")
+ end
+
it "displays meta info about the bulk upload" do
get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}"
expect(page).to have_content(bulk_upload.filename)
diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb
index e837a21dc..a9bf07883 100644
--- a/spec/requests/sales_logs_controller_spec.rb
+++ b/spec/requests/sales_logs_controller_spec.rb
@@ -449,7 +449,7 @@ RSpec.describe SalesLogsController, type: :request do
let(:user) { create(:user, organisation:) }
let(:bulk_upload) { create(:bulk_upload, :sales, user:) }
- let!(:included_log) { create(:sales_log, :in_progress, purchid: "included_id", bulk_upload:, owning_organisation: organisation) }
+ let!(:included_log) { create(:sales_log, :completed, age1: nil, purchid: "included_id", bulk_upload:, owning_organisation: organisation) }
let!(:excluded_log) { create(:sales_log, :in_progress, purchid: "excluded_id", owning_organisation: organisation) }
before do
@@ -499,6 +499,12 @@ RSpec.describe SalesLogsController, type: :request do
expect(page).to have_content("You have uploaded 1 log. There are errors in 1 log, and 1 error in total. Select the log to fix the errors.")
end
+ it "displays dynamic error number" do
+ included_log.update!(age2: nil)
+ get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}"
+ expect(page).to have_content("You have uploaded 1 log. There are errors in 1 log, and 2 errors in total. Select the log to fix the errors.")
+ end
+
it "displays meta info about the bulk upload" do
get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}"
expect(page).to have_content(bulk_upload.filename)
From fc011f1d3f9fb992ecf497d72442b2e62578e37e Mon Sep 17 00:00:00 2001
From: natdeanlewissoftwire <%= "Welcome back, #{@current_user.name}" %> <%= govuk_link_to "Guidance for submitting social housing lettings and sales data (CORE)", guidance_path %> For lettings starting during 1 April 2023 to 31 March 2024 and sales completing during the same period, use the 2023/24 forms. Use the 2023 to 2024 forms for lettings that start and sales that complete between 1 April 2023 and 31 March 2024.Collection resources
+ Collection resources
- Lettings 2023/24
- <%= render DocumentListComponent.new(items: [
+ <% c.with_tab(label: "Lettings 2023/24") do %>
+ <%= render DocumentListComponent.new(items: [
{
- name: "Lettings log for tenants (2023/24)",
+ name: "Download the lettings log for tenants (2023 to 2024)",
href: download_23_24_lettings_form_path,
metadata: file_type_size_and_pages("2023_24_lettings_paper_form.pdf", number_of_pages: 8),
},
{
- name: "Lettings bulk upload template (2023/24) – New question ordering",
+ name: "Download the lettings bulk upload template (2023 to 2024) – New question ordering",
href: download_23_24_lettings_bulk_upload_template_path,
metadata: file_type_size_and_pages("bulk-upload-lettings-template-2023-24.xlsx"),
},
{
- name: "Lettings bulk upload template (2023/24)",
+ name: "Download the lettings bulk upload template (2023 to 2024) – Legacy version",
href: download_23_24_lettings_bulk_upload_legacy_template_path,
metadata: file_type_size_and_pages("bulk-upload-lettings-legacy-template-2023-24.xlsx"),
},
{
- name: "Lettings bulk upload specification (2023/24)",
+ name: "Download the lettings bulk upload specification (2023 to 2024)",
href: download_23_24_lettings_bulk_upload_specification_path,
metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2023-24.xlsx"),
},
- ]) %>
-
- Sales 2023/24
- <%= render DocumentListComponent.new(items: [
- {
- name: "Sales log for buyers (2023/24)",
- href: download_23_24_sales_form_path,
- metadata: file_type_size_and_pages("2023_24_sales_paper_form.pdf", number_of_pages: 8),
- },
- {
- name: "Sales bulk upload template (2023/24) – New question ordering",
- href: download_23_24_sales_bulk_upload_template_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-template-2023-24.xlsx"),
- },
- {
- name: "Sales bulk upload template (2023/24)",
- href: download_23_24_sales_bulk_upload_legacy_template_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-legacy-template-2023-24.xlsx"),
- },
- {
- name: "Sales bulk upload specification (2023/24)",
- href: download_23_24_sales_bulk_upload_specification_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-specification-2023-24.xlsx"),
- },
- ]) %>
- <% end %>
-
- <% if FormHandler.instance.lettings_form_for_start_year(2022) && FormHandler.instance.lettings_form_for_start_year(2022).edit_end_date > Time.zone.today %>
- Lettings 2022/23
- <%= render DocumentListComponent.new(items: [
- {
- name: "Lettings log for tenants (2022/23)",
- href: download_22_23_lettings_form_path,
- metadata: file_type_size_and_pages("2022_23_lettings_paper_form.pdf", number_of_pages: 4),
- },
- {
- name: "Lettings bulk upload template (2022/23)",
- href: download_22_23_lettings_bulk_upload_template_path,
- metadata: file_type_size_and_pages("bulk-upload-lettings-template-2022-23.xlsx"),
- },
- {
- name: "Lettings bulk upload specification (2022/23)",
- href: download_22_23_lettings_bulk_upload_specification_path,
- metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2022-23.xlsx"),
- },
- ]) %>
-
- Sales 2022/23
- <%= render DocumentListComponent.new(items: [
- {
- name: "Sales log for buyers (2022/23)",
- href: download_22_23_sales_form_path,
- metadata: file_type_size_and_pages("2022_23_sales_paper_form.pdf", number_of_pages: 5),
- },
- {
- name: "Sales bulk upload template (2022/23)",
- href: download_22_23_sales_bulk_upload_template_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-template-2022-23.xlsx"),
- },
- {
- name: "Sales bulk upload specification (2022/23)",
- href: download_22_23_sales_bulk_upload_specification_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-template-2022-23.xlsx"),
- },
- ]) %>
+ ]) %>
+ <% end %>
+ <% c.with_tab(label: "Sales 2023/24") do %>
+ <%= render DocumentListComponent.new(items: [
+ {
+ name: "Download the sales log for buyers (2023 to 2024)",
+ href: download_23_24_sales_form_path,
+ metadata: file_type_size_and_pages("2023_24_sales_paper_form.pdf", number_of_pages: 8),
+ },
+ {
+ name: "Download the sales bulk upload template (2023 to 2024) – New question ordering",
+ href: download_23_24_sales_bulk_upload_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-template-2023-24.xlsx"),
+ },
+ {
+ name: "Download the sales bulk upload template (2023 to 2024) – Legacy version",
+ href: download_23_24_sales_bulk_upload_legacy_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-legacy-template-2023-24.xlsx"),
+ },
+ {
+ name: "Download the sales bulk upload specification (2023 to 2024)",
+ href: download_23_24_sales_bulk_upload_specification_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-specification-2023-24.xlsx"),
+ },
+ ]) %>
+ <% end %>
<% end %>
-
Use your account details to sign in.
If you need to set up a new account, speak to your organisation’s CORE data coordinator. If you don’t know who that is, <%= govuk_link_to("contact the helpdesk", GlobalConstants::HELPDESK_URL) %>.
You can <%= govuk_mail_to("dluhc.digital-services@levellingup.gov.uk", "request an account", subject: "CORE: Request a new account") %> if your organisation doesn’t have one.
<%= govuk_link_to guidance_path do %>Guidance for submitting social housing lettings and sales data (CORE)<% end %>
+ -
End of year deadline - <%= formatted_deadline %>: Deadline to submit logs for tenancies starting between <%= collection_start_date(Time.zone.now).to_formatted_s(:govuk_date) %> to <%= collection_end_date(Time.zone.now).to_formatted_s(:govuk_date) %>
+<% end %> + +<% current_quarter = quarter_for_date(date: Time.zone.now) %> +<% if current_quarter.present? %> +<%= "#{current_quarter.quarter} - #{current_quarter.cutoff_date.strftime('%A')} #{current_quarter.cutoff_date.to_formatted_s(:govuk_date)}" %>: Quarterly cut off date for tenancies and sales starting between <%= current_quarter.quarter_start_date.to_formatted_s(:govuk_date) %> and <%= current_quarter.quarter_end_date.to_formatted_s(:govuk_date) %>.
+<% end %> + +<% if !FormHandler.instance.in_crossover_period? %> +Try to complete your logs for each quarter by the cut-off date.
+You can still create logs for a previous quarter after its cut-off date, as long as you complete them by the end-of-year deadline: <%= formatted_deadline %>.
+<% end %> + +<% if FormHandler.instance.in_crossover_period? %> +<% previous_lettings_form = FormHandler.instance.previous_lettings_form %> +Prioritise completing logs for the closing collection year. You must complete all <%= previous_lettings_form.start_date.year %> to <%= previous_lettings_form.submission_deadline.year %> logs must by the end-of-year deadline. You can still create <%= current_lettings_form.start_date.year %> to <%= current_lettings_form.submission_deadline.year %> logs for this quarter after the quarterly cut-off date.
+<% end %> + +<%= govuk_details(summary_text: "Quarterly cut-off dates for 2023 to 2024") do %> +The 2023 to 2024 quarterly cut-off dates are:
+It is important that you meet these cut-off dates because we submit data to the Office for National Statistics quarterly, helping them create essential inflation statistics.
+Meeting these cut-off dates also gives you more accurate data for your own analysis, and reduces the burden at the end of the year.
+If you are not able to meet these quarterly dates, submit your logs as soon as you can so that they can be included in the annual data.
+<% end %> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 7469ed18f..e87fde287 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -2,5 +2,7 @@