Skip to content

Commit 562aac1

Browse files
committed
Merge pull request #2423 from alphagov/national-minimum-living-wage-1-april
National Minimum Wage 1 April 2016
2 parents c843256 + 56e9c53 commit 562aac1

File tree

729 files changed

+7450
-5758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

729 files changed

+7450
-5758
lines changed

lib/smart_answer/calculators/minimum_wage_calculator.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ class MinimumWageCalculator
44
attr_accessor :age, :pay_frequency, :basic_hours, :basic_pay, :is_apprentice,
55
:overtime_hours, :overtime_hourly_rate, :accommodation_cost
66

7-
attr_reader :date, :what_to_check
7+
attr_reader :date
88

99
def initialize(params = {})
1010
@age = params[:age]
1111
@date = (params[:date].nil? ? Date.today : params[:date])
1212
@basic_hours = params[:basic_hours].to_f
1313
@basic_pay = params[:basic_pay].to_f
14-
@what_to_check = params[:what_to_check]
1514
@is_apprentice = params[:is_apprentice]
1615
@pay_frequency = params[:pay_frequency] || 7
1716
@overtime_hours = params[:overtime_hours].to_i || 0
@@ -74,7 +73,11 @@ def minimum_hourly_rate
7473
if @is_apprentice
7574
@minimum_wage_data[:apprentice_rate]
7675
else
77-
per_hour_minimum_wage
76+
if eligible_for_living_wage?
77+
national_living_wage_rate
78+
else
79+
per_hour_minimum_wage
80+
end
7881
end
7982
end
8083

lib/smart_answer_flows/am-i-getting-minimum-wage.rb

+3-36
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ def define
1010
multiple_choice :what_would_you_like_to_check? do
1111
option "current_payment"
1212
option "past_payment"
13-
option "current_payment_april_2016"
1413

15-
calculate :calculator do |response|
16-
Calculators::MinimumWageCalculator.new(what_to_check: response)
14+
calculate :calculator do
15+
Calculators::MinimumWageCalculator.new
1716
end
1817

1918
calculate :accommodation_charge do
@@ -24,52 +23,22 @@ def define
2423
case response
2524
when 'current_payment'
2625
question :are_you_an_apprentice?
27-
when 'current_payment_april_2016'
28-
question :will_you_be_a_first_year_apprentice?
2926
when 'past_payment'
3027
question :past_payment_date?
3128
end
3229
end
3330
end
3431

35-
# Q2 - April 2016
36-
multiple_choice :will_you_be_a_first_year_apprentice? do
37-
option :yes
38-
option :no
39-
40-
next_node do |response|
41-
case response
42-
when 'yes'
43-
calculator.is_apprentice = true
44-
outcome :does_not_apply_to_first_year_apprentices
45-
when 'no'
46-
question :how_old_are_you? #Q3
47-
end
48-
end
49-
end
50-
5132
# Q3
5233
value_question :how_old_are_you?, parse: Integer do
5334
precalculate :age_title do
54-
if calculator.what_to_check == 'current_payment_april_2016'
55-
"How old will you be on 1 April 2016?"
56-
else
57-
"How old are you?"
58-
end
35+
"How old are you?"
5936
end
6037

6138
validate do |response|
6239
calculator.valid_age?(response)
6340
end
6441

65-
validate :valid_age_for_living_wage? do |response|
66-
if calculator.what_to_check == 'current_payment_april_2016'
67-
calculator.valid_age_for_living_wage?(response)
68-
else
69-
true
70-
end
71-
end
72-
7342
next_node do |response|
7443
calculator.age = response
7544
if calculator.under_school_leaving_age?
@@ -81,8 +50,6 @@ def define
8150
end
8251

8352
use_shared_logic "minimum_wage"
84-
85-
outcome :does_not_apply_to_first_year_apprentices
8653
end
8754
end
8855
end
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<% content_for :title do %>
2-
National Minimum Wage calculator for workers
2+
Minimum wage calculator for workers
33
<% end %>
44

