Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #152 from alphagov/reverts-to-deploy
Browse files Browse the repository at this point in the history
Reverts #140 and #141
  • Loading branch information
pmanrubia authored Aug 16, 2016
2 parents d06f9ec + 1c45259 commit 8f18023
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 29 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
2 changes: 1 addition & 1 deletion app/views/child_benefit_tax/_starting_child.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
</div>
20 changes: 10 additions & 10 deletions app/views/child_benefit_tax/main.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@
<%= submit_tag "Update", :name => "children", :class => "button update-button" %>
</fieldset>

<fieldset id="children">
<%= step(2, "Enter the Child Benefit start and stop dates:") %>
<ul>
<li>the start date is usually when you have a baby, adopt or move in with a new partner and their children</li>
<li>the stop date is usually when a child turns 16 or leaves full-time education</li>
</ul>
<%= render "starting_children" %>
</fieldset>

<fieldset id="tax-year">
<%= step(2, "Choose a tax year:") %>
<%= step(3, "Choose a tax year:") %>
<p>Tax years run from 6 April to 5 April the following year.</p>
<div class="tax-year<% if @calculator.errors.has_key?(:tax_year) %> validation-error<% end %>">
<% @calculator.errors[:tax_year].each do |message| %>
Expand All @@ -51,15 +60,6 @@
</div>
</fieldset>

<fieldset id="children">
<%= step(3, "Enter the Child Benefit start and stop dates:") %>
<ul>
<li>the start date is usually when you have a baby, adopt or move in with a new partner and their children</li>
<li>the stop date is usually when a child turns 16 or leaves full-time education</li>
</ul>
<%= render "starting_children" %>
</fieldset>

<fieldset id="adjusted_income">
<%= step(4, "Enter income details for the tax year (optional):") %>
<ul>
Expand Down
9 changes: 0 additions & 9 deletions spec/features/child_benefit_tax_calculator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8f18023

Please sign in to comment.