exclude uncollectable pledges
parent
150ed860c9
commit
23708e15ba
|
@ -95,6 +95,7 @@
|
|||
<h2>Pledges</h2>
|
||||
<dl>
|
||||
<dt>How much has been pledged to Unglue.it?</dt>
|
||||
<p>Excludes pledges canceled, failed, or otherwise uncollectable.</p>
|
||||
<dd>
|
||||
<ul class="terms">
|
||||
<li>{{ transactions.today.count }} pledges have been made today totaling ${% if transactions.today.sum %}{{ transactions.today.sum }}{% else %}0{% endif %}.
|
||||
|
|
|
@ -1599,7 +1599,7 @@ class InfoPageView(TemplateView):
|
|||
else:
|
||||
wishlists.yesterday = wishlists.month.filter(created__day = date_today().day-1)
|
||||
|
||||
transactions = Transaction.objects
|
||||
transactions = Transaction.objects.all().exclude(status__in=['Error', 'Canceled', 'Refunded', 'Failed', 'Written-Off'])
|
||||
transactions.sum = transactions.aggregate(Sum('amount'))['amount__sum']
|
||||
transactions.today = transactions.filter(date_created__range = (date_today(), now()))
|
||||
transactions.today.sum = transactions.today.aggregate(Sum('amount'))['amount__sum']
|
||||
|
|
Loading…
Reference in New Issue