Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maternity Paternity Calculator: Implementation for Employee Adoption matching week #3135

Conversation

ikennaokpala
Copy link
Contributor

@ikennaokpala ikennaokpala commented Jul 11, 2017

Trello card

Motivation

For adoption an employee has to be employed in the matching week to get Statutory Adoption Pay but maternity-paternity-calculator is using the first date in qualifying week (which is for maternity / paternity calculations)

So the question:
Was the employee (or will they be) on your payroll on [qualifying week]?

Should say:
Was the employee (or will they be) on your payroll on [start of matching week - ie the Sunday before the matching date]?

This PR fixes this by adding an adoption_matching_week_start method that the Sunday before if the qualifying week isn't a Sunday and vice versa.

Factcheck

Preview link
GOVUK

Expected changes

  • For match / due date that are Sunday the qualifying week start date is used
  • For match / due date that are not on a Sunday the the date of the Sunday before is used

Before

screen shot 2017-07-11 at 17 19 14

After

screen shot 2017-07-11 at 17 19 00

Other examples

@chao-xian chao-xian temporarily deployed to smart-answers-preview-pr-3135 July 11, 2017 16:16 Inactive
@ikennaokpala ikennaokpala added needs content review Waiting for a content designer to approve Ready for code review labels Jul 11, 2017
@ikennaokpala ikennaokpala force-pushed the maternity-paternity-calculator/adoption-calculation-for-employers branch from c273484 to 77b0647 Compare July 11, 2017 16:25
@chao-xian chao-xian temporarily deployed to smart-answers-preview-pr-3135 July 11, 2017 16:25 Inactive
@ikennaokpala ikennaokpala force-pushed the maternity-paternity-calculator/adoption-calculation-for-employers branch from 77b0647 to 78a4400 Compare July 12, 2017 10:24
@chao-xian chao-xian temporarily deployed to smart-answers-preview-pr-3135 July 12, 2017 10:24 Inactive
@ikennaokpala ikennaokpala force-pushed the maternity-paternity-calculator/adoption-calculation-for-employers branch from 78a4400 to 3fae989 Compare July 12, 2017 10:47
@chao-xian chao-xian temporarily deployed to smart-answers-preview-pr-3135 July 12, 2017 10:47 Inactive
@ikennaokpala ikennaokpala force-pushed the maternity-paternity-calculator/adoption-calculation-for-employers branch from 3fae989 to ba03676 Compare July 12, 2017 11:07
@chao-xian chao-xian temporarily deployed to smart-answers-preview-pr-3135 July 12, 2017 11:08 Inactive
Copy link
Contributor

@mgrassotti mgrassotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ikennaokpala 👍 this looks fine to me LGTM

@ikennaokpala ikennaokpala added Passed code review and removed needs content review Waiting for a content designer to approve Ready for code review labels Jul 17, 2017
For adoption an employee has to be employed in the *matching week* to
get Statutory Adoption Pay but maternity-paternity-calculator is using
the first date  in *qualifying week* (which is for maternity /
paternity calculations)

So the question:
Was the employee (or will they be) on your payroll on [qualifying week]?

Should say:
Was the employee (or will they be) on your payroll on [start of matching
week - ie the Sunday before the matching date]?

This commit fixes this by adding an adoption_matching_week_start method
that the Sunday before  if the *qualifying week* isn't a Sunday and
vice versa.
@ikennaokpala ikennaokpala force-pushed the maternity-paternity-calculator/adoption-calculation-for-employers branch from ba03676 to 0da73d6 Compare July 28, 2017 15:37
@ikennaokpala ikennaokpala merged commit 2b717f4 into master Jul 28, 2017
@ikennaokpala ikennaokpala deleted the maternity-paternity-calculator/adoption-calculation-for-employers branch July 28, 2017 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants