diff --git a/models/scop_cotisation_cg_exo.py b/models/scop_cotisation_cg_exo.py index dfd9fb06f8ad62f2d88f2917ea67056e64c37cb2..fd68a4f4f74237b69d5ff3eabe846e4e6ddc0525 100644 --- a/models/scop_cotisation_cg_exo.py +++ b/models/scop_cotisation_cg_exo.py @@ -492,9 +492,11 @@ class ScopCotisationExo(models.Model): ) if exo_amount != 0: - date_refund = ( - self.date_exo_ok - ) + if self.date_exo_ok > bordereau_id.date_cotisation: + date_refund = self.date_exo_ok + else: + date_refund = bordereau_id.date_cotisation + quarter_date_due = bordereau_id.invoice_ids.filtered( lambda i: i.cotiz_quarter == str(quarter) and i.move_type == "out_invoice"