Fix ML and JS french law

This commit is contained in:
Denis Merigoux 2023-03-17 18:59:41 +01:00
parent b2d02f4b0f
commit 79d6c0e25d
No known key found for this signature in database
GPG Key ID: EE99DCFA365C3EE3
5 changed files with 64601 additions and 55031 deletions

View File

@ -97,11 +97,18 @@ function run_computation_AL(log) {
"beneficieTitrePersonnelAidePersonnelleLogement": false,
"aDejaOuvertDroitAuxAllocationsFamiliales": true,
"remunerationMensuelle": 0,
"nationalite": {
"kind": "Francaise",
"payload": null,
},
"etudesApprentissageStageFormationProImpossibiliteTravail": false,
"obligationScolaire": {
"kind": "Pendant"
"kind": "Pendant",
"payload": null,
},
"situationGardeAlternee": {
"kind": "PasDeGardeAlternee"
"kind": "PasDeGardeAlternee",
"payload": null,
},
"dateDeNaissance": "2015-01-01",
"identifiant": 0
@ -113,11 +120,18 @@ function run_computation_AL(log) {
"beneficieTitrePersonnelAidePersonnelleLogement": false,
"aDejaOuvertDroitAuxAllocationsFamiliales": true,
"remunerationMensuelle": 0,
"nationalite": {
"kind": "Francaise",
"payload": null,
},
"etudesApprentissageStageFormationProImpossibiliteTravail": false,
"obligationScolaire": {
"kind": "Pendant"
"kind": "Pendant",
"payload": null,
},
"situationGardeAlternee": {
"kind": "PasDeGardeAlternee"
"kind": "PasDeGardeAlternee",
"payload": null,
},
"dateDeNaissance": "2016-01-01",
"identifiant": 1
@ -131,11 +145,19 @@ function run_computation_AL(log) {
},
"conditionRattacheFoyerFiscalParentIfi": false,
"enfantANaitreApresQuatriemeMoisGrossesse": false,
"personnesAgeesHandicapeesFoyerR8444": false,
"residence": {
"kind": "Metropole",
"payload": null
}
},
"demandeurIn": {
"nationalite": {
"kind": "Francaise"
"kind": "Francaise",
"payload": null,
},
"estNonSalarieAgricoleL7818L78146CodeRural": false,
"magistratFonctionnaireCentreInteretsMaterielsFamiliauxHorsMayotte": false,
"patrimoine": {
"produisantRevenuPeriodeR82233R8224": 0,
"neProduisantPasRevenuPeriodeR82233R8224": 0
@ -144,7 +166,7 @@ function run_computation_AL(log) {
"dateNaissance": "1992-01-01"
},
"dateCouranteIn": "2022-05-01",
"ressourcesMenagePrisesEnCompteIn": 11500
"ressourcesMenagePrisesEnCompteIn": 11500,
});
if (log) {
console.log(
@ -163,7 +185,7 @@ try {
run_computation_AF(false);
run_computation_AL(false);
} catch (error) {
console.log(error.message);
console.log(error[2]);
}
process.exit(0);

116190
french_law/js/french_law.js generated

File diff suppressed because one or more lines are too long

View File

@ -120,6 +120,7 @@ let aides_logement_input :
{
menage_in =
{
personnes_agees_handicapees_foyer_r844_4 = false;
prestations_recues = Array.of_list [];
logement =
{
@ -157,6 +158,10 @@ let aides_logement_input :
{
beneficie_titre_personnel_aide_personnelle_logement = false;
a_deja_ouvert_droit_aux_allocations_familiales = true;
nationalite =
Law_source.Aides_logement.Nationalite.Francaise ();
etudes_apprentissage_stage_formation_pro_impossibilite_travail =
false;
remuneration_mensuelle = Runtime.money_of_units_int 0;
obligation_scolaire =
Law_source.Aides_logement.SituationObligationScolaire
@ -182,6 +187,10 @@ let aides_logement_input :
Law_source.Aides_logement.SituationGardeAlternee
.PasDeGardeAlternee
();
nationalite =
Law_source.Aides_logement.Nationalite.Francaise ();
etudes_apprentissage_stage_formation_pro_impossibilite_travail =
false;
date_de_naissance = Runtime.date_of_numbers 2016 1 1;
identifiant = Runtime.integer_of_int 1;
};
@ -205,6 +214,9 @@ let aides_logement_input :
};
personne_hebergee_centre_soin_l_L162_22_3_securite_sociale = false;
date_naissance = Runtime.date_of_numbers 1992 1 1;
est_non_salarie_agricole_l781_8_l_781_46_code_rural = false;
magistrat_fonctionnaire_centre_interets_materiels_familiaux_hors_mayotte =
false;
};
date_courante_in = Runtime.date_of_numbers 2022 5 1;
ressources_menage_prises_en_compte_in = Runtime.money_of_units_int 11500;

File diff suppressed because it is too large Load Diff

View File

@ -3229,8 +3229,6 @@ class type logement =
method logementDecentL89462: bool Js.t Js.readonly_prop
method surfaceMCarres: int Js.readonly_prop
method zone: zone_d_habitation Js.t Js.readonly_prop
method normesPeuplementRespecteesPourLaDerniereFoisDepuisMoinsDUnAn:
bool Js.t Js.readonly_prop
end
let logement_to_jsoo (logement : Logement.t) : logement Js.t =
object%js
@ -3245,8 +3243,6 @@ class type logement =
val logementDecentL89462 = Js.bool logement.logement_decent_l89_462
val surfaceMCarres = integer_to_int logement.surface_m_carres
val zone = zone_d_habitation_to_jsoo logement.zone
val normesPeuplementRespecteesPourLaDerniereFoisDepuisMoinsDUnAn =
Js.bool logement.normes_peuplement_respectees_pour_la_derniere_fois_depuis_moins_d_un_an
end
let logement_of_jsoo (logement : logement Js.t) : Logement.t =
{
@ -3261,11 +3257,7 @@ class type logement =
usufruit = parent_ou_autre_of_jsoo logement##.usufruit;
logement_decent_l89_462 = Js.to_bool logement##.logementDecentL89462;
surface_m_carres = integer_of_int logement##.surfaceMCarres;
zone = zone_d_habitation_of_jsoo logement##.zone;
normes_peuplement_respectees_pour_la_derniere_fois_depuis_moins_d_un_an =
Js.to_bool
logement
##.normesPeuplementRespecteesPourLaDerniereFoisDepuisMoinsDUnAn
zone = zone_d_habitation_of_jsoo logement##.zone
}
class type menage =