Retrieve only one invoice

This commit is contained in:
PCoder 2020-02-01 13:15:03 +05:30
parent 23b25002ae
commit 2058c660c0

View file

@ -1694,7 +1694,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
if hosting_order.subscription_id:
stripe_obj = stripe.Invoice.list(
subscription=hosting_order.subscription_id,
count=0
count=1
)
inv_url = stripe_obj.data[0].hosted_invoice_url
elif hosting_order.stripe_charge_id: