Add support for custom billing invoice email address

Fixes #782
This commit is contained in:
Joseph Schorr 2015-12-28 13:59:50 -05:00
parent 16f16e8a15
commit 10efa96009
12 changed files with 94 additions and 23 deletions

View file

@ -26,8 +26,8 @@ def sendInvoice(invoice_id):
with app.app_context():
invoice_html = renderInvoiceToHtml(invoice, user)
send_invoice_email(user.email, invoice_html)
print 'Invoice sent to %s' % (user.email)
send_invoice_email(user.invoice_email_address or user.email, invoice_html)
print 'Invoice sent to %s' % (user.invoice_email_address or user.email)
parser = argparse.ArgumentParser(description='Email an invoice')
parser.add_argument('invoice_id', help='The invoice ID')