Skip to content

Commit 228c0e6

Browse files
authored
Treat qualifying leave as work for Tax-Free Childcare (#1600)
1 parent 74843f7 commit 228c0e6

7 files changed

Lines changed: 165 additions & 7 deletions

File tree

changelog.d/1044.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Added Tax-Free Childcare temporary absence from work handling.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
- name: Person in work is treated as in work
2+
period: 2025
3+
input:
4+
in_work: true
5+
output:
6+
tax_free_childcare_treated_as_in_work: true
7+
8+
- name: Person on qualifying leave is treated as in work
9+
period: 2025
10+
input:
11+
in_work: false
12+
tax_free_childcare_on_qualifying_leave: true
13+
output:
14+
tax_free_childcare_treated_as_in_work: true
15+
16+
- name: Person receiving statutory sick pay is treated as in work
17+
period: 2025
18+
input:
19+
in_work: false
20+
statutory_sick_pay: 100
21+
output:
22+
tax_free_childcare_treated_as_in_work: true
23+
24+
- name: Person receiving maternity allowance is treated as in work
25+
period: 2025
26+
input:
27+
in_work: false
28+
maternity_allowance: 100
29+
output:
30+
tax_free_childcare_treated_as_in_work: true
31+
32+
- name: Person receiving statutory maternity pay is treated as in work
33+
period: 2025
34+
input:
35+
in_work: false
36+
statutory_maternity_pay: 100
37+
output:
38+
tax_free_childcare_treated_as_in_work: true
39+
40+
- name: Person receiving statutory paternity pay is treated as in work
41+
period: 2025
42+
input:
43+
in_work: false
44+
statutory_paternity_pay: 100
45+
output:
46+
tax_free_childcare_treated_as_in_work: true
47+
48+
- name: Person with no work or temporary absence condition is not treated as in work
49+
period: 2025
50+
input:
51+
in_work: false
52+
tax_free_childcare_on_qualifying_leave: false
53+
output:
54+
tax_free_childcare_treated_as_in_work: false

policyengine_uk/tests/policy/baseline/gov/hmrc/tax_free_childcare/tax_free_childcare_work_condition.yaml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,56 @@
164164
benunit:
165165
members: [person]
166166
output:
167-
tax_free_childcare_work_condition: false
167+
tax_free_childcare_work_condition: false
168+
169+
- name: Single adult on qualifying parenting leave - eligible
170+
period: 2025
171+
input:
172+
people:
173+
person:
174+
is_adult: true
175+
in_work: false
176+
tax_free_childcare_on_qualifying_leave: true
177+
benunits:
178+
benunit:
179+
members: [person]
180+
output:
181+
tax_free_childcare_work_condition: true
182+
183+
- name: Couple one working one on qualifying parenting leave - eligible
184+
period: 2025
185+
input:
186+
people:
187+
person:
188+
is_adult: true
189+
is_parent: true
190+
in_work: true
191+
spouse:
192+
is_adult: true
193+
is_parent: true
194+
in_work: false
195+
tax_free_childcare_on_qualifying_leave: true
196+
benunits:
197+
benunit:
198+
members: [person, spouse]
199+
output:
200+
tax_free_childcare_work_condition: true
201+
202+
- name: Couple one working one receiving statutory maternity pay - eligible
203+
period: 2025
204+
input:
205+
people:
206+
person:
207+
is_adult: true
208+
is_parent: true
209+
in_work: true
210+
spouse:
211+
is_adult: true
212+
is_parent: true
213+
in_work: false
214+
statutory_maternity_pay: 100
215+
benunits:
216+
benunit:
217+
members: [person, spouse]
218+
output:
219+
tax_free_childcare_work_condition: true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from policyengine_uk.model_api import *
2+
3+
4+
class tax_free_childcare_on_qualifying_leave(Variable):
5+
value_type = bool
6+
entity = Person
7+
label = "on qualifying leave for tax-free childcare"
8+
documentation = (
9+
"Whether this person is on qualifying sickness, parenting, annual, "
10+
"parental bereavement, or neonatal care leave for Tax-Free Childcare."
11+
)
12+
definition_period = YEAR
13+
default_value = False
14+
reference = [
15+
"https://www.legislation.gov.uk/uksi/2015/448/regulation/12",
16+
"https://www.legislation.gov.uk/uksi/2015/448/regulation/14",
17+
]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from policyengine_uk.model_api import *
2+
3+
4+
class tax_free_childcare_treated_as_in_work(Variable):
5+
value_type = bool
6+
entity = Person
7+
label = "treated as in work for tax-free childcare"
8+
definition_period = YEAR
9+
reference = [
10+
"https://www.legislation.gov.uk/uksi/2015/448/regulation/12",
11+
"https://www.legislation.gov.uk/uksi/2015/448/regulation/14",
12+
]
13+
14+
def formula(person, period, parameters):
15+
statutory_temporary_absence_pay = (
16+
add(
17+
person,
18+
period,
19+
[
20+
"statutory_sick_pay",
21+
"maternity_allowance",
22+
"statutory_maternity_pay",
23+
"statutory_paternity_pay",
24+
],
25+
)
26+
> 0
27+
)
28+
return (
29+
person("in_work", period)
30+
| person("tax_free_childcare_on_qualifying_leave", period)
31+
| statutory_temporary_absence_pay
32+
)

policyengine_uk/variables/gov/hmrc/tax_free_childcare/conditions/tax_free_childcare_work_condition.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ def formula(person, period, parameters):
1111
benunit = person.benunit
1212
is_adult = person("is_adult", period)
1313

14-
# Basic work status
15-
in_work = person("in_work", period)
14+
treated_as_in_work = person(
15+
"tax_free_childcare_treated_as_in_work",
16+
period,
17+
)
1618

1719
# Get disability parameters and check eligibility
1820
p_gc_disability = parameters(
@@ -33,14 +35,14 @@ def formula(person, period, parameters):
3335
# Build conditions
3436
# Single adult conditions
3537
is_single = person.benunit("is_single", period)
36-
single_working = is_single & in_work
38+
single_working = is_single & treated_as_in_work
3739

3840
# Couple conditions
3941
is_couple = person.benunit("is_couple", period)
4042
benunit_has_condition = benunit.any(eligible_based_on_disability & is_adult)
41-
benunit_has_worker = benunit.any(in_work & is_adult)
43+
benunit_has_worker = benunit.any(treated_as_in_work & is_adult)
4244
couple_both_working = is_couple & benunit.all(
43-
in_work | ~person("is_parent", period)
45+
treated_as_in_work | ~person("is_parent", period)
4446
)
4547
couple_one_working_one_disabled = (
4648
is_couple & benunit_has_worker & benunit_has_condition

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)