Merge branch '9053/show-paid-invoices-only' into 'master'

Filter invoices by paid status

See merge request ungleich-public/dynamicweb!747
This commit is contained in:
pcoder116 2021-03-29 03:59:48 +02:00
commit 7c2c3de1f6

View file

@ -1315,7 +1315,8 @@ class InvoiceListView(LoginRequiredMixin, TemplateView):
logger.debug("User does not exist")
cu = self.request.user
invs = stripe.Invoice.list(customer=cu.stripecustomer.stripe_id,
count=100)
count=100,
status='paid')
paginator = Paginator(invs.data, 10)
try:
invs_page = paginator.page(page)