diff --git a/eo_gestion/eo_facture/templatetags/eo_facture.py b/eo_gestion/eo_facture/templatetags/eo_facture.py index 129c89f..f0631f0 100644 --- a/eo_gestion/eo_facture/templatetags/eo_facture.py +++ b/eo_gestion/eo_facture/templatetags/eo_facture.py @@ -47,7 +47,9 @@ def impayees(): for f in Facture.objects.select_related('client', 'contrat', 'contrat__client') .prefetch_related('lignes', 'payments') .avec_solde() - .filter(paid=False) + .exclude(paid=True) + .exclude(annulation__isnull=False) + .exclude(factures_avoir__isnull=False) .order_by('emission') if f.solde() < 0 ]