- Previous answers -
- Start again -What would you like to check? | -- If you'll get the national living wage (from 1 April 2016) | - -- - Change answer to "What would you like to check?" - | -
diff --git a/lib/smart_answer/calculators/minimum_wage_calculator.rb b/lib/smart_answer/calculators/minimum_wage_calculator.rb index 67b36ad3c8d..8e5f0b27a11 100644 --- a/lib/smart_answer/calculators/minimum_wage_calculator.rb +++ b/lib/smart_answer/calculators/minimum_wage_calculator.rb @@ -4,14 +4,13 @@ class MinimumWageCalculator attr_accessor :age, :pay_frequency, :basic_hours, :basic_pay, :is_apprentice, :overtime_hours, :overtime_hourly_rate, :accommodation_cost - attr_reader :date, :what_to_check + attr_reader :date def initialize(params = {}) @age = params[:age] @date = (params[:date].nil? ? Date.today : params[:date]) @basic_hours = params[:basic_hours].to_f @basic_pay = params[:basic_pay].to_f - @what_to_check = params[:what_to_check] @is_apprentice = params[:is_apprentice] @pay_frequency = params[:pay_frequency] || 7 @overtime_hours = params[:overtime_hours].to_i || 0 @@ -74,7 +73,11 @@ def minimum_hourly_rate if @is_apprentice @minimum_wage_data[:apprentice_rate] else - per_hour_minimum_wage + if eligible_for_living_wage? + national_living_wage_rate + else + per_hour_minimum_wage + end end end diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage.rb b/lib/smart_answer_flows/am-i-getting-minimum-wage.rb index 61a2d822a81..7b454766975 100644 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage.rb +++ b/lib/smart_answer_flows/am-i-getting-minimum-wage.rb @@ -10,10 +10,9 @@ def define multiple_choice :what_would_you_like_to_check? do option "current_payment" option "past_payment" - option "current_payment_april_2016" - calculate :calculator do |response| - Calculators::MinimumWageCalculator.new(what_to_check: response) + calculate :calculator do + Calculators::MinimumWageCalculator.new end calculate :accommodation_charge do @@ -24,52 +23,22 @@ def define case response when 'current_payment' question :are_you_an_apprentice? - when 'current_payment_april_2016' - question :will_you_be_a_first_year_apprentice? when 'past_payment' question :past_payment_date? end end end - # Q2 - April 2016 - multiple_choice :will_you_be_a_first_year_apprentice? do - option :yes - option :no - - next_node do |response| - case response - when 'yes' - calculator.is_apprentice = true - outcome :does_not_apply_to_first_year_apprentices - when 'no' - question :how_old_are_you? #Q3 - end - end - end - # Q3 value_question :how_old_are_you?, parse: Integer do precalculate :age_title do - if calculator.what_to_check == 'current_payment_april_2016' - "How old will you be on 1 April 2016?" - else - "How old are you?" - end + "How old are you?" end validate do |response| calculator.valid_age?(response) end - validate :valid_age_for_living_wage? do |response| - if calculator.what_to_check == 'current_payment_april_2016' - calculator.valid_age_for_living_wage?(response) - else - true - end - end - next_node do |response| calculator.age = response if calculator.under_school_leaving_age? @@ -81,8 +50,6 @@ def define end use_shared_logic "minimum_wage" - - outcome :does_not_apply_to_first_year_apprentices end end end diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/am_i_getting_minimum_wage.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/am_i_getting_minimum_wage.govspeak.erb index ece9b60f421..4dbb1a5635b 100644 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/am_i_getting_minimum_wage.govspeak.erb +++ b/lib/smart_answer_flows/am-i-getting-minimum-wage/am_i_getting_minimum_wage.govspeak.erb @@ -1,15 +1,17 @@ <% content_for :title do %> - National Minimum Wage calculator for workers + Minimum wage calculator for workers <% end %> <% content_for :meta_description do %> - Check if your pay matches the National Minimum Wage, the national living wage or if your employer owes you payments from past years. + Check if your pay matches the National Minimum Wage, the National Living Wage or if your employer owes you payments from past years. <% end %> <% content_for :body do %> - Check if your pay matches the National Minimum Wage or if your employer owes you payments from past years. + Check if: - You can also check if you'll get the national living wage from 1 April 2016. + - you’re getting paid the National Minimum Wage + - you’re getting paid the National Living Wage + - your employer owes you past payments from past years - ^You must be at least 25 years old to get the national living wage.^ + ^You must be at least 25 years old to get the National Living Wage.^ <% end %> diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_above.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_above.govspeak.erb index 69fed1cabf0..cd2fb287a18 100644 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_above.govspeak.erb +++ b/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_above.govspeak.erb @@ -1,25 +1,19 @@ <% content_for :body do %> $C - <% if calculator.what_to_check == 'current_payment_april_2016' && calculator.eligible_for_living_wage? %> - <% if calculator.living_wage_or_above? %> - You will be getting the national living wage - <% else %> - You are getting the National Minimum wage but your pay should be increased to at least the national living wage from 1 April 2016. - <% end %> + <% if calculator.eligible_for_living_wage? %> + You are getting the National Living Wage. <% else %> You are getting the National Minimum Wage. <% end %> $C - <% if calculator.what_to_check == 'current_payment_april_2016' && calculator.eligible_for_living_wage? %> - The national living wage per hour for your age will be | Your actual pay - <% else %> - The National Minimum Wage per hour for your age | Your actual pay - <% end %> + <% if calculator.eligible_for_living_wage? %> + The National Living Wage per hour for your age | Your actual pay - | - - <% if calculator.what_to_check == 'current_payment_april_2016' && calculator.eligible_for_living_wage? %> <%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %> <% else %> + The National Minimum Wage per hour for your age | Your actual pay + - | - <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> <% end %> diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_below.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_below.govspeak.erb index c232a446965..8407494ddcd 100644 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_below.govspeak.erb +++ b/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/current_payment_below.govspeak.erb @@ -1,16 +1,24 @@ <% content_for :body do %> $C - You aren't getting the National Minimum Wage. + <% if calculator.eligible_for_living_wage? %> + You aren't getting the National Living Wage. + <% else %> + You aren't getting the National Minimum Wage. + <% end %> $C - The National Minimum Wage per hour for your age | Your actual pay | For each pay period your employer owes you - - | - | - - <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %> + <% if calculator.eligible_for_living_wage? %> + The National Living Wage per hour for your age | Your actual pay | For each pay period your employer owes you + - | - | - + <%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %> + <% else %> + The National Minimum Wage per hour for your age | Your actual pay | For each pay period your employer owes you + - | - | - + <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %> + <% end %> \* This figure has been rounded to the nearest penny. - ^Your actual pay should increase to at least £7.20 per hour from 1 April 2016.^ - If you work overtime or your employer provides you with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation. <%= render partial: 'shared/minimum_wage/acas_information.govspeak.erb' %> diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/does_not_apply_to_first_year_apprentices.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/does_not_apply_to_first_year_apprentices.govspeak.erb deleted file mode 100644 index c925cb06b0b..00000000000 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/outcomes/does_not_apply_to_first_year_apprentices.govspeak.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% content_for :body do %> - You won't get the national living wage as a first year apprentice. - - You'll only get the [National Minimum Wage for an apprentice.](/apprenticeships-guide/pay-and-conditions) -<% end %> diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/how_old_are_you.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/how_old_are_you.govspeak.erb index 87f03a3d5bf..ec4bdb337a4 100644 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/how_old_are_you.govspeak.erb +++ b/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/how_old_are_you.govspeak.erb @@ -10,5 +10,5 @@ Please enter a whole number greater than 0 <% end %> <% content_for :valid_age_for_living_wage? do %> - You must be 25 or over to get the national living wage + You must be 25 or over to get the National Living Wage <% end %> diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/what_would_you_like_to_check.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/what_would_you_like_to_check.govspeak.erb index ffd7096a56f..ccb592567a6 100644 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/what_would_you_like_to_check.govspeak.erb +++ b/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/what_would_you_like_to_check.govspeak.erb @@ -3,7 +3,6 @@ <% end %> <% options( - "current_payment": "If you're getting the National Minimum Wage (from October 2015)", - "past_payment": "If an employer owes you past payments (before October 2015)", - "current_payment_april_2016": "If you'll get the national living wage (from 1 April 2016)" + "current_payment": "If you're getting the National Minimum Wage (from October 2015) or the National Living Wage (from April 2016)", + "past_payment": "If an employer owes you past payments (before October 2015)" ) %> diff --git a/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/will_you_be_a_first_year_apprentice.govspeak.erb b/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/will_you_be_a_first_year_apprentice.govspeak.erb deleted file mode 100644 index 09e3ed51b06..00000000000 --- a/lib/smart_answer_flows/am-i-getting-minimum-wage/questions/will_you_be_a_first_year_apprentice.govspeak.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% content_for :title do %> - Will you be in the first year of an apprenticeship on 1 April 2016? -<% end %> - -<% options( - "no": "No", - "yes": "Yes" -) %> diff --git a/lib/smart_answer_flows/minimum-wage-calculator-employers.rb b/lib/smart_answer_flows/minimum-wage-calculator-employers.rb index 3a70e2f7247..fd8e6532d27 100644 --- a/lib/smart_answer_flows/minimum-wage-calculator-employers.rb +++ b/lib/smart_answer_flows/minimum-wage-calculator-employers.rb @@ -11,8 +11,8 @@ def define option "current_payment" option "past_payment" - calculate :calculator do |response| - Calculators::MinimumWageCalculator.new(what_to_check: response) + calculate :calculator do + Calculators::MinimumWageCalculator.new end calculate :accommodation_charge do diff --git a/lib/smart_answer_flows/minimum-wage-calculator-employers/minimum_wage_calculator_employers.govspeak.erb b/lib/smart_answer_flows/minimum-wage-calculator-employers/minimum_wage_calculator_employers.govspeak.erb index d56d6e1d7e6..ff8902758fc 100644 --- a/lib/smart_answer_flows/minimum-wage-calculator-employers/minimum_wage_calculator_employers.govspeak.erb +++ b/lib/smart_answer_flows/minimum-wage-calculator-employers/minimum_wage_calculator_employers.govspeak.erb @@ -1,11 +1,17 @@ <% content_for :title do %> - National Minimum Wage calculator for employers + Minimum wage calculator for employers <% end %> <% content_for :meta_description do %> - Check if you're paying a worker the National Minimum Wage or if you owe them payments from past years. + Check if you’re paying a worker the National Minimum Wage, the National Living Wage or if you owe them payments for past years. <% end %> <% content_for :body do %> - Check if you're paying a worker the National Minimum Wage or if you owe them payments from past years. + Check if: + + - you’re paying a worker the National Minimum Wage + - you’re paying a worker the National Living Wage + - you owe your employee payments from previous years + + ^Your employee must be at least 25 years old to get the national living wage.^ <% end %> diff --git a/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_above.govspeak.erb b/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_above.govspeak.erb index 7f748d397a1..f7104a1b333 100644 --- a/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_above.govspeak.erb +++ b/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_above.govspeak.erb @@ -1,11 +1,22 @@ <% content_for :body do %> $C - You are paying the National Minimum Wage. + <% if calculator.eligible_for_living_wage? %> + You are paying the National Living Wage. + <% else %> + You are paying the National Minimum Wage. + <% end %> $C - The National Minimum Wage per hour for the worker’s age | The worker’s actual pay - - | - - <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> + <% if calculator.eligible_for_living_wage? %> + The National Living Wage per hour for the worker’s age | The worker’s actual pay + - | - + <%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %> + <% else %> + The National Minimum Wage per hour for the worker’s age | The worker’s actual pay + - | - + <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> + <% end %> + If the worker works overtime or you provide them with [accommodation](/national-minimum-wage-accommodation), this has been added to the calculation. diff --git a/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_below.govspeak.erb b/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_below.govspeak.erb index 46ef78bb871..525daca1c5f 100644 --- a/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_below.govspeak.erb +++ b/lib/smart_answer_flows/minimum-wage-calculator-employers/outcomes/current_payment_below.govspeak.erb @@ -1,11 +1,22 @@ <% content_for :body do %> $C - You aren't paying the National Minimum Wage. + <% if calculator.eligible_for_living_wage? %> + You aren't paying the National Living Wage. + <% else %> + You aren't paying the National Minimum Wage. + <% end %> $C - The National Minimum Wage per hour for the worker’s age | The worker’s actual pay | For each pay period you owe the worker - - | - | - - <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %> + <% if calculator.eligible_for_living_wage? %> + The National Living Wage per hour for the worker’s age | The worker’s actual pay | For each pay period you owe the worker + - | - | - + <%= format_money(calculator.national_living_wage_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %> + <% else %> + The National Minimum Wage per hour for the worker’s age | The worker’s actual pay | For each pay period you owe the worker + - | - | - + <%= format_money(calculator.minimum_hourly_rate) %> | <%= format_money(calculator.total_hourly_rate) %> * | <%= format_money(calculator.total_underpayment) %> + <% end %> + \* This figure has been rounded to the nearest penny. diff --git a/lib/smart_answer_flows/minimum-wage-calculator-employers/questions/what_would_you_like_to_check.govspeak.erb b/lib/smart_answer_flows/minimum-wage-calculator-employers/questions/what_would_you_like_to_check.govspeak.erb index ed36b57dae5..21ca55af7c2 100644 --- a/lib/smart_answer_flows/minimum-wage-calculator-employers/questions/what_would_you_like_to_check.govspeak.erb +++ b/lib/smart_answer_flows/minimum-wage-calculator-employers/questions/what_would_you_like_to_check.govspeak.erb @@ -3,6 +3,6 @@ <% end %> <% options( - "current_payment": "If you’re paying a worker the National Wage (from October 2015)", + "current_payment": "If you’re paying a worker the National Minimum Wage (from October 2015) or the National Living Wage (from April 2016)", "past_payment": "If you owe a worker past payments (before October 2015)" ) %> diff --git a/test/artefacts/am-i-getting-minimum-wage/am-i-getting-minimum-wage.txt b/test/artefacts/am-i-getting-minimum-wage/am-i-getting-minimum-wage.txt index b5efeed395c..0e3c9a6aadd 100644 --- a/test/artefacts/am-i-getting-minimum-wage/am-i-getting-minimum-wage.txt +++ b/test/artefacts/am-i-getting-minimum-wage/am-i-getting-minimum-wage.txt @@ -1,10 +1,12 @@ -National Minimum Wage calculator for workers +Minimum wage calculator for workers -Check if your pay matches the National Minimum Wage or if your employer owes you payments from past years. +Check if: -You can also check if you'll get the national living wage from 1 April 2016. +- you’re getting paid the National Minimum Wage +- you’re getting paid the National Living Wage +- your employer owes you past payments from past years -^You must be at least 25 years old to get the national living wage.^ +^You must be at least 25 years old to get the National Living Wage.^ diff --git a/test/artefacts/am-i-getting-minimum-wage/current_payment.html b/test/artefacts/am-i-getting-minimum-wage/current_payment.html index 4a59cd5621a..4286eaf8f6c 100644 --- a/test/artefacts/am-i-getting-minimum-wage/current_payment.html +++ b/test/artefacts/am-i-getting-minimum-wage/current_payment.html @@ -3,7 +3,7 @@
-What would you like to check? | -- If you'll get the national living wage (from 1 April 2016) | - -- - Change answer to "What would you like to check?" - | -