Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaohhhh committed Dec 21, 2023
1 parent cbe4046 commit 727b002
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: Saskatchewan multiplies the eligible taxable amount of dividends under the total dividend tax credit by this amount.
description: Saskatchewan multiplies the eligible dividend amount under the total dividend tax credit by this amount.
values:
2022-01-01: 0.11
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
period: 2022
input:
province_code: SK
taxable_dividend_income: 15_000
tax_exempt_dividend_income: 1_000
eligible_dividend_income: 15_000
other_than_eligible_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
tax_exempt_dividend_income: 2_000
eligible_dividend_income: 20_000
other_than_eligible_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
tax_exempt_dividend_income: 2_800
eligible_dividend_income: 28_000
other_than_eligible_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
tax_exempt_dividend_income: 3_800
eligible_dividend_income: 30_000
other_than_eligible_dividend_income: 3_800
output:
sk_dividend_tax_credit: 2946.41
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ def formula(person, period, parameters):
period
).gov.provinces.sk.tax.income.credits.dividend_tax_credit.fraction

taxable_dividends = person("taxable_dividend_income", period)
eligible_dividend_income = person("eligible_dividend_income", period)
other_than_eligible_taxable_dividends = person(
"tax_exempt_dividend_income", period
"other_than_eligible_dividend_income", period
)

reduced_taxable_dividends = max_(
taxable_dividends - other_than_eligible_taxable_dividends, 0
reduced_eligible_dividend_income = max_(
eligible_dividend_income - other_than_eligible_taxable_dividends, 0
)
credits_on_eligible_taxable_dividends = (
reduced_taxable_dividends * p.eligible
credits_on_eligible_dividend_income = (
reduced_eligible_dividend_income * p.eligible
)

credits_on_other_than_eligible_taxable_dividends = (
credits_on_other_than_eligible_dividend_income = (
other_than_eligible_taxable_dividends * p.other_than_eligible
)

return (
credits_on_eligible_taxable_dividends
+ credits_on_other_than_eligible_taxable_dividends
credits_on_eligible_dividend_income
+ credits_on_other_than_eligible_dividend_income
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from policyengine_canada.model_api import *


class taxable_dividend_income(Variable):
class eligible_dividend_income(Variable):
value_type = float
entity = Person
label = "Total taxable dividends (eligible and other than eligible)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from policyengine_canada.model_api import *


class tax_exempt_dividend_income(Variable):
class other_than_eligible_dividend_income(Variable):
value_type = float
entity = Person
label = "Taxable Dividends (Other Than Eligible)"
Expand Down

0 comments on commit 727b002

Please sign in to comment.