mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
Fix club sellings
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user