Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leximpact-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur dotations aux communes
leximpact-server
Commits
5be57cbe
Commit
5be57cbe
authored
Sep 26, 2022
by
benoit-cty
Browse files
Options
Downloads
Patches
Plain Diff
fix test
parent
af0c4b43
No related branches found
No related tags found
1 merge request
!77
PLF 2023
Pipeline
#6250
passed
Sep 26, 2022
Stage: init
Stage: check
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Simulation_engine/reforms.py
+8
-8
8 additions, 8 deletions
Simulation_engine/reforms.py
with
8 additions
and
8 deletions
Simulation_engine/reforms.py
+
8
−
8
View file @
5be57cbe
...
...
@@ -93,17 +93,17 @@ def bareme(reform: T) -> T:
def
decote
(
reform
:
T
)
->
T
:
logger
.
debug
(
"
decote
"
)
logger
.
debug
(
reform
.
payload
)
#
logger.debug("decote")
#
logger.debug(reform.payload)
if
reform
.
payload
.
get
(
"
bareme
"
):
logger
.
debug
(
reform
.
payload
)
#
logger.debug(reform.payload)
raise
Exception
(
"
bareme n
'
est plus supporté, il faut bareme_ir_depuis_1945
"
)
plaf_qf
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
).
get
(
"
plaf_qf
"
)
plaf_qf
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
,
{}
).
get
(
"
plaf_qf
"
,
{}
)
seuil_couple
=
plaf_qf
.
get
(
"
decote
"
,
{}).
get
(
"
seuil_couple
"
)
seuil_celib
=
plaf_qf
.
get
(
"
decote
"
,
{}).
get
(
"
seuil_celib
"
)
taux
=
plaf_qf
.
get
(
"
decote
"
,
{}).
get
(
"
taux
"
)
node
=
reform
.
parameters
.
impot_revenu
.
calcul_impot_revenu
.
plaf_qf
.
decote
logger
.
debug
(
f
"
seuil_couple=
{
seuil_couple
}
"
)
#
logger.debug(f"seuil_couple={seuil_couple}")
if
seuil_couple
is
not
None
:
node
.
seuil_couple
.
update
(
period
=
reform
.
period
,
value
=
float
(
seuil_couple
))
...
...
@@ -126,7 +126,7 @@ def abattements_rni(reform: T) -> T:
def
plaf_qf
(
reform
:
T
)
->
T
:
payload
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
).
get
(
"
plaf_qf
"
,
{})
payload
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
,
{}
).
get
(
"
plaf_qf
"
,
{})
node
=
reform
.
parameters
.
impot_revenu
.
calcul_impot_revenu
.
plaf_qf
keys
=
[
"
general
"
,
...
...
@@ -140,7 +140,7 @@ def plaf_qf(reform: T) -> T:
def
abat_dom
(
reform
:
T
)
->
T
:
plaf_qf
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
).
get
(
"
plaf_qf
"
,
{})
plaf_qf
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
,
{}
).
get
(
"
plaf_qf
"
,
{})
payload
=
plaf_qf
.
get
(
"
abat_dom
"
,
{})
node
=
reform
.
parameters
.
impot_revenu
.
calcul_impot_revenu
.
plaf_qf
.
abat_dom
keys
=
[
"
taux_GuadMarReu
"
,
"
plaf_GuadMarReu
"
,
"
taux_GuyMay
"
,
"
plaf_GuyMay
"
]
...
...
@@ -150,7 +150,7 @@ def abat_dom(reform: T) -> T:
def
reduction_ss_condition_revenus
(
reform
:
T
)
->
T
:
plaf_qf
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
).
get
(
"
plaf_qf
"
,
{})
plaf_qf
=
reform
.
payload
.
get
(
"
calcul_impot_revenu
"
,
{}
).
get
(
"
plaf_qf
"
,
{})
payload
=
plaf_qf
.
get
(
"
reduction_ss_condition_revenus
"
,
{})
node
=
reform
.
parameters
.
impot_revenu
.
calcul_impot_revenu
.
plaf_qf
.
reduction_ss_condition_revenus
keys
=
[
"
seuil_maj_enf
"
,
"
seuil1
"
,
"
seuil2
"
,
"
taux
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment