mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-22 08:08:04 +01:00
Fix missing last basket
This commit is contained in:
parent
0afb46691f
commit
f9b207a5eb
1 changed files with 3 additions and 1 deletions
|
@ -89,10 +89,12 @@ class ReportsView(ProtectedViewsMixin, TemplateView):
|
|||
basket = baskets[basket_index]
|
||||
count = 0
|
||||
turnover = 0
|
||||
while basket.created_at < end_slot and basket_index < len(baskets) - 1:
|
||||
while basket.created_at < end_slot:
|
||||
count += 1
|
||||
turnover += basket.price / 100
|
||||
basket_index += 1
|
||||
if basket_index == len(baskets):
|
||||
break
|
||||
basket = baskets[basket_index]
|
||||
labels.append(current)
|
||||
counts.append(count)
|
||||
|
|
Loading…
Reference in a new issue