Fix club sellings

This commit is contained in:
Skia
2016-10-03 13:55:20 +02:00
parent 2ef5a4d37b
commit a12f9dd53e
2 changed files with 2 additions and 1 deletions

View File

@ -196,6 +196,7 @@ class ClubSellingView(ClubTabsMixin, CanEditMixin, DetailView):
qs = qs.filter(product__id=form.cleaned_data['product'].id)
kwargs['result'] = qs.all().order_by('-id')
kwargs['total'] = sum([s.quantity * s.unit_price for s in qs.all()])
kwargs['total_quantity'] = sum([s.quantity for s in qs.all()])
else:
kwargs['result'] = qs[:0]
kwargs['form'] = form