ChrisCScott / forecaster

A personal finances forecasting tool for Canadian retirement planning
Other
1 stars 2 forks source link

Implement CanadianResident #7

Closed ChrisCScott closed 6 years ago

ChrisCScott commented 6 years ago

Subclass Person into CanadianResident, override tax_credit to provide the spousal tax credit, and replace the tax_treatment arg with a province (str) arg that's passed through to TaxCanada (built by CanadianResident at init time).

ChrisCScott commented 6 years ago

The spousal tax credit amount differs between provincial and federal jurisdictions. See this CRA explainer for more on spousal tax credit rules.

TaxSource is set up to assume that tax_credit and tax_deduction return Money objects, and not (e.g.) dicts of {jurisdiction: Money} pairs. This makes it hard to deal with credits and deductions that differ between jurisdictions in TaxSource subclasses like Person or CanadianResident.

For now, rather than redesign TaxSource, implement the relevant logic in TaxCanada and/or TaxCanadaJurisdiction, as described in #41.