From 04f2c1576d47398b107052319be96365456e6a79 Mon Sep 17 00:00:00 2001 From: Pablo Manrubia Date: Tue, 16 Aug 2016 14:16:41 +0100 Subject: [PATCH 1/2] Revert "Merge pull request #140 from alphagov/add-2013-to-stop-year" This reverts commit f198bd1683d46f366efba8fe5eea8c2931e3b9ca, reversing changes made to c02f60fc85e83860836151490c8745b1fdc8f713. --- README.md | 9 --------- app/views/child_benefit_tax/_starting_child.html.erb | 2 +- spec/features/child_benefit_tax_calculator_spec.rb | 9 --------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/README.md b/README.md index 8f9b606a..08ac2361 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,6 @@ Calculators This is an application to contain custom-built calculators. These will initially replace some smart-answers that have outgrown the framework. -## Child benefit tax calculator -Currently the only calculator in this application is the Child benefit tax calculator. - -This calculator reports how much child benefit tax you are entitled during a tax year. - -There is a cut-off date of 7 January 2013. This is the date [High Income Child Benefit Tax Charge](https://www.gov.uk/child-benefit-tax-charge/overview) came in effect. -This means that if the 2012 tax year is selected the calculator will only calculate the child benefit you are entitled to from 7 Jan 2013 to 5 Apr 2013, not for the entire tax year. - - ## Running the app ``` diff --git a/app/views/child_benefit_tax/_starting_child.html.erb b/app/views/child_benefit_tax/_starting_child.html.erb index 7b118fb7..f9c7680d 100644 --- a/app/views/child_benefit_tax/_starting_child.html.erb +++ b/app/views/child_benefit_tax/_starting_child.html.erb @@ -15,5 +15,5 @@ <% end %> <%= select_date (child ? child.end_date : nil), :prefix => "starting_children[#{index}][stop]", :prompt => {:day => "Day", :month => "Month", :year => "Year" }, :order => [:day, :month, :year], - :start_year => 3.years.ago(Date.today).year, :end_year => 10.years.since(Date.today).year %> + :start_year => 2.years.ago(Date.today).year, :end_year => 10.years.since(Date.today).year %> diff --git a/spec/features/child_benefit_tax_calculator_spec.rb b/spec/features/child_benefit_tax_calculator_spec.rb index 75541949..ccc6417b 100644 --- a/spec/features/child_benefit_tax_calculator_spec.rb +++ b/spec/features/child_benefit_tax_calculator_spec.rb @@ -85,15 +85,6 @@ ) end - it "should allow stop date to be three years in the past" do - Timecop.freeze('2014-04-04') - visit "/child-benefit-tax-calculator" - click_on "Start now" - - expected_year_list = ("2011".."2024").to_a - expect(page).to have_select("starting_children_0_stop_year", options: expected_year_list.unshift("Year")) - end - it "should show error if no children are present in the selected tax year" do Timecop.travel "2014-09-01" visit "/child-benefit-tax-calculator" From 1c4525979d7113f85c7016dd7099f390d44a1c34 Mon Sep 17 00:00:00 2001 From: Pablo Manrubia Date: Tue, 16 Aug 2016 14:16:54 +0100 Subject: [PATCH 2/2] Revert "Merge pull request #141 from alphagov/reorder-questions-two-and-three" This reverts commit 75323de94d3b643ce431fb5afadbb02c96e0b408, reversing changes made to f198bd1683d46f366efba8fe5eea8c2931e3b9ca. --- app/views/child_benefit_tax/main.html.erb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/child_benefit_tax/main.html.erb b/app/views/child_benefit_tax/main.html.erb index c2a832a0..8c93f801 100644 --- a/app/views/child_benefit_tax/main.html.erb +++ b/app/views/child_benefit_tax/main.html.erb @@ -35,8 +35,17 @@ <%= submit_tag "Update", :name => "children", :class => "button update-button" %> +
+ <%= step(2, "Enter the Child Benefit start and stop dates:") %> +
    +
  • the start date is usually when you have a baby, adopt or move in with a new partner and their children
  • +
  • the stop date is usually when a child turns 16 or leaves full-time education
  • +
+ <%= render "starting_children" %> +
+
- <%= step(2, "Choose a tax year:") %> + <%= step(3, "Choose a tax year:") %>

Tax years run from 6 April to 5 April the following year.

<% @calculator.errors[:tax_year].each do |message| %> @@ -51,15 +60,6 @@
-
- <%= step(3, "Enter the Child Benefit start and stop dates:") %> -
    -
  • the start date is usually when you have a baby, adopt or move in with a new partner and their children
  • -
  • the stop date is usually when a child turns 16 or leaves full-time education
  • -
- <%= render "starting_children" %> -
-
<%= step(4, "Enter income details for the tax year (optional):") %>