From 2d01505ca2bd6018bda3a2f83b8bd76c66f9a4f9 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 25 Jul 2022 15:01:18 +0200 Subject: [PATCH] =?UTF-8?q?eo=5Ffacture:=20ignorer=20les=20avoirs=20et=20l?= =?UTF-8?q?es=20factures=20annul=C3=A9es=20dans=20les=20impay=C3=A9es=20(#?= =?UTF-8?q?67682)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eo_gestion/eo_facture/templatetags/eo_facture.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ]