From a7f3b85b254104d7f3cce36018bdf2ddeb863416 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Thu, 1 Dec 2016 01:44:41 -0200 Subject: [PATCH] =?UTF-8?q?exclut=20#13=20du=20n=C3=A9gatif=20total?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfet/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kfet/views.py b/kfet/views.py index daf84207..7083d489 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -490,7 +490,8 @@ class AccountGroupUpdate(UpdateView): class AccountNegativeList(ListView): queryset = (AccountNegative.objects - .select_related('account', 'account__cofprofile__user')) + .select_related('account', 'account__cofprofile__user') + .exclude(account__trigramme='#13')) template_name = 'kfet/account_negative.html' context_object_name = 'negatives' @@ -501,6 +502,7 @@ class AccountNegativeList(ListView): 'overdraft_duration': Settings.OVERDRAFT_DURATION(), } negs_sum = (AccountNegative.objects + .exclude(account__trigramme='#13') .aggregate( bal = Coalesce(Sum('account__balance'),0), offset = Coalesce(Sum('balance_offset'),0),