Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ CATALA_SRC=$(shell find . -path ./_build -prune -o -type f -name '*.catala_*' -p

check-format: $(addsuffix .format,$(CATALA_SRC))

%.catala_pl.fix-format: %.catala_pl
@catala-format -i $<
%.catala_en.fix-format: %.catala_en
@catala-format -i $<
%.catala_fr.fix-format: %.catala_fr
@catala-format -i $<

fix-format: $(addsuffix .fix-format,$(CATALA_SRC))

.FORCE:

.PHONY: all pass_all_tests reset_all_tests check-format
Expand Down
4 changes: 2 additions & 2 deletions aides_logement/arrete_2019-09-27.catala_fr
Original file line number Diff line number Diff line change
Expand Up @@ -3706,7 +3706,7 @@ sous condition date_courante > |2019-10-01|:
-- haut: LimiteTranche.Infini
-- bas: 6 331,29€
-- taux: 48%
}
};
]
```

Expand Down Expand Up @@ -3754,7 +3754,7 @@ sous condition date_courante > |2019-10-01|:
-- haut: LimiteTranche.Infini
-- bas: 4095,05€
-- taux: 32,80%
}
};
]
```

Expand Down
86 changes: 44 additions & 42 deletions aides_logement/code_construction_reglementaire.catala_fr
Original file line number Diff line number Diff line change
Expand Up @@ -4201,26 +4201,27 @@ champ d'application CalculÉquivalenceLoyerMinimale:
(
(
(
Décimal.somme de (
transforme chaque tranche parmi tranches_revenus_d832_26_multipliées en
(
si ressources_ménage_arrondies <= tranche.bas alors 0,0
sinon
selon tranche.haut sous forme
-- LimiteTrancheDécimal.Revenu contenu tranche_haut :
(
si ressources_ménage_arrondies >= tranche_haut alors
(tranche_haut - tranche.bas)
* tranche.taux
sinon
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
-- LimiteTrancheDécimal.Infini :
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
)
Décimal.somme de
(
transforme chaque tranche parmi tranches_revenus_d832_26_multipliées en
(
si ressources_ménage_arrondies <= tranche.bas alors 0,0
sinon
selon tranche.haut sous forme
-- LimiteTrancheDécimal.Revenu contenu tranche_haut :
(
si ressources_ménage_arrondies >= tranche_haut alors
(tranche_haut - tranche.bas)
* tranche.taux
sinon
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
-- LimiteTrancheDécimal.Infini :
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
)
)
+ décimal de montant_forfaitaire_d832_26
* n_nombre_parts_d832_25
Expand Down Expand Up @@ -4251,28 +4252,29 @@ champ d'application CalculÉquivalenceLoyerMinimale:
(
(
(
Décimal.somme de (
transforme chaque tranche parmi tranches_revenus_d832_26_multipliées en
(
si ressources_ménage_arrondies <= tranche.bas alors 0,0
sinon
(
selon tranche.haut sous forme
-- LimiteTrancheDécimal.Revenu contenu tranche_haut :
(
si ressources_ménage_arrondies >= tranche_haut alors
(tranche_haut - tranche.bas)
* tranche.taux
sinon
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
-- LimiteTrancheDécimal.Infini :
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
)
)
Décimal.somme de
(
transforme chaque tranche parmi tranches_revenus_d832_26_multipliées en
(
si ressources_ménage_arrondies <= tranche.bas alors 0,0
sinon
(
selon tranche.haut sous forme
-- LimiteTrancheDécimal.Revenu contenu tranche_haut :
(
si ressources_ménage_arrondies >= tranche_haut alors
(tranche_haut - tranche.bas)
* tranche.taux
sinon
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
-- LimiteTrancheDécimal.Infini :
(ressources_ménage_arrondies - tranche.bas)
* tranche.taux
)
)
)
)
+ décimal de montant_forfaitaire_d832_26
)
Expand Down
10 changes: 5 additions & 5 deletions aides_logement/tests/tests_calculette_globale.catala_fr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ champ d'application Exemple1:
[
AL.PrestationReçue.AllocationSoutienEnfantHandicapé;
AL.PrestationReçue.ComplémentFamilial;
AL.PrestationReçue.AllocationsFamiliales
AL.PrestationReçue.AllocationsFamiliales;
]
-- situation_familiale: Mariés contenu |2010-11-26|
-- personnes_à_charge:
Expand Down Expand Up @@ -62,7 +62,7 @@ champ d'application Exemple1:
-- obligation_scolaire: Pendant
-- situation_garde_alternée: PasDeGardeAlternée
}
)
);
]
-- logement:
AL.Logement {
Expand Down Expand Up @@ -150,7 +150,7 @@ champ d'application Exemple2:
-- obligation_scolaire: Pendant
-- situation_garde_alternée: PasDeGardeAlternée
}
)
);
]
-- logement:
AL.Logement {
Expand Down Expand Up @@ -195,15 +195,15 @@ champ d'application Exemple2:
```catala-test-cli
$ catala test-scope Exemple1
┌─[RESULT]─ Exemple1 ─
│ montant_versé = 246,23 €
│ éligibilité = vrai
│ montant_versé = 246,23 €
└─
```

```catala-test-cli
$ catala test-scope Exemple2
┌─[RESULT]─ Exemple2 ─
│ montant_versé = 230,63 €
│ éligibilité = vrai
│ montant_versé = 230,63 €
└─
```
8 changes: 4 additions & 4 deletions aides_logement/tests/tests_eligibilite_apl.catala_fr
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ champ d'application Exemple1:
[
AL.PrestationReçue.AllocationSoutienEnfantHandicapé;
AL.PrestationReçue.ComplémentFamilial;
AL.PrestationReçue.AllocationsFamiliales
AL.PrestationReçue.AllocationsFamiliales;
]
-- situation_familiale: Mariés contenu |2010-11-26|
-- personnes_à_charge:
Expand Down Expand Up @@ -61,7 +61,7 @@ champ d'application Exemple1:
-- obligation_scolaire: Pendant
-- situation_garde_alternée: PasDeGardeAlternée
}
)
);
]
-- logement:
AL.Logement {
Expand Down Expand Up @@ -146,7 +146,7 @@ champ d'application Exemple2:
-- obligation_scolaire: Pendant
-- situation_garde_alternée: PasDeGardeAlternée
}
)
);
]
-- logement:
AL.Logement {
Expand Down Expand Up @@ -220,7 +220,7 @@ champ d'application Exemple3:
-- obligation_scolaire: Pendant
-- situation_garde_alternée: PasDeGardeAlternée
}
)
);
]
-- logement:
AL.Logement {
Expand Down
2 changes: 1 addition & 1 deletion allocations_familiales/epilogue.catala_fr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ la fonction du bloc de code ci-dessous.
champ d'application EnfantLePlusÂgé:
définition le_plus_âgé égal à
contenu de potentiel_plus_âgé parmi enfants
tel que potentiel_plus_âgé.date_de_naissance est minimum
tel que potentiel_plus_âgé.date_de_naissance est minimum
ou si liste vide alors Enfant {
-- identifiant: -1
-- obligation_scolaire: Pendant
Expand Down
21 changes: 11 additions & 10 deletions allocations_familiales/securite_sociale_R.catala_fr
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,17 @@ du nombre d'enfants à charge dans les conditions suivantes :
```catala
champ d'application AllocationsFamiliales:
définition nombre_moyen_enfants égal à
Décimal.somme de (
transforme chaque enfant parmi enfants_à_charge_droit_ouvert_prestation_familiale en
selon (prise_en_compte de enfant) sous forme
-- Complète : 1,0
-- Partagée : 0,5
# Pas directement dans cet article de loi, mais concerne le
# cas où l'enfant est pris en charge par les services sociaux et
# la part de l'allocation va également au service social
-- Zéro : 0,0
)
Décimal.somme de
(
transforme chaque enfant parmi enfants_à_charge_droit_ouvert_prestation_familiale en
selon (prise_en_compte de enfant) sous forme
-- Complète : 1,0
-- Partagée : 0,5
# Pas directement dans cet article de loi, mais concerne le
# cas où l'enfant est pris en charge par les services sociaux et
# la part de l'allocation va également au service social
-- Zéro : 0,0
)
```

Le nombre total d'enfants, pour chaque foyer, est obtenu en faisant la somme du
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ champ d'application Test6:
-- d_prise_en_charge: EffectiveEtPermanente
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 78 830 €
définition f.i_date_courante égal à |2020-05-01|
Expand Down Expand Up @@ -191,7 +191,7 @@ champ d'application Test8:
-- d_prise_en_charge: EffectiveEtPermanente
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 69945 €
définition f.i_date_courante égal à |2021-01-01|
Expand Down Expand Up @@ -221,7 +221,7 @@ champ d'application Test9:
-- d_prise_en_charge: ServicesSociauxAllocationVerséeAuxServicesSociaux
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 75786 €
définition f.i_date_courante égal à |2020-05-01|
Expand Down Expand Up @@ -251,7 +251,7 @@ champ d'application Test10:
-- d_prise_en_charge: GardeAlternéePartageAllocations
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 30000 €
définition f.i_date_courante égal à |2020-04-20|
Expand Down Expand Up @@ -289,7 +289,7 @@ champ d'application Test11:
-- d_prise_en_charge: EffectiveEtPermanente
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 30000 €
définition f.i_date_courante égal à |2021-12-31|
Expand Down Expand Up @@ -335,7 +335,7 @@ champ d'application Test12:
-- d_prise_en_charge: EffectiveEtPermanente
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 20000 €
définition f.i_date_courante égal à |2019-08-26|
Expand All @@ -358,7 +358,7 @@ champ d'application Test13:
-- d_prise_en_charge: EffectiveEtPermanente
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 65000 €
définition f.i_date_courante égal à |2019-08-26|
Expand Down Expand Up @@ -388,7 +388,7 @@ champ d'application Test14:
-- d_prise_en_charge: GardeAlternéeAllocataireUnique
-- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai
-- d_bénéficie_titre_personnel_aide_personnelle_logement: faux
}
};
]
définition f.i_ressources_ménage égal à 64033 €
définition f.i_date_courante égal à |2022-05-01|
Expand Down
Loading
Loading