Commit 732fa08
Children in a married benefit unit are assigned MaritalStatus.MARRIED and have
tax_band == NONE, so they passed the Marriage Allowance eligibility checks. The
transferable amount calculation then produced a negative value (their full PA
minus zero adult-summed unused PA), which flowed into earned_taxable_income and
generated phantom basic-rate income tax of 20% × £12,570 per child.
Guard marriage_allowance with is_adult, clamp the eligible amount at zero, and
fix partners_unused_personal_allowance to subtract the person's own unused PA
only when they are an adult (mirrors the inclusion in the benunit sum).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent be8ca93 commit 732fa08
4 files changed
Lines changed: 34 additions & 4 deletions
File tree
- changelog.d
- policyengine_uk
- tests/policy/baseline/gov/hmrc/income_tax/allowances
- variables/gov/hmrc/income_tax/allowances
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | | - | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments