mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 08:47:14 +03:00
35 lines
1.8 KiB
Python
Executable File
35 lines
1.8 KiB
Python
Executable File
#!python3
|
|
|
|
from src.catala import date_of_numbers, Unit, integer_of_int, money_of_units_int, no_input
|
|
from src.allocations_familiales import interface_allocations_familiales, InterfaceAllocationsFamilialesIn, EnfantEntree, PriseEnCharge, PriseEnCharge_Code, Collectivite, Collectivite_Code
|
|
|
|
|
|
def main():
|
|
print(interface_allocations_familiales(
|
|
InterfaceAllocationsFamilialesIn(
|
|
date_courante_in=lambda _: date_of_numbers(2020, 4, 20),
|
|
enfants_in=lambda _: [
|
|
EnfantEntree(d_identifiant=integer_of_int(0), d_remuneration_mensuelle=integer_of_int(0),
|
|
d_date_de_naissance=date_of_numbers(2003, 2, 2),
|
|
d_prise_en_charge=PriseEnCharge(
|
|
PriseEnCharge_Code.EffectiveEtPermanente, Unit()),
|
|
d_a_deja_ouvert_droit_aux_allocations_familiales=True),
|
|
EnfantEntree(d_identifiant=integer_of_int(1), d_remuneration_mensuelle=integer_of_int(300),
|
|
d_date_de_naissance=date_of_numbers(2013, 9, 30),
|
|
d_prise_en_charge=PriseEnCharge(
|
|
PriseEnCharge_Code.GardeAlterneePartageAllocations, Unit()),
|
|
d_a_deja_ouvert_droit_aux_allocations_familiales=True)
|
|
],
|
|
ressources_menage_in=lambda _: money_of_units_int(30000),
|
|
residence_in=lambda _: Collectivite(
|
|
Collectivite_Code.Metropole, Unit()),
|
|
personne_charge_effective_permanente_est_parent_in=lambda _: True,
|
|
personne_charge_effective_permanente_remplit_titre_I_in=lambda _: True,
|
|
enfants_a_charge_in=no_input(),
|
|
montant_verse_in=no_input()
|
|
)))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|