exclut #13 du négatif total

This commit is contained in:
Ludovic Stephan 2016-12-01 01:44:41 -02:00
parent 45cc7cfa33
commit a7f3b85b25

View file

@ -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),