Skip to content

Commit

Permalink
Mise à jour des montants d'allocation CAF
Browse files Browse the repository at this point in the history
  • Loading branch information
bsongis committed May 13, 2019
1 parent d49aaaa commit 08a9bcd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions cotisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,8 @@ def __init__(self, inscrit, date, options=0):
print()

def eval_allocation_caf(self):
# https://www.service-public.fr/particuliers/vosdroits/F33648

"""
Tarifs avant avril 2018 :
- de 3 ans 846,22 € 729,47 € 612,77 €
Expand All @@ -654,21 +656,29 @@ def eval_allocation_caf(self):
- de 3 ans 854,70 € 736,78 € 618,90 €
de 3 ans à 6 ans 427,35 € 368,39 € 309,45 €
"""
"""
Tarifs à partir d'avril 2019 :
- de 3 ans 857,27 € 739,00 € 620,76 €
de 3 ans à 6 ans 428,63 € 369,50 € 310,38 €
"""

if not self.inscrit.naissance or not self.tranche_paje or self.inscription.debut > IncrDate(self.inscrit.naissance, years=6):
return 0.0

if self.debut < datetime.date(2018, 4, 1):
tarifs_moins_de_trois_ans = [846.22, 729.47, 612.77]
tarifs_plus_de_trois_ans = [423.12, 364.74, 306.39]
else:
elif self.debut < datetime.date(2019, 4, 1):
tarifs_moins_de_trois_ans = [854.70, 736.78, 618.90]
tarifs_plus_de_trois_ans = [427.35, 368.39, 309.45]
else:
tarifs_moins_de_trois_ans = [857.27, 739.00, 620.76]
tarifs_plus_de_trois_ans = [428.63, 369.50, 310.38]

if self.debut > IncrDate(self.inscrit.naissance, years=3):
result = tarifs_plus_de_trois_ans[self.tranche_paje-1]
result = tarifs_plus_de_trois_ans[self.tranche_paje - 1]
else:
result = tarifs_moins_de_trois_ans[self.tranche_paje-1]
result = tarifs_moins_de_trois_ans[self.tranche_paje - 1]
return min(result, self.cotisation_mensuelle * 85 / 100)

def eval_credit_impots(self):
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# You should have received a copy of the GNU General Public License
# along with Gertrude; if not, see <http://www.gnu.org/licenses/>.

VERSION = '1.22.21'
VERSION = '1.22.22'

0 comments on commit 08a9bcd

Please sign in to comment.