2021-02-01 22:09:16 +03:00
|
|
|
(* This file is part of the French law library, a collection of functions for
|
|
|
|
computing French taxes and benefits derived from Catala programs. Copyright
|
2022-07-22 13:34:46 +03:00
|
|
|
(C) 2021 Inria, contributor: Denis Merigoux <denis.merigoux@inria.fr>, Emile
|
|
|
|
Rolley <emile.rolley@tuta.io>
|
2021-02-01 22:09:16 +03:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
|
|
use this file except in compliance with the License. You may obtain a copy of
|
|
|
|
the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
License for the specific language governing permissions and limitations under
|
|
|
|
the License. *)
|
|
|
|
|
2022-07-22 13:34:46 +03:00
|
|
|
open Runtime_ocaml.Runtime
|
2021-02-01 22:09:16 +03:00
|
|
|
module Allocations_familiales = Law_source.Allocations_familiales
|
|
|
|
module AF = Allocations_familiales
|
|
|
|
|
2021-03-05 21:16:56 +03:00
|
|
|
let compute_allocations_familiales
|
2022-07-22 13:34:46 +03:00
|
|
|
~(current_date : date)
|
2022-07-12 15:10:53 +03:00
|
|
|
~(children : AF.EnfantEntree.t array)
|
2021-03-17 21:35:21 +03:00
|
|
|
~(income : int)
|
2022-07-22 13:34:46 +03:00
|
|
|
~(residence : AF.Collectivite.t)
|
2021-11-07 02:53:14 +03:00
|
|
|
~(is_parent : bool)
|
|
|
|
~(fills_title_I : bool)
|
|
|
|
~(had_rights_open_before_2012 : bool) : float =
|
2021-02-01 22:09:16 +03:00
|
|
|
let result =
|
|
|
|
AF.interface_allocations_familiales
|
|
|
|
{
|
2022-07-12 15:10:53 +03:00
|
|
|
AF.InterfaceAllocationsFamilialesIn.i_date_courante_in = current_date;
|
|
|
|
AF.InterfaceAllocationsFamilialesIn.i_enfants_in = children;
|
|
|
|
AF.InterfaceAllocationsFamilialesIn.i_ressources_menage_in =
|
|
|
|
money_of_units_int income;
|
|
|
|
AF.InterfaceAllocationsFamilialesIn.i_residence_in = residence;
|
|
|
|
AF.InterfaceAllocationsFamilialesIn
|
|
|
|
.i_personne_charge_effective_permanente_est_parent_in = is_parent;
|
|
|
|
AF.InterfaceAllocationsFamilialesIn
|
|
|
|
.i_personne_charge_effective_permanente_remplit_titre_I_in =
|
2022-02-09 18:09:28 +03:00
|
|
|
fills_title_I;
|
2022-07-12 15:10:53 +03:00
|
|
|
AF.InterfaceAllocationsFamilialesIn
|
|
|
|
.i_avait_enfant_a_charge_avant_1er_janvier_2012_in =
|
2022-02-09 18:09:28 +03:00
|
|
|
had_rights_open_before_2012;
|
2021-02-01 22:09:16 +03:00
|
|
|
}
|
|
|
|
in
|
2022-10-25 13:33:21 +03:00
|
|
|
money_to_float result.AF.InterfaceAllocationsFamiliales.i_montant_verse
|