The table header already said "payed tickets", but the number reflected
the number of payed reservations, which isn't quite as useful.
</thead>
<tbody>
{% for show, info in shows %}
-<tr><td>{{ show }}</td><td>{{ info.bookings|length }}</td><td>{{ info.tickets }}</td><td>{{ info.payed|length }}</td></tr>
+<tr><td>{{ show }}</td><td>{{ info.bookings|length }}</td><td>{{ info.tickets }}</td><td>{{ info.payed }}</td></tr>
{% endfor %}
</tbody>
</table>
shows.append((show_desc, {
'bookings' : bookings,
'tickets' : sum([b.tickets for b in bookings]),
- 'payed' : Booking.objects.filter(show=show, payment__isnull=False),
+ 'payed' : sum([b.tickets for b in bookings if b.payment is not None]),
}))
c = { 'shows' : shows }