Skip to content

Commit 17f660b

Browse files
committed
Minor fix
1 parent a934097 commit 17f660b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

metabrainz/admin/quickbooks/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_invoices(client, invoices):
5656
'''
5757
Given a set of existing invoices, fetch the invoice from QuickBooks, make a copy, update it
5858
with new values and then have QuickBooks save the new invoice. Invoices are not sent,
59-
and must be sent via the QuickBooks web interface.
59+
and must be sent via the manage command from the metabrainz-prod container.
6060
'''
6161

6262
for invoice in invoices:

metabrainz/invoices/send_invoices.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def send_invoices(self):
165165
current_app.logger.warn("Skip invoice %s with status %s" % (invoice.DocNumber, invoice.EmailStatus))
166166
continue
167167

168+
if invoice.DocNumber is None:
169+
current_app.logger.warn("Skip invoice %s. Bad invoice number." % invoice.DocNumber)
170+
continue
171+
168172
current_app.logger.warn("Invoice %s with status %s" % (invoice.DocNumber, invoice.EmailStatus))
169173
if float(invoice.TotalAmt) == 0.0:
170174
current_app.logger.warn(" marking zero amount invoice %s as sent." % invoice.DocNumber)

0 commit comments

Comments
 (0)