Skip to content

Commit

Permalink
Merge pull request #2992 from bitzesty/financial-year
Browse files Browse the repository at this point in the history
Adds question to switch latest financial year to SD and PO awards
  • Loading branch information
TheDancingClown authored Jul 3, 2024
2 parents dcb3e46 + 8348a69 commit 8f65a05
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 32 deletions.
26 changes: 12 additions & 14 deletions forms/award_years/v2025/social_mobility/social_mobility_step4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,36 +51,34 @@ def mobility_step4
financial_date_pointer
end

trade_most_recent_financial_year_options :most_recent_financial_year, "Which year would you like to be your most recent financial year that you will submit figures for?" do
ref "D 2.1"
required
option (AwardYear.current.year - 2).to_s, (AwardYear.current.year - 2).to_s
option (AwardYear.current.year - 1).to_s, (AwardYear.current.year - 1).to_s
classes "js-most-recent-financial-year fs-trackable fs-two-trackable"
end

options :financial_year_date_changed, "Did your year-end date change during your three most recent financial years that you will be providing figures for?" do
classes "sub-question js-financial-year-change fs-trackable"
sub_ref "D 2.1"
sub_ref "D 2.2"
required
context %(
<p>
For the purpose of this application, your most recent financial year is your last financial year ending before the #{Settings.current.deadlines.where(kind: "submission_end").first.decorate.formatted_trigger_date("with_year")} - the submission deadline.
</p>
)
yes_no
default_option "no"
end

one_option_by_years_label :financial_year_changed_dates, "Enter your year-end dates for each financial year." do
classes "sub-question one-option-by-years fs-trackable"
sub_ref "D 2.2"
sub_ref "D 2.3"
required
context %(
<p>
For the purpose of this application, your most recent financial year is your last financial year ending before the #{Settings.current.deadlines.where(kind: "submission_end").first.decorate.formatted_trigger_date("with_year")} - the submission deadline.
</p>
)
type :date
label ->(y) { "Financial year #{y}" }
conditional :financial_year_date_changed, :yes
end

textarea :financial_adjustments_explanation, "Explain adjustments to figures." do
classes "sub-question word-max-strict"
sub_ref "D 2.3"
sub_ref "D 2.4"
required
context %(
<p>
Expand All @@ -94,7 +92,7 @@ def mobility_step4

textarea :financial_year_date_changed_explaination, "Explain why your year-end date changed." do
classes "sub-question word-max-strict"
sub_ref "D 2.4"
sub_ref "D 2.5"
required
rows 2
words_max 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,25 @@ def development_step4
financial_date_pointer
end

trade_most_recent_financial_year_options :most_recent_financial_year, "Which year would you like to be your most recent financial year that you will submit figures for?" do
ref "D 2.1"
required
option (AwardYear.current.year - 2).to_s, (AwardYear.current.year - 2).to_s
option (AwardYear.current.year - 1).to_s, (AwardYear.current.year - 1).to_s
classes "js-most-recent-financial-year fs-trackable fs-two-trackable"
end

options :financial_year_date_changed, "Did your year-end date change during your <span class='js-entry-period-subtext'>three</span> most recent financial years that you will be providing figures for?" do
classes "sub-question js-financial-year-change fs-trackable"
sub_ref "D 2.1"
sub_ref "D 2.2"
required
yes_no
context %(
<p>
For the purpose of this application, your most recent financial year is your last financial year ending before the #{Settings.current.deadlines.where(kind: "submission_end").first.decorate.formatted_trigger_date("with_year")} - (the submission deadline).
</p>
)
default_option "no"
end

one_option_by_years_label :financial_year_changed_dates, "Enter your year-end dates for each financial year." do
classes "sub-question one-option-by-years fs-trackable"
sub_ref "D 2.2"
context %(
<p>
For the purpose of this application, your most recent financial year is your last financial year ending before the #{Settings.current.deadlines.where(kind: "submission_end").first.decorate.formatted_trigger_date("with_year")} - (the submission deadline).
</p>
)
sub_ref "D 2.3"
required
type :date
label ->(y) { "Financial year #{y}" }
Expand All @@ -80,7 +78,7 @@ def development_step4

textarea :financial_adjustments_explanation, "Explain adjustments to figures." do
classes "sub-question word-max-strict"
sub_ref "D 2.3"
sub_ref "D 2.4"
context %(
<p>
If your financial year-end has changed, you will need to agree with your accountants on how to allocate your figures in all section D questions so that they show three 12-month periods (36 months). This allows for a comparison between years. Please explain what approach you will take to adjust the figures.
Expand All @@ -94,7 +92,7 @@ def development_step4

textarea :financial_year_date_changed_explaination, "Explain why your year-end date changed." do
classes "sub-question"
sub_ref "D 2.4"
sub_ref "D 2.5"
required
rows 2
words_max 100
Expand Down
3 changes: 1 addition & 2 deletions forms/qae_form_builder/about_section_question.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ def financial_periods
header: "Periods the figures are required for",
context: [
"You must provide financial figures for your three most recent financial years, covering 36 months.",
"If you have changed your year-end during the period of your application, see D2.3 for an explanation of how this must be dealt with.",
"For the purpose of this application, your most recent financial year is your last financial year ending before the #{Settings.current.deadlines.where(kind: "submission_end").first.decorate.formatted_trigger_date("with_year")} - the application submission deadline.",
"If you have changed your year-end during the period of your application, see D2.4 for an explanation of how this must be dealt with.",
],
)
end
Expand Down
3 changes: 2 additions & 1 deletion spec/fixtures/form_answer_development.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,6 @@
"agree_to_provide_actual_figures": "on",
"received_grant": "no",
"strong_esg_record": "on",
"major_issues_overcome": "test"
"major_issues_overcome": "test",
"most_recent_financial_year": "2024"
}
3 changes: 2 additions & 1 deletion spec/fixtures/form_answer_mobility.json
Original file line number Diff line number Diff line change
Expand Up @@ -697,5 +697,6 @@
"disadvantaged_groups_opportunities_numbers": "",
"received_grant": "no",
"strong_esg_record": "on",
"major_issues_overcome": "test"
"major_issues_overcome": "test",
"most_recent_financial_year": "2024"
}

0 comments on commit 8f65a05

Please sign in to comment.