55
<% content_for :meta_description do %>
6-
Check if your pay matches the National Minimum Wage, the national living wage or if your employer owes you payments from past years.
6+
Check if your pay matches the National Minimum Wage, the National Living Wage or if your employer owes you payments from past years.
77
<% end %>
88

99
<% content_for :body do %>
10-
Check if your pay matches the National Minimum Wage or if your employer owes you payments from past years.
10+
Check if:
1111

12-
You can also check if you'll get the national living wage from 1 April 2016.
12+
- you’re getting paid the National Minimum Wage
13+
- you’re getting paid the National Living Wage
14+
- your employer owes you past payments from past years
1315

14-
^You must be at least 25 years old to get the national living wage.^
16+
^You must be at least 25 years old to get the National Living Wage.^
1517
<% end %>

lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_above.govspeak.erb

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
<% content_for :body do %>
22
$C
3-
<% if calculator.what_to_check == 'current_payment_april_2016' && calculator.eligible_for_living_wage? %>
4-
<% if calculator.living_wage_or_above? %>
5-
You will be getting the national living wage
6-
<% else %>
7-
You are getting the National Minimum wage but your pay should be increased to at least the national living wage from 1 April 2016.
8-
<% end %>
3+
<% if calculator.eligible_for_living_wage? %>
4+
You are getting the National Living Wage.
95
<% else %>
106
You are getting the National Minimum Wage.
117
<% end %>
128
$C
139

14-
<% if calculator.what_to_check == 'current_payment_april_2016' && calculator.eligible_for_living_wage? %>
15-
The national living wage per hour for your age will be | Your actual pay
16-
<% else %>
17-
The National Minimum Wage per hour for your age | Your actual pay
18-
<% end %>
10+
<% if calculator.eligible_for_living_wage? %>
11+
The National Living Wage per hour for your age | Your actual pay
1912
- | -
20-
<% if calculator.what_to_check == 'current_payment_april_2016' && calculator.eligible_for_living_wage? %>
2113
<%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %>
2214
<% else %>
15+
The National Minimum Wage per hour for your age | Your actual pay
16+
- | -
2317
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %>
2418
<% end %>
2519

lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_below.govspeak.erb

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
<% content_for :body do %>
22
$C
3-
You aren't getting the National Minimum Wage.
3+
<% if calculator.eligible_for_living_wage? %>
4+
You aren't getting the National Living Wage.
5+
<% else %>
6+
You aren't getting the National Minimum Wage.
7+
<% end %>
48
$C
59

6-
The National Minimum Wage per hour for your age | Your actual pay | For each pay period your employer owes you
7-
- | - | -
8-
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %>
10+
<% if calculator.eligible_for_living_wage? %>
11+
The National Living Wage per hour for your age | Your actual pay | For each pay period your employer owes you
12+
- | - | -
13+
<%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %>
14+
<% else %>
15+
The National Minimum Wage per hour for your age | Your actual pay | For each pay period your employer owes you
16+
- | - | -
17+
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %>
18+
<% end %>
919

1020
\* This figure has been rounded to the nearest penny.
1121

12-
^Your actual pay should increase to at least £7.20 per hour from 1 April 2016.^
13-
1422
If you work overtime or your employer provides you with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation.
1523

1624
<%= render partial: 'shared/minimum_wage/acas_information.govspeak.erb' %>

lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/does_not_apply_to_first_year_apprentices.govspeak.erb

-5
This file was deleted.

lib/smart_answer_flows/am-i-getting-minimum-wage/questions/how_old_are_you.govspeak.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
Please enter a whole number greater than 0
1111
<% end %>
1212
<% content_for :valid_age_for_living_wage? do %>
13-
You must be 25 or over to get the national living wage
13+
You must be 25 or over to get the National Living Wage
1414
<% end %>

lib/smart_answer_flows/am-i-getting-minimum-wage/questions/what_would_you_like_to_check.govspeak.erb

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<% end %>
44

