Skip to content

Commit 3016d60

Browse files
authored
Add Tax-Free Childcare UK connection condition (#1597)
1 parent c107047 commit 3016d60

5 files changed

Lines changed: 31 additions & 3 deletions

File tree

changelog.d/1046.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added the Tax-Free Childcare UK connection eligibility condition.

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
output:
88
tax_free_childcare_program_eligible: True
99

10+
- name: Non eligible - does not meet UK connection requirement
11+
period: 2025
12+
input:
13+
working_tax_credit: 0
14+
child_tax_credit: 0
15+
universal_credit: 0
16+
tax_free_childcare_meets_uk_connection: false
17+
output:
18+
tax_free_childcare_program_eligible: False
1019

1120
- name: Non eligible - receives benefits
1221
period: 2025
@@ -35,4 +44,4 @@
3544
child_tax_credit: 1
3645
universal_credit: 1
3746
output:
38-
tax_free_childcare_program_eligible: False
47+
tax_free_childcare_program_eligible: False
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from policyengine_uk.model_api import *
2+
3+
4+
class tax_free_childcare_meets_uk_connection(Variable):
5+
value_type = bool
6+
entity = BenUnit
7+
label = "meets the Tax-Free Childcare UK connection requirement"
8+
documentation = (
9+
"Whether the family satisfies the Tax-Free Childcare requirement to be "
10+
"treated as being in the United Kingdom."
11+
)
12+
definition_period = YEAR
13+
default_value = True
14+
reference = "The Childcare Payments (Eligibility) Regulations 2015 regs. 6-8"

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ def formula(person, period, parameters):
1414
period,
1515
p.disqualifying_benefits,
1616
)
17-
return countable_programs == 0
17+
meets_uk_connection = person.benunit(
18+
"tax_free_childcare_meets_uk_connection",
19+
period,
20+
)
21+
return (countable_programs == 0) & meets_uk_connection

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)