-
Notifications
You must be signed in to change notification settings - Fork 31
Einnahmen / Einkünfte: Fix #842 and #837 #862
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e19da15
Move Rente to Einkünfte.
MImmesberger 93aa149
Remove last instances of Renteneinkommen.
MImmesberger 41f19b3
Add other types of Einkünfte.
MImmesberger d19b4c3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b931516
Add new Einkünfte to full_taxes_and_transfers test.
MImmesberger 8b29afb
Merge branch 'einnahmen-einkuenfte' of https://github.com/iza-institu…
MImmesberger 7ce8fa7
Docstrings
hmgaudecker cb7ae17
Docstring
hmgaudecker a897e8a
Order of GdE inputs.
MImmesberger 4f2a0cc
Merge branch 'fix-833' into einnahmen-einkuenfte
MImmesberger 61d7fa3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 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
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
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
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
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
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
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
Empty file.
8 changes: 8 additions & 0 deletions
8
src/_gettsim/einkommensteuer/einkünfte/aus_forst_und_landwirtschaft/inputs.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,8 @@ | ||
| """Input columns.""" | ||
|
|
||
| from ttsim import policy_input | ||
|
|
||
|
|
||
| @policy_input() | ||
| def betrag_m() -> float: | ||
| """Monthly income from forestry and agriculture.""" |
Empty file.
8 changes: 8 additions & 0 deletions
8
src/_gettsim/einkommensteuer/einkünfte/aus_gewerbebetrieb/inputs.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,8 @@ | ||
| """Input columns.""" | ||
|
|
||
| from ttsim import policy_input | ||
|
|
||
|
|
||
| @policy_input() | ||
| def betrag_m() -> float: | ||
| """Monthly business income.""" |
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,50 @@ | ||
| """Einkünfte according to §§ 13-24 EStG.""" | ||
|
|
||
| from ttsim import policy_function | ||
|
|
||
|
|
||
| @policy_function(end_date="2008-12-31", leaf_name="gesamtbetrag_der_einkünfte_y") | ||
| def gesamtbetrag_der_einkünfte_y_mit_kapiteleinkünften( | ||
| aus_forst_und_landwirtschaft__betrag_y: float, | ||
| aus_gewerbebetrieb__betrag_y: float, | ||
| aus_selbstständiger_arbeit__betrag_y: float, | ||
| aus_nichtselbstständiger_arbeit__betrag_y: float, | ||
| aus_kapitalvermögen__betrag_y: float, | ||
| aus_vermietung_und_verpachtung__betrag_y: float, | ||
| sonstige__betrag_y: float, | ||
| ) -> float: | ||
| """Gesamtbetrag der Einkünfte (GdE) with capital income.""" | ||
| out = ( | ||
| aus_forst_und_landwirtschaft__betrag_y | ||
| + aus_gewerbebetrieb__betrag_y | ||
| + aus_selbstständiger_arbeit__betrag_y | ||
| + aus_nichtselbstständiger_arbeit__betrag_y | ||
| + aus_kapitalvermögen__betrag_y | ||
| + aus_vermietung_und_verpachtung__betrag_y | ||
| + sonstige__betrag_y | ||
| ) | ||
| return out | ||
|
|
||
|
|
||
| @policy_function(start_date="2009-01-01", leaf_name="gesamtbetrag_der_einkünfte_y") | ||
| def gesamtbetrag_der_einkünfte_y_ohne_kapitaleinkünfte( | ||
| aus_forst_und_landwirtschaft__betrag_y: float, | ||
| aus_gewerbebetrieb__betrag_y: float, | ||
| aus_selbstständiger_arbeit__betrag_y: float, | ||
| aus_nichtselbstständiger_arbeit__betrag_y: float, | ||
| aus_vermietung_und_verpachtung__betrag_y: float, | ||
| sonstige__betrag_y: float, | ||
| ) -> float: | ||
| """Gesamtbetrag der Einkünfte (GdE) without capital income. | ||
|
|
||
| Since 2009 capital income is not subject to normal taxation. | ||
| """ | ||
| out = ( | ||
| aus_forst_und_landwirtschaft__betrag_y | ||
| + aus_gewerbebetrieb__betrag_y | ||
| + aus_selbstständiger_arbeit__betrag_y | ||
| + aus_nichtselbstständiger_arbeit__betrag_y | ||
| + aus_vermietung_und_verpachtung__betrag_y | ||
| + sonstige__betrag_y | ||
| ) | ||
| return out | ||
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
40 changes: 40 additions & 0 deletions
40
src/_gettsim/einkommensteuer/einkünfte/sonstige/sonstige.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,40 @@ | ||
| """Sonstige Einkünfte according to § 22 EStG.""" | ||
|
|
||
| from ttsim import piecewise_polynomial, policy_function | ||
|
|
||
|
|
||
| @policy_function() | ||
| def betrag_m( | ||
| ohne_renten_m: float, | ||
| renteneinkünfte_m: float, | ||
| ) -> float: | ||
| """Total sonstige Einkünfte.""" | ||
| return ohne_renten_m + renteneinkünfte_m | ||
|
|
||
|
|
||
| @policy_function() | ||
| def renteneinkünfte_m( | ||
| rente_ertragsanteil: float, | ||
| sozialversicherung__rente__altersrente__betrag_m: float, | ||
| sozialversicherung__rente__private_rente_betrag_m: float, | ||
| ) -> float: | ||
| """Pension income counting towards taxable income.""" | ||
| return rente_ertragsanteil * ( | ||
| sozialversicherung__rente__altersrente__betrag_m | ||
| + sozialversicherung__rente__private_rente_betrag_m | ||
| ) | ||
|
|
||
|
|
||
| @policy_function() | ||
| def rente_ertragsanteil( | ||
| sozialversicherung__rente__jahr_renteneintritt: int, eink_st_params: dict | ||
| ) -> float: | ||
| """Share of pensions subject to income taxation.""" | ||
| return piecewise_polynomial( | ||
| x=sozialversicherung__rente__jahr_renteneintritt, | ||
| thresholds=eink_st_params["rente_ertragsanteil"]["thresholds"], | ||
| rates=eink_st_params["rente_ertragsanteil"]["rates"], | ||
| intercepts_at_lower_thresholds=eink_st_params["rente_ertragsanteil"][ | ||
| "intercepts_at_lower_thresholds" | ||
| ], | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
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.