55
<% options(
6-
"current_payment": "If you're getting the National Minimum Wage (from October 2015)",
7-
"past_payment": "If an employer owes you past payments (before October 2015)",
8-
"current_payment_april_2016": "If you'll get the national living wage (from 1 April 2016)"
6+
"current_payment": "If you're getting the National Minimum Wage (from October 2015) or the National Living Wage (from April 2016)",
7+
"past_payment": "If an employer owes you past payments (before October 2015)"
98
) %>

lib/smart_answer_flows/am-i-getting-minimum-wage/questions/will_you_be_a_first_year_apprentice.govspeak.erb

-8
This file was deleted.

lib/smart_answer_flows/minimum-wage-calculator-employers.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def define
1111
option "current_payment"
1212
option "past_payment"
1313

14-
calculate :calculator do |response|
15-
Calculators::MinimumWageCalculator.new(what_to_check: response)
14+
calculate :calculator do
15+
Calculators::MinimumWageCalculator.new
1616
end
1717

1818
calculate :accommodation_charge do
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<% content_for :title do %>
2-
National Minimum Wage calculator for employers
2+
Minimum wage calculator for employers
33
<% end %>
44

55
<% content_for :meta_description do %>
6-
Check if you're paying a worker the National Minimum Wage or if you owe them payments from past years.
6+
Check if youre paying a worker the National Minimum Wage, the National Living Wage or if you owe them payments for past years.
77
<% end %>
88

99
<% content_for :body do %>
10-
Check if you're paying a worker the National Minimum Wage or if you owe them payments from past years.
10+
Check if:
11+
12+
- you’re paying a worker the National Minimum Wage
13+
- you’re paying a worker the National Living Wage
14+
- you owe your employee payments from previous years
15+
16+
^Your employee must be at least 25 years old to get the national living wage.^
1117
<% end %>

lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_above.govspeak.erb

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
<% content_for :body do %>
22
$C
3-
You are paying the National Minimum Wage.
3+
<% if calculator.eligible_for_living_wage? %>
4+
You are paying the National Living Wage.
5+
<% else %>
6+
You are paying the National Minimum Wage.
7+
<% end %>
48
$C
59

6-
The National Minimum Wage per hour for the worker’s age | The worker’s actual pay
7-
- | -
8-
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %>
10+
<% if calculator.eligible_for_living_wage? %>
11+
The National Living Wage per hour for the worker’s age | The worker’s actual pay
12+
- | -
13+
<%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %>
14+
<% else %>
15+
The National Minimum Wage per hour for the worker’s age | The worker’s actual pay
16+
- | -
17+
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %>
18+
<% end %>
19+
920

1021
If the worker works overtime or you provide them with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation.
1122

lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_below.govspeak.erb

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
<% content_for :body do %>
22
$C
3-
You aren't paying the National Minimum Wage.
3+
<% if calculator.eligible_for_living_wage? %>
4+
You aren't paying the National Living Wage.
5+
<% else %>
6+
You aren't paying the National Minimum Wage.
7+
<% end %>
48
$C
59

6-
The National Minimum Wage per hour for the worker’s age | The worker’s actual pay | For each pay period you owe the worker
7-
- | - | -
8-
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %>
10+
<% if calculator.eligible_for_living_wage? %>
11+
The National Living Wage per hour for the worker’s age | The worker’s actual pay | For each pay period you owe the worker
12+
- | - | -
13+
<%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %>
14+
<% else %>
15+
The National Minimum Wage per hour for the worker’s age | The worker’s actual pay | For each pay period you owe the worker
16+
- | - | -
17+
<%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %>
18+
<% end %>
19+
920

1021
\* This figure has been rounded to the nearest penny.
1122

lib/smart_answer_flows/minimum-wage-calculator-employers/questions/what_would_you_like_to_check.govspeak.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<% end %>
44

55
<% options(
6-
"current_payment": "If you’re paying a worker the National Wage (from October 2015)",
6+
"current_payment": "If you’re paying a worker the National Minimum Wage (from October 2015) or the National Living Wage (from April 2016)",
77
"past_payment": "If you owe a worker past payments (before October 2015)"
88
) %>
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
National Minimum Wage calculator for workers
1+
Minimum wage calculator for workers
22

