generate invoices for unpaid customorders
This commit is contained in:
parent
ae1c15b88e
commit
be34e1a6b5
|
@ -26,7 +26,7 @@ class Command(BaseCommand):
|
||||||
self.output('Generated Invoice object for %s' % order)
|
self.output('Generated Invoice object for %s' % order)
|
||||||
|
|
||||||
# check if we need to generate any invoices for custom orders
|
# check if we need to generate any invoices for custom orders
|
||||||
for customorder in CustomOrder.objects.filter(paid=True, invoice__isnull=True):
|
for customorder in CustomOrder.objects.filter(invoice__isnull=True):
|
||||||
# generate invoice for this CustomOrder
|
# generate invoice for this CustomOrder
|
||||||
Invoice.objects.create(customorder=customorder)
|
Invoice.objects.create(customorder=customorder)
|
||||||
self.output('Generated Invoice object for %s' % customorder)
|
self.output('Generated Invoice object for %s' % customorder)
|
||||||
|
|
Loading…
Reference in a new issue