From d971a517dc74589df7bfadd68091b37f8c60192d Mon Sep 17 00:00:00 2001 From: benjamin <benjamin@le-filament.com> Date: Mon, 30 Jan 2023 19:50:41 +0100 Subject: [PATCH] [update] change CAE contribution condition --- models/scop_bordereau_cg.py | 6 +----- models/scop_cotisation_cg.py | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/models/scop_bordereau_cg.py b/models/scop_bordereau_cg.py index 8980db4..0658b5d 100644 --- a/models/scop_bordereau_cg.py +++ b/models/scop_bordereau_cg.py @@ -922,12 +922,7 @@ class Bordereau(models.Model): # Specific CAE calculation : to be deleted when 2022 is generated if ( type_contribution == type_contrib_cae - and self.year == "2022" - and cotiz_quarter in (1, 2) ): - pass - # ... End specific CAE 2022 - else: Invoice.create( { "partner_id": partner.id, @@ -1325,6 +1320,7 @@ class Bordereau(models.Model): payments = bordereau.invoice_ids.move_line_payment_ids.filtered( lambda r: r.move_id.move_type == "entry" ).sorted(lambda p: p.date) + schedule_plan = Move.read_group( [ ("bordereau_id", "=", bordereau.id), diff --git a/models/scop_cotisation_cg.py b/models/scop_cotisation_cg.py index ed01358..c08bd40 100644 --- a/models/scop_cotisation_cg.py +++ b/models/scop_cotisation_cg.py @@ -664,7 +664,9 @@ class ScopCotisation(models.Model): total_com += contrib_fede_com # Ajout ligne Fédération CAE - if m.is_federation_cae: + # TODO: Mettre à jour avec is_federation_cae après la maj des + # périodes par la CG + if m.cae: datas_contrib_cae = datas_contrib.copy() contrib_fede_cae = 100 # Calcul cotisation N-1 -- GitLab