3-
Check if your pay matches the National Minimum Wage or if your employer owes you payments from past years.
3+
Check if:
44

5-
You can also check if you'll get the national living wage from 1 April 2016.
5+
- you’re getting paid the National Minimum Wage
6+
- you’re getting paid the National Living Wage
7+
- your employer owes you past payments from past years
68

7-
^You must be at least 25 years old to get the national living wage.^
9+
^You must be at least 25 years old to get the National Living Wage.^
810

911

1012

test/artefacts/am-i-getting-minimum-wage/current_payment.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<link rel="stylesheet" media="all" href="/smartanswers/application.css" />
55
<link rel="stylesheet" media="print" href="/smartanswers/print.css" />
6-
<title>National Minimum Wage calculator for workers - GOV.UK</title>
6+
<title>Minimum wage calculator for workers - GOV.UK</title>
77
<script src="/smartanswers/smart-answers.js" defer="defer"></script>
88
<meta name="robots" content="noindex">
99

@@ -22,7 +22,7 @@
2222
<header class="page-header group">
2323
<div>
2424
<h1>
25-
National Minimum Wage calculator for workers
25+
Minimum wage calculator for workers
2626
</h1>
2727
</div>
2828
</header>
@@ -93,7 +93,7 @@ <h3 class="previous-answers-title">
9393
<tr class="section">
9494
<td class="previous-question-title">What would you like to check?</td>
9595
<td class="previous-question-body">
96-
If you're getting the National Minimum Wage (from October 2015)</td>
96+
If you're getting the National Minimum Wage (from October 2015) or the National Living Wage (from April 2016)</td>
9797

9898
<td class="link-right">
9999
<a href="/am-i-getting-minimum-wage/y?previous_response=current_payment">

test/artefacts/am-i-getting-minimum-wage/current_payment/apprentice_over_19_first_year/31/16.0/100.0/0.0/yes_charged/50.0/5.txt

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ The National Minimum Wage per hour for your age | Your actual pay | For each pay
1010

1111
\* This figure has been rounded to the nearest penny.
1212

13-
^Your actual pay should increase to at least £7.20 per hour from 1 April 2016.^
14-
1513
If you work overtime or your employer provides you with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation.
1614

1715
This result is an estimate. If you have any questions, call the confidential helpline.

test/artefacts/am-i-getting-minimum-wage/current_payment/apprentice_over_19_first_year/31/16.0/100.0/8.0/10.0/yes_charged/50.0/5.txt

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ The National Minimum Wage per hour for your age | Your actual pay | For each pay
1010

1111
\* This figure has been rounded to the nearest penny.
1212

13-
^Your actual pay should increase to at least £7.20 per hour from 1 April 2016.^
14-
1513
If you work overtime or your employer provides you with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation.
1614

1715
This result is an estimate. If you have any questions, call the confidential helpline.

test/artefacts/am-i-getting-minimum-wage/current_payment/apprentice_over_19_first_year/31/16.0/300.0/0.0/yes_charged/50.0/5.txt

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ The National Minimum Wage per hour for your age | Your actual pay | For each pay
1010

1111
\* This figure has been rounded to the nearest penny.
1212

13-
^Your actual pay should increase to at least £7.20 per hour from 1 April 2016.^
14-
1513
If you work overtime or your employer provides you with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation.
1614

1715
This result is an estimate. If you have any questions, call the confidential helpline.

test/artefacts/am-i-getting-minimum-wage/current_payment/apprentice_over_19_first_year/31/16.0/300.0/8.0/10.0/yes_charged/50.0/5.txt

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ The National Minimum Wage per hour for your age | Your actual pay | For each pay
1010

1111
\* This figure has been rounded to the nearest penny.
1212

13-
^Your actual pay should increase to at least £7.20 per hour from 1 April 2016.^
14-
1513
If you work overtime or your employer provides you with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation.
1614

1715
This result is an estimate. If you have any questions, call the confidential helpline.

0 commit comments

Comments
 (0)