mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
Pair programming session on allocations familiales
This commit is contained in:
parent
ceed5c06a2
commit
c660720d18
1
Makefile
1
Makefile
@ -167,6 +167,7 @@ $(FRENCH_LAW_LIB_DIR)/law_source/unit_tests/tests_allocations_familiales.ml:
|
||||
cp -f $(ALLOCATIONS_FAMILIALES_DIR)/tests/tests_allocations_familiales.ml \
|
||||
$(FRENCH_LAW_LIB_DIR)/law_source/unit_tests/
|
||||
|
||||
#> generate_french_law_library : Generates the French law library OCaml sources from Catala
|
||||
generate_french_law_library:\
|
||||
$(FRENCH_LAW_LIB_DIR)/law_source/allocations_familiales.ml \
|
||||
$(FRENCH_LAW_LIB_DIR)/law_source/unit_tests/tests_allocations_familiales.ml
|
||||
|
@ -79,7 +79,7 @@ champ d'application PrestationsFamiliales:
|
||||
définition smic.date_courante égal à date_courante
|
||||
|
||||
déclaration champ d'application AllocationFamilialesAvril2008:
|
||||
contexte âge_minimum_alinéa_1_l521_3 contenu entier
|
||||
contexte âge_minimum_alinéa_1_l521_3_métropole contenu entier
|
||||
|
||||
déclaration champ d'application EnfantLePlusÂgé:
|
||||
contexte enfants contenu collection Enfant
|
||||
@ -142,6 +142,8 @@ déclaration champ d'application AllocationsFamiliales:
|
||||
# Plafonds, âges limites et autres constantes
|
||||
contexte nombre_enfants_l521_1 contenu entier
|
||||
contexte âge_minimum_alinéa_1_l521_3 contenu entier dépend de Enfant
|
||||
contexte âge_minimum_alinéa_1_l521_3_métropole contenu entier dépend de Enfant
|
||||
contexte âge_minimum_alinéa_1_l521_3_outre_mer contenu entier dépend de Enfant
|
||||
contexte nombre_enfants_alinéa_2_l521_3 contenu entier
|
||||
contexte est_enfant_le_plus_âgé contenu booléen dépend de Enfant
|
||||
contexte plafond_I_d521_3 contenu argent
|
||||
|
@ -25,25 +25,18 @@ inférieur ou égal au plafond défini au I de l'article D. 521-3, les taux
|
||||
servant au calcul des allocations familiales sont fixés, en pourcentage
|
||||
de la base mensuelle prévue à l'article L. 551-1, à :
|
||||
a) 32 % pour le deuxième enfant à charge ;
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_base_deuxième_enfant sous condition
|
||||
ressources_ménage <=€ plafond_I_d521_3
|
||||
conséquence égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2
|
||||
alors prestations_familiales.base_mensuelle *€ 32 %
|
||||
sinon 0 €
|
||||
```
|
||||
|
||||
b) 41 % pour le troisième enfant à charge et chacun des suivants.
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_base_troisième_enfant_et_plus
|
||||
sous condition
|
||||
ressources_ménage <=€ plafond_I_d521_3
|
||||
conséquence égal à
|
||||
champ d'application AllocationsFamiliales sous condition
|
||||
ressources_ménage <=€ plafond_I_d521_3:
|
||||
|
||||
définition montant_initial_base_deuxième_enfant égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2
|
||||
alors prestations_familiales.base_mensuelle *€ 32 %
|
||||
sinon 0 €
|
||||
|
||||
définition montant_initial_base_troisième_enfant_et_plus égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 3
|
||||
alors (prestations_familiales.base_mensuelle *€ 41 %) *€ (
|
||||
entier_vers_décimal de
|
||||
@ -55,14 +48,14 @@ La majoration pour âge est fixée à 16 % de la base mensuelle de calcul des
|
||||
prestations familiales ;
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_majoration de enfant
|
||||
sous condition
|
||||
(droit_ouvert_majoration de enfant) et
|
||||
(ressources_ménage <=€ plafond_I_d521_3) et
|
||||
(nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2)
|
||||
conséquence égal à
|
||||
prestations_familiales.base_mensuelle *€ 16 %
|
||||
champ d'application AllocationsFamiliales sous condition
|
||||
ressources_ménage <=€ plafond_I_d521_3:
|
||||
|
||||
définition montant_initial_majoration de enfant
|
||||
sous condition
|
||||
droit_ouvert_majoration de enfant
|
||||
conséquence égal à
|
||||
prestations_familiales.base_mensuelle *€ 16 %
|
||||
```
|
||||
|
||||
2° Lorsque le ménage ou la personne a disposé d'un montant de ressources
|
||||
@ -71,27 +64,19 @@ supérieur au plafond défini au I de l'article D. 521-3 et inférieur ou égal
|
||||
allocations familiales sont fixés, en pourcentage de la base mensuelle
|
||||
prévue à l'article L. 551-1, à :
|
||||
a) 16 % pour le deuxième enfant à charge ;
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_base_deuxième_enfant sous condition
|
||||
(ressources_ménage >€ plafond_I_d521_3) et
|
||||
(ressources_ménage <=€ plafond_II_d521_3)
|
||||
conséquence égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2
|
||||
alors prestations_familiales.base_mensuelle *€ 16 %
|
||||
sinon 0 €
|
||||
```
|
||||
|
||||
b) 20,5 % pour le troisième enfant à charge et chacun des suivants.
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_base_troisième_enfant_et_plus
|
||||
sous condition
|
||||
(ressources_ménage >€ plafond_I_d521_3) et
|
||||
(ressources_ménage <=€ plafond_II_d521_3)
|
||||
conséquence égal à
|
||||
champ d'application AllocationsFamiliales sous condition
|
||||
(ressources_ménage >€ plafond_I_d521_3) et
|
||||
(ressources_ménage <=€ plafond_II_d521_3):
|
||||
|
||||
définition montant_initial_base_deuxième_enfant égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2
|
||||
alors prestations_familiales.base_mensuelle *€ 16 %
|
||||
sinon 0 €
|
||||
|
||||
définition montant_initial_base_troisième_enfant_et_plus égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 3
|
||||
alors (prestations_familiales.base_mensuelle *€ 20,5 %) *€ (
|
||||
entier_vers_décimal de
|
||||
@ -103,14 +88,14 @@ La majoration pour âge est fixée à 8 % de la base mensuelle de calcul des
|
||||
prestations familiales ;
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_majoration de enfant sous condition
|
||||
(droit_ouvert_majoration de enfant) et
|
||||
(ressources_ménage >€ plafond_I_d521_3) et
|
||||
(ressources_ménage <=€ plafond_II_d521_3) et
|
||||
(nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2)
|
||||
conséquence égal à
|
||||
prestations_familiales.base_mensuelle *€ 8 %
|
||||
champ d'application AllocationsFamiliales sous condition
|
||||
(ressources_ménage >€ plafond_I_d521_3) et
|
||||
(ressources_ménage <=€ plafond_II_d521_3):
|
||||
|
||||
définition montant_initial_majoration de enfant sous condition
|
||||
droit_ouvert_majoration de enfant
|
||||
conséquence égal à
|
||||
prestations_familiales.base_mensuelle *€ 8 %
|
||||
```
|
||||
|
||||
3° Lorsque le ménage ou la personne a disposé d'un montant de ressources
|
||||
@ -118,25 +103,17 @@ supérieur au plafond défini au II de l'article D. 521-3, les taux servant
|
||||
au calcul des allocations familiales sont fixés, en pourcentage de la base
|
||||
mensuelle prévue à l'article L. 551-1, à :
|
||||
a) 8 % pour le deuxième enfant à charge ;
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_base_deuxième_enfant sous condition
|
||||
(ressources_ménage >€ plafond_II_d521_3)
|
||||
conséquence égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2
|
||||
alors prestations_familiales.base_mensuelle *€ 8 %
|
||||
sinon 0 €
|
||||
```
|
||||
|
||||
b) 10,25 % pour le troisième enfant à charge et chacun des suivants.
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_base_troisième_enfant_et_plus
|
||||
sous condition
|
||||
(ressources_ménage >€ plafond_II_d521_3)
|
||||
conséquence égal à
|
||||
champ d'application AllocationsFamiliales sous condition
|
||||
ressources_ménage >€ plafond_II_d521_3:
|
||||
définition montant_initial_base_deuxième_enfant égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2
|
||||
alors prestations_familiales.base_mensuelle *€ 8 %
|
||||
sinon 0 €
|
||||
|
||||
définition montant_initial_base_troisième_enfant_et_plus égal à
|
||||
si nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 3
|
||||
alors (prestations_familiales.base_mensuelle *€ 10,25 %) *€ (
|
||||
entier_vers_décimal de
|
||||
@ -148,13 +125,13 @@ La majoration pour âge est fixée à 4 % de la base mensuelle de calcul des
|
||||
prestations familiales.
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
définition montant_initial_majoration de enfant sous condition
|
||||
(droit_ouvert_majoration de enfant) et
|
||||
(ressources_ménage >€ plafond_II_d521_3) et
|
||||
(nombre de enfants_à_charge_droit_ouvert_prestation_familiale >= 2)
|
||||
conséquence égal à
|
||||
prestations_familiales.base_mensuelle *€ 4 %
|
||||
champ d'application AllocationsFamiliales sous condition
|
||||
ressources_ménage >€ plafond_II_d521_3:
|
||||
|
||||
définition montant_initial_majoration de enfant sous condition
|
||||
droit_ouvert_majoration de enfant
|
||||
conséquence égal à
|
||||
prestations_familiales.base_mensuelle *€ 4 %
|
||||
```
|
||||
|
||||
II.-En application du sixième alinéa de l'article L. 521-1, le montant
|
||||
@ -369,10 +346,13 @@ partir de onze ans et à 5,67 p. 100 à partir de seize ans.
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
exception decret_2008_âge_minimum_alinéa_1_l521_3
|
||||
|
||||
définition âge_minimum_alinéa_1_l521_3_outre_mer de enfant égal à 11
|
||||
|
||||
exception
|
||||
définition âge_minimum_alinéa_1_l521_3 de enfant
|
||||
sous condition prestations_familiales.régime_outre_mer_l751_1
|
||||
conséquence égal à 11
|
||||
conséquence égal à âge_minimum_alinéa_1_l521_3_outre_mer de enfant
|
||||
|
||||
définition
|
||||
montant_initial_majoration de enfant
|
||||
|
@ -13,6 +13,10 @@ ans sous réserve que leur rémunération n'excède pas le plafond fixé au deux
|
||||
alinéa du présent article.
|
||||
|
||||
```catala
|
||||
# Attention: ici la condition de ressources au dessous du plafond est une répétition
|
||||
# par rapport au texte de L512-3. On ne remet donc pas le code ici correspondant
|
||||
# à cette limitation.
|
||||
|
||||
champ d'application PrestationsFamiliales :
|
||||
définition âge_l512_3_2 égal à 20
|
||||
```
|
||||
@ -34,7 +38,8 @@ législation sur les assurances sociales.
|
||||
|
||||
|
||||
```catala
|
||||
# Le programme ne tient pas en compte des avantages en nature
|
||||
# Le programme Catala ne tient pas en compte des avantages en nature.
|
||||
# TODO: Liane, faire de la recherche juridique sur le sujet.
|
||||
```
|
||||
|
||||
##### Titre 2 : Prestations générales d'entretien
|
||||
@ -48,8 +53,10 @@ enfants ouvrent droit à la majoration des allocations familiales est fixé à
|
||||
|
||||
```catala
|
||||
champ d'application AllocationsFamiliales :
|
||||
étiquette cas_base_âge_minimum_alinéa_1_l521_3
|
||||
définition âge_minimum_alinéa_1_l521_3 de enfant égal à 14
|
||||
définition âge_minimum_alinéa_1_l521_3_métropole de enfant égal à 14
|
||||
|
||||
définition âge_minimum_alinéa_1_l521_3 de enfant égal à
|
||||
âge_minimum_alinéa_1_l521_3_métropole de enfant
|
||||
```
|
||||
|
||||
Le nombre minimum d'enfants à charge, mentionné au deuxième alinéa de l'article
|
||||
@ -71,15 +78,14 @@ le onzième anniversaire est postérieur au 30 avril 2008.
|
||||
# du décret de 2008 pour des raisons de place seulement.
|
||||
champ d'application AllocationFamilialesAvril2008:
|
||||
# Âge limite avant décret n° 2008-409 du 28 avril 2008
|
||||
définition âge_minimum_alinéa_1_l521_3 égal à 16
|
||||
définition âge_minimum_alinéa_1_l521_3_métropole égal à 16
|
||||
|
||||
champ d'application AllocationsFamiliales :
|
||||
étiquette decret_2008_âge_minimum_alinéa_1_l521_3
|
||||
exception cas_base_âge_minimum_alinéa_1_l521_3
|
||||
définition âge_minimum_alinéa_1_l521_3 de enfant
|
||||
exception
|
||||
définition âge_minimum_alinéa_1_l521_3_métropole de enfant
|
||||
sous condition (enfant.date_de_naissance +@ 11 an <=@ |2008-04-30|)
|
||||
conséquence égal à
|
||||
version_avril_2008.âge_minimum_alinéa_1_l521_3
|
||||
version_avril_2008.âge_minimum_alinéa_1_l521_3_métropole
|
||||
```
|
||||
|
||||
#### [Article R521-2|LEGIARTI000006750608]
|
||||
@ -96,7 +102,7 @@ une demande conjointe de partage.
|
||||
|
||||
```catala
|
||||
# Le fait que l'allocataire dans le cas d'un commun accord soit celui des
|
||||
# deux parents désigné par l'accord est déjà modélisé dans L512-2.
|
||||
# deux parents désigné par l'accord est déjà modélisé dans L521-2.
|
||||
```
|
||||
|
||||
Lorsque les parents ont désigné un allocataire unique ou fait une demande
|
||||
@ -143,7 +149,7 @@ champ d'application AllocationsFamiliales :
|
||||
selon (prise_en_compte de enfant) sous forme
|
||||
-- Complète : 1,0
|
||||
-- Partagée : 0,5
|
||||
# Pas directement dans cet arricle de loi, mais concerne le
|
||||
# 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
|
||||
@ -168,8 +174,11 @@ nombre d'enfants à charge est évalué dans les conditions prévues au premier
|
||||
alinéa de l'article R. 521-3.
|
||||
|
||||
```catala
|
||||
# enfants_à_charge ne contient que des enfants à charge donc rien à formaliser
|
||||
# ici
|
||||
# Le renvoi ci-dessus ne fait qu'annoncer qu'on va appliquer un système
|
||||
# de décote pour garde alternée au système de majorations.
|
||||
# Ce renvoi signifie que notre liste enfants_à_charge_droit_ouvert_prestation_familiale
|
||||
# qui était utilisée pour la prestation de base est la même que la liste
|
||||
# d'enfant utilisée pour le calcul des majorations
|
||||
```
|
||||
|
||||
Lorsque le ou les enfants ouvrant droit à ladite majoration sont en résidence
|
||||
|
File diff suppressed because one or more lines are too long
@ -88,9 +88,11 @@ type prestations_familiales_in = {
|
||||
base_mensuelle_in : unit -> money;
|
||||
}
|
||||
|
||||
type allocation_familiales_avril2008_out = { age_minimum_alinea_1_l521_3_out : integer }
|
||||
type allocation_familiales_avril2008_out = { age_minimum_alinea_1_l521_3_metropole_out : integer }
|
||||
|
||||
type allocation_familiales_avril2008_in = { age_minimum_alinea_1_l521_3_in : unit -> integer }
|
||||
type allocation_familiales_avril2008_in = {
|
||||
age_minimum_alinea_1_l521_3_metropole_in : unit -> integer;
|
||||
}
|
||||
|
||||
type enfant_le_plus_age_out = { enfants_out : enfant array; le_plus_age_out : enfant }
|
||||
|
||||
@ -130,6 +132,8 @@ type allocations_familiales_out = {
|
||||
complement_degressif_out : money -> money;
|
||||
nombre_enfants_l521_1_out : integer;
|
||||
age_minimum_alinea_1_l521_3_out : enfant -> integer;
|
||||
age_minimum_alinea_1_l521_3_metropole_out : enfant -> integer;
|
||||
age_minimum_alinea_1_l521_3_outre_mer_out : enfant -> integer;
|
||||
nombre_enfants_alinea_2_l521_3_out : integer;
|
||||
est_enfant_le_plus_age_out : enfant -> bool;
|
||||
plafond_I_d521_3_out : money;
|
||||
@ -170,6 +174,8 @@ type allocations_familiales_in = {
|
||||
complement_degressif_in : unit -> money -> money;
|
||||
nombre_enfants_l521_1_in : unit -> integer;
|
||||
age_minimum_alinea_1_l521_3_in : unit -> enfant -> integer;
|
||||
age_minimum_alinea_1_l521_3_metropole_in : unit -> enfant -> integer;
|
||||
age_minimum_alinea_1_l521_3_outre_mer_in : unit -> enfant -> integer;
|
||||
nombre_enfants_alinea_2_l521_3_in : unit -> integer;
|
||||
est_enfant_le_plus_age_in : unit -> enfant -> bool;
|
||||
plafond_I_d521_3_in : unit -> money;
|
||||
@ -295,13 +301,13 @@ let smic (smic_in : smic_in) =
|
||||
|
||||
let allocation_familiales_avril2008
|
||||
(allocation_familiales_avril2008_in : allocation_familiales_avril2008_in) =
|
||||
let age_minimum_alinea_1_l521_3_ : unit -> integer =
|
||||
allocation_familiales_avril2008_in.age_minimum_alinea_1_l521_3_in
|
||||
let age_minimum_alinea_1_l521_3_metropole_ : unit -> integer =
|
||||
allocation_familiales_avril2008_in.age_minimum_alinea_1_l521_3_metropole_in
|
||||
in
|
||||
let age_minimum_alinea_1_l521_3_ : integer =
|
||||
let age_minimum_alinea_1_l521_3_metropole_ : integer =
|
||||
try
|
||||
handle_default
|
||||
[| (fun (_ : _) -> age_minimum_alinea_1_l521_3_ ()) |]
|
||||
[| (fun (_ : _) -> age_minimum_alinea_1_l521_3_metropole_ ()) |]
|
||||
(fun (_ : _) -> true)
|
||||
(fun (_ : _) ->
|
||||
handle_default
|
||||
@ -313,7 +319,7 @@ let allocation_familiales_avril2008
|
||||
(fun (_ : _) -> raise EmptyError))
|
||||
with EmptyError -> raise NoValueProvided
|
||||
in
|
||||
{ age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_ }
|
||||
{ age_minimum_alinea_1_l521_3_metropole_out = age_minimum_alinea_1_l521_3_metropole_ }
|
||||
|
||||
let enfant_le_plus_age (enfant_le_plus_age_in : enfant_le_plus_age_in) =
|
||||
let enfants_ : unit -> enfant array = enfant_le_plus_age_in.enfants_in in
|
||||
@ -678,6 +684,12 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
let age_minimum_alinea_1_l521_3_ : unit -> enfant -> integer =
|
||||
allocations_familiales_in.age_minimum_alinea_1_l521_3_in
|
||||
in
|
||||
let age_minimum_alinea_1_l521_3_metropole_ : unit -> enfant -> integer =
|
||||
allocations_familiales_in.age_minimum_alinea_1_l521_3_metropole_in
|
||||
in
|
||||
let age_minimum_alinea_1_l521_3_outre_mer_ : unit -> enfant -> integer =
|
||||
allocations_familiales_in.age_minimum_alinea_1_l521_3_outre_mer_in
|
||||
in
|
||||
let nombre_enfants_alinea_2_l521_3_ : unit -> integer =
|
||||
allocations_familiales_in.nombre_enfants_alinea_2_l521_3_in
|
||||
in
|
||||
@ -883,6 +895,23 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
(fun (_ : _) -> raise EmptyError))
|
||||
with EmptyError -> raise NoValueProvided
|
||||
in
|
||||
let age_minimum_alinea_1_l521_3_outre_mer_ : enfant -> integer =
|
||||
try
|
||||
handle_default
|
||||
[| (fun (_ : _) -> age_minimum_alinea_1_l521_3_outre_mer_ ()) |]
|
||||
(fun (_ : _) -> true)
|
||||
(fun (_ : _) (param_ : enfant) ->
|
||||
try
|
||||
handle_default
|
||||
[|
|
||||
(fun (_ : _) ->
|
||||
handle_default [||] (fun (_ : _) -> true) (fun (_ : _) -> integer_of_string "11"));
|
||||
|]
|
||||
(fun (_ : _) -> false)
|
||||
(fun (_ : _) -> raise EmptyError)
|
||||
with EmptyError -> raise NoValueProvided)
|
||||
with EmptyError -> raise NoValueProvided
|
||||
in
|
||||
let nombre_enfants_alinea_2_l521_3_ : integer =
|
||||
try
|
||||
handle_default
|
||||
@ -900,10 +929,10 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
in
|
||||
let result_ : allocation_familiales_avril2008_out =
|
||||
allocation_familiales_avril2008
|
||||
{ age_minimum_alinea_1_l521_3_in = (fun (_ : unit) -> raise EmptyError) }
|
||||
{ age_minimum_alinea_1_l521_3_metropole_in = (fun (_ : unit) -> raise EmptyError) }
|
||||
in
|
||||
let version_avril_2008_dot_age_minimum_alinea_1_l521_3_ : integer =
|
||||
result_.age_minimum_alinea_1_l521_3_out
|
||||
let version_avril_2008_dot_age_minimum_alinea_1_l521_3_metropole_ : integer =
|
||||
result_.age_minimum_alinea_1_l521_3_metropole_out
|
||||
in
|
||||
let prestations_familiales_dot_date_courante_ : unit -> date =
|
||||
fun (_ : unit) ->
|
||||
@ -979,10 +1008,10 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
in
|
||||
let enfant_le_plus_age_dot_enfants_ : enfant array = result_.enfants_out in
|
||||
let enfant_le_plus_age_dot_le_plus_age_ : enfant = result_.le_plus_age_out in
|
||||
let age_minimum_alinea_1_l521_3_ : enfant -> integer =
|
||||
let age_minimum_alinea_1_l521_3_metropole_ : enfant -> integer =
|
||||
try
|
||||
handle_default
|
||||
[| (fun (_ : _) -> age_minimum_alinea_1_l521_3_ ()) |]
|
||||
[| (fun (_ : _) -> age_minimum_alinea_1_l521_3_metropole_ ()) |]
|
||||
(fun (_ : _) -> true)
|
||||
(fun (_ : _) (param_ : enfant) ->
|
||||
try
|
||||
@ -992,17 +1021,12 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
handle_default
|
||||
[|
|
||||
(fun (_ : _) ->
|
||||
handle_default
|
||||
[|
|
||||
(fun (_ : _) ->
|
||||
handle_default [||]
|
||||
(fun (_ : _) -> prestations_familiales_dot_regime_outre_mer_l751_1_)
|
||||
(fun (_ : _) -> integer_of_string "11"));
|
||||
|]
|
||||
handle_default [||]
|
||||
(fun (_ : _) ->
|
||||
param_.date_de_naissance +@ duration_of_numbers 11 0 0
|
||||
<=@ date_of_numbers 2008 4 30)
|
||||
(fun (_ : _) -> version_avril_2008_dot_age_minimum_alinea_1_l521_3_));
|
||||
(fun (_ : _) ->
|
||||
version_avril_2008_dot_age_minimum_alinea_1_l521_3_metropole_));
|
||||
|]
|
||||
(fun (_ : _) -> true)
|
||||
(fun (_ : _) -> integer_of_string "14"));
|
||||
@ -1051,6 +1075,31 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
with EmptyError -> raise NoValueProvided)
|
||||
with EmptyError -> raise NoValueProvided
|
||||
in
|
||||
let age_minimum_alinea_1_l521_3_ : enfant -> integer =
|
||||
try
|
||||
handle_default
|
||||
[| (fun (_ : _) -> age_minimum_alinea_1_l521_3_ ()) |]
|
||||
(fun (_ : _) -> true)
|
||||
(fun (_ : _) (param_ : enfant) ->
|
||||
try
|
||||
handle_default
|
||||
[|
|
||||
(fun (_ : _) ->
|
||||
handle_default
|
||||
[|
|
||||
(fun (_ : _) ->
|
||||
handle_default [||]
|
||||
(fun (_ : _) -> prestations_familiales_dot_regime_outre_mer_l751_1_)
|
||||
(fun (_ : _) -> age_minimum_alinea_1_l521_3_outre_mer_ param_));
|
||||
|]
|
||||
(fun (_ : _) -> true)
|
||||
(fun (_ : _) -> age_minimum_alinea_1_l521_3_metropole_ param_));
|
||||
|]
|
||||
(fun (_ : _) -> false)
|
||||
(fun (_ : _) -> raise EmptyError)
|
||||
with EmptyError -> raise NoValueProvided)
|
||||
with EmptyError -> raise NoValueProvided
|
||||
in
|
||||
let plafond__i_i_d521_3_ : money =
|
||||
try
|
||||
handle_default
|
||||
@ -1579,29 +1628,21 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
(fun (_ : _) ->
|
||||
handle_default [||]
|
||||
(fun (_ : _) ->
|
||||
droit_ouvert_majoration_ param_
|
||||
&& ressources_menage_ >$ plafond__i_i_d521_3_
|
||||
&& array_length enfants_a_charge_droit_ouvert_prestation_familiale_
|
||||
>=! integer_of_string "2")
|
||||
ressources_menage_ >$ plafond__i_i_d521_3_ && droit_ouvert_majoration_ param_)
|
||||
(fun (_ : _) ->
|
||||
prestations_familiales_dot_base_mensuelle_ *$ decimal_of_string "0.04"));
|
||||
(fun (_ : _) ->
|
||||
handle_default [||]
|
||||
(fun (_ : _) ->
|
||||
droit_ouvert_majoration_ param_
|
||||
&& ressources_menage_ >$ plafond__i_d521_3_
|
||||
&& ressources_menage_ <=$ plafond__i_i_d521_3_
|
||||
&& array_length enfants_a_charge_droit_ouvert_prestation_familiale_
|
||||
>=! integer_of_string "2")
|
||||
(ressources_menage_ >$ plafond__i_d521_3_
|
||||
&& ressources_menage_ <=$ plafond__i_i_d521_3_)
|
||||
&& droit_ouvert_majoration_ param_)
|
||||
(fun (_ : _) ->
|
||||
prestations_familiales_dot_base_mensuelle_ *$ decimal_of_string "0.08"));
|
||||
(fun (_ : _) ->
|
||||
handle_default [||]
|
||||
(fun (_ : _) ->
|
||||
droit_ouvert_majoration_ param_
|
||||
&& ressources_menage_ <=$ plafond__i_d521_3_
|
||||
&& array_length enfants_a_charge_droit_ouvert_prestation_familiale_
|
||||
>=! integer_of_string "2")
|
||||
ressources_menage_ <=$ plafond__i_d521_3_ && droit_ouvert_majoration_ param_)
|
||||
(fun (_ : _) ->
|
||||
prestations_familiales_dot_base_mensuelle_ *$ decimal_of_string "0.16"));
|
||||
|]
|
||||
@ -1851,6 +1892,8 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i
|
||||
complement_degressif_out = complement_degressif_;
|
||||
nombre_enfants_l521_1_out = nombre_enfants_l521_1_;
|
||||
age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_;
|
||||
age_minimum_alinea_1_l521_3_metropole_out = age_minimum_alinea_1_l521_3_metropole_;
|
||||
age_minimum_alinea_1_l521_3_outre_mer_out = age_minimum_alinea_1_l521_3_outre_mer_;
|
||||
nombre_enfants_alinea_2_l521_3_out = nombre_enfants_alinea_2_l521_3_;
|
||||
est_enfant_le_plus_age_out = est_enfant_le_plus_age_;
|
||||
plafond_I_d521_3_out = plafond__i_d521_3_;
|
||||
@ -2068,6 +2111,8 @@ let interface_allocations_familiales
|
||||
complement_degressif_in = (fun (_ : unit) -> raise EmptyError);
|
||||
nombre_enfants_l521_1_in = (fun (_ : unit) -> raise EmptyError);
|
||||
age_minimum_alinea_1_l521_3_in = (fun (_ : unit) -> raise EmptyError);
|
||||
age_minimum_alinea_1_l521_3_metropole_in = (fun (_ : unit) -> raise EmptyError);
|
||||
age_minimum_alinea_1_l521_3_outre_mer_in = (fun (_ : unit) -> raise EmptyError);
|
||||
nombre_enfants_alinea_2_l521_3_in = (fun (_ : unit) -> raise EmptyError);
|
||||
est_enfant_le_plus_age_in = (fun (_ : unit) -> raise EmptyError);
|
||||
plafond_I_d521_3_in = (fun (_ : unit) -> raise EmptyError);
|
||||
@ -2158,6 +2203,12 @@ let interface_allocations_familiales
|
||||
let allocations_familiales_dot_age_minimum_alinea_1_l521_3_ : enfant -> integer =
|
||||
result_.age_minimum_alinea_1_l521_3_out
|
||||
in
|
||||
let allocations_familiales_dot_age_minimum_alinea_1_l521_3_metropole_ : enfant -> integer =
|
||||
result_.age_minimum_alinea_1_l521_3_metropole_out
|
||||
in
|
||||
let allocations_familiales_dot_age_minimum_alinea_1_l521_3_outre_mer_ : enfant -> integer =
|
||||
result_.age_minimum_alinea_1_l521_3_outre_mer_out
|
||||
in
|
||||
let allocations_familiales_dot_nombre_enfants_alinea_2_l521_3_ : integer =
|
||||
result_.nombre_enfants_alinea_2_l521_3_out
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user