Skip to content

Commit

Permalink
Corrige l'utilisation de contrat_de_travail_duree
Browse files Browse the repository at this point in the history
  • Loading branch information
frtomas committed Jul 11, 2023
1 parent e7ed6d5 commit 525f833
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions openfisca_france_local/departements/eure_et_loir/adefip.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def formula(individu, period, parameters):
params_adefip = parameters(period).departements.eure_et_loir.adefip
duree_activite = individu('duree_contrat_ou_formation', period)

contrat_de_travail_duree = individu('contrat_de_travail_duree', period)
TypesContratDeTravailDuree = contrat_de_travail_duree.possible_values
contrat_de_travail_type = individu('contrat_de_travail_type', period)
TypesContratDeTravailDuree = contrat_de_travail_type.possible_values

# cas formation
formation = individu('formation', period)
Expand All @@ -41,10 +41,10 @@ def formula(individu, period, parameters):
# cas CDD
condition_duree_cdd = duree_activite >= params_adefip.durees.duree_minimum_cdd_palier1
condition_cdd = not_(condition_formation) * (
contrat_de_travail_duree == TypesContratDeTravailDuree.cdd) * condition_duree_cdd
contrat_de_travail_type == TypesContratDeTravailDuree.cdd) * condition_duree_cdd

# cas CDI
condition_cdi = not_(condition_formation) * (contrat_de_travail_duree == TypesContratDeTravailDuree.cdi)
condition_cdi = not_(condition_formation) * (contrat_de_travail_type == TypesContratDeTravailDuree.cdi)

return condition_formation + condition_cdd + condition_cdi

Expand Down Expand Up @@ -91,8 +91,8 @@ def formula(individu, period, parameters):
contrat_de_travail = individu('contrat_de_travail', period)
TypesContratDeTravail = contrat_de_travail.possible_values

contrat_de_travail_duree = individu('contrat_de_travail_duree', period)
TypesContratDeTravailDuree = contrat_de_travail_duree.possible_values
contrat_de_travail_type = individu('contrat_de_travail_type', period)
TypesContratDeTravailDuree = contrat_de_travail_type.possible_values

# cas formation
formation = individu('formation', period)
Expand All @@ -105,7 +105,7 @@ def formula(individu, period, parameters):
montant_creation_reprise_entreprise = condition_entreprise * params_adefip.montants.montant_creation_reprise_entreprise

# cas CDD palier 1 (entre 3 et 6 mois)
est_en_cdd = contrat_de_travail_duree == TypesContratDeTravailDuree.cdd
est_en_cdd = contrat_de_travail_type == TypesContratDeTravailDuree.cdd
condition_duree_cdd_palier_1_min = (duree_activite >= params_adefip.durees.duree_minimum_cdd_palier1)
condition_duree_cdd_palier_1_max = (duree_activite <= params_adefip.durees.duree_minimum_cdd_palier2)
condition_cdd_palier_1 = est_en_cdd * condition_duree_cdd_palier_1_min * condition_duree_cdd_palier_1_max
Expand All @@ -120,7 +120,7 @@ def formula(individu, period, parameters):
condition_entreprise)

# cas CDI temps plein
est_en_cdi = contrat_de_travail_duree == TypesContratDeTravailDuree.cdi
est_en_cdi = contrat_de_travail_type == TypesContratDeTravailDuree.cdi
est_a_temps_plein = contrat_de_travail == TypesContratDeTravail.temps_plein
condition_cdi_temps_plein = est_en_cdi * est_a_temps_plein
montant_cdi_temps_plein = condition_cdi_temps_plein * params_adefip.montants.montant_cdi_temps_plein
Expand Down

0 comments on commit 525f833

Please sign in to comment.