Get the last monthly hosting bill
This commit is contained in:
parent
0bc8c35031
commit
b1566c4c61
1 changed files with 2 additions and 3 deletions
|
@ -24,9 +24,8 @@ class Command(BaseCommand):
|
||||||
if hasattr(user, 'stripecustomer'):
|
if hasattr(user, 'stripecustomer'):
|
||||||
self.stdout.write(self.style.SUCCESS(
|
self.stdout.write(self.style.SUCCESS(
|
||||||
'Found %s. Fetching bills for him.' % email))
|
'Found %s. Fetching bills for him.' % email))
|
||||||
mhb = MonthlyHostingBill.objects.last(
|
mhb = MonthlyHostingBill.objects.filter(
|
||||||
customer=user.stripecustomer
|
customer=user.stripecustomer).last()
|
||||||
)
|
|
||||||
created_gt = {}
|
created_gt = {}
|
||||||
if mhb is not None:
|
if mhb is not None:
|
||||||
# fetch only invoices which is created after
|
# fetch only invoices which is created after
|
||||||
|
|
Loading…
Reference in a new issue