-
Notifications
You must be signed in to change notification settings - Fork 35
Saskatchewan Dividend Tax Credit #457
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
Open
Yaohhhh
wants to merge
14
commits into
PolicyEngine:master
Choose a base branch
from
Yaohhhh:Yaohhhh/issue456
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6f94274
Add para, var, test, and changelog. Test passed.
Yaohhhh f3e4eab
update version
Yaohhhh d22afd0
Improve codes
Yaohhhh 8a64ce1
Fix codes
Yaohhhh e73a079
make format
Yaohhhh 6eafe64
Add test scenarios
Yaohhhh 2c00838
fix errors
Yaohhhh 32f1151
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
Yaohhhh a3e2102
Fix errors
Yaohhhh d6f2e1b
Improve codes
Yaohhhh 4e4d255
Saskatchewan Dividend Tax Credit
Yaohhhh cbe4046
Change reference source
Yaohhhh 727b002
improve
Yaohhhh 8063c20
Improve
Yaohhhh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| - bump: minor | ||
| changes: | ||
| added: | ||
| - Saskatchewan dividend tax credit. |
12 changes: 12 additions & 0 deletions
12
...ameters/gov/provinces/sk/tax/income/credits/dividend_tax_credit/eligible_cal_percent.yaml
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| description: Saskatchewan applies this weight percentage on the eligible taxable amount of dividends in calculating the total dividend tax credit. | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| values: | ||
| 2022-01-01: 0.11 | ||
| metadata: | ||
| unit: /1 | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| period: year | ||
| label: Saskatchewan eligible taxable amount of dividends' weight percentage | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| reference: | ||
| - title: 5008-D Worksheet SK428 - Saskatchewan 2022 | ||
| href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5008-d/5008-d-22e.pdf#page=3 | ||
| - title: Saskatchewan The Income Tax Act, 2000, Dividend credit, c25, s.13; 2020, c3-29*, s.3; 2022, c46, s.3. | ||
| href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=31 | ||
12 changes: 12 additions & 0 deletions
12
.../provinces/sk/tax/income/credits/dividend_tax_credit/other_than_eligible_cal_percent.yaml
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| description: Saskatchewan applies this weight percentage on the other than eligible taxable amount of dividends in calculating the total dividend tax credit. | ||
| values: | ||
| 2022-01-01: 0.01695 | ||
| metadata: | ||
| unit: /1 | ||
| period: year | ||
| label: Saskatchewan other than eligible taxable amount of dividends' weight percentage | ||
| reference: | ||
| - title: 5008-D Worksheet SK428 - Saskatchewan 2022 | ||
| href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5008-d/5008-d-22e.pdf#page=3 | ||
| - title: Saskatchewan The Income Tax Act, 2000, Dividend credit, c25, s.13; 2020, c3-29*, s.3; 2022, c46, s.3. | ||
| href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=31 |
35 changes: 35 additions & 0 deletions
35
policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_dividend_tax_credit.yaml
|
Yaohhhh marked this conversation as resolved.
|
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| - name: 2022 Saskatchewan Dividend Tax Credit Test 1 | ||
| period: 2022 | ||
| input: | ||
| province_code: SK | ||
| taxable_dividend_income: 15_000 | ||
| other_than_eligible_taxable_dividend_income: 1_000 | ||
| output: | ||
| sk_dividend_tax_credit: 1556.95 | ||
|
|
||
| - name: 2022 Saskatchewan Dividend Tax Credit Test 2 | ||
| period: 2022 | ||
| input: | ||
| province_code: SK | ||
| taxable_dividend_income: 20_000 | ||
| other_than_eligible_taxable_dividend_income: 2_000 | ||
| output: | ||
| sk_dividend_tax_credit: 2013.9 | ||
|
|
||
| - name: 2022 Saskatchewan Dividend Tax Credit Test 3 | ||
| period: 2022 | ||
| input: | ||
| province_code: SK | ||
| taxable_dividend_income: 28_000 | ||
| other_than_eligible_taxable_dividend_income: 2_800 | ||
| output: | ||
| sk_dividend_tax_credit: 2819.46 | ||
|
|
||
| - name: 2022 Saskatchewan Dividend Tax Credit Test 4 | ||
| period: 2022 | ||
| input: | ||
| province_code: SK | ||
| taxable_dividend_income: 30_000 | ||
| other_than_eligible_taxable_dividend_income: 3_800 | ||
| output: | ||
| sk_dividend_tax_credit: 2946.41 |
44 changes: 44 additions & 0 deletions
44
...bles/gov/provinces/sk/tax/income/credits/sk_dividend_tax_credit/sk_dividend_tax_credit.py
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class sk_dividend_tax_credit(Variable): | ||
| value_type = float | ||
| entity = Person | ||
| label = "Saskatchewan Dividend Tax Credit" | ||
| unit = CAD | ||
| definition_period = YEAR | ||
| reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5008-d/5008-d-22e.pdf#page=3" | ||
| defined_for = ProvinceCode.SK | ||
|
|
||
| def formula(person, period, parameters): | ||
| p = parameters( | ||
| period | ||
| ).gov.provinces.sk.tax.income.credits.dividend_tax_credit | ||
|
|
||
| taxable_dividends = person("taxable_dividend_income", period) | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| other_than_eligible_taxable_dividends = person( | ||
| "other_than_eligible_taxable_dividend_income", period | ||
| ) | ||
|
|
||
| eligible_taxable_dividends_weight_percent = p.eligible_cal_percent | ||
| other_than_eligible_taxable_dividends_weight_percent = ( | ||
| p.other_than_eligible_cal_percent | ||
| ) | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
|
|
||
| reduced_taxable_dividends = max_( | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| taxable_dividends - other_than_eligible_taxable_dividends, 0 | ||
| ) | ||
| credits_on_eligible_taxable_dividends = ( | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| reduced_taxable_dividends | ||
| * eligible_taxable_dividends_weight_percent | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| ) | ||
|
|
||
| credits_on_other_than_eligible_taxable_dividends = ( | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| other_than_eligible_taxable_dividends | ||
| * other_than_eligible_taxable_dividends_weight_percent | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| ) | ||
|
|
||
| return ( | ||
| credits_on_eligible_taxable_dividends | ||
| + credits_on_other_than_eligible_taxable_dividends | ||
| ) | ||
10 changes: 10 additions & 0 deletions
10
...nada/variables/household/income/individual/other_than_eligible_taxable_dividend_income.py
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class other_than_eligible_taxable_dividend_income(Variable): | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| value_type = float | ||
| entity = Person | ||
| label = "Taxable Dividends (Other Than Eligible)" | ||
| unit = CAD | ||
| definition_period = YEAR | ||
| reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5008-d/5008-d-22e.pdf#page=3" | ||
10 changes: 10 additions & 0 deletions
10
policyengine_canada/variables/household/income/individual/taxable_dividend_income.py
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class taxable_dividend_income(Variable): | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
| value_type = float | ||
| entity = Person | ||
| label = "Total taxable dividends (eligible and other than eligible)" | ||
| unit = CAD | ||
| definition_period = YEAR | ||
| reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5008-d/5008-d-22e.pdf#page=3" | ||
|
Yaohhhh marked this conversation as resolved.
Outdated
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.