forked from PolicyEngine/policyengine-canada
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes PolicyEngine#229
- Loading branch information
Showing
7 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rs/gov/provinces/nt/tax/income/credits/living_tax_credit/threshold/middle/supplement.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ariables/gov/provinces/nt/tax/income/credits/living_tax_credit/nt_ltc_higher_threshold.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class ntltc_high_base(Variable): | ||
class nt_ltc_higher_threshold(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Higher income for living tax credit" | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.NT | ||
|
||
def formula(household, period, parameters): | ||
def formula(person, period, parameters): | ||
p = parameters( | ||
period | ||
).gov.provinces.nt.tax.income.credits.living_tax_credit | ||
net_income = person("individual_net_income", period) | ||
eligible = (p.threshold.high.base < net_income) & (net_income < p.income_threshold) | ||
eligible = (p.threshold.high.base < net_income ) | ||
|
||
return ( | ||
(net_income - p.threshold.high.base) * p.threshold.high.rate * eligible + p.threshold.high.supplement | ||
return eligible * ( | ||
(net_income - p.threshold.high.base) * p.threshold.high.rate + p.threshold.high.supplement | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters