Filter invoices by paid status

This commit is contained in:
PCoder 2021-03-29 07:23:58 +05:30
parent 63821813d4
commit 1d48dfb93b

View file

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