Fix bat file argument. Adding Company Name to address block. Add option to "un-send" an email. This marks the InvoiceSent column as False. You can then re-test and re-send the mail. This doesn't remove the original email history from the SentInvoice table, and resending the email will add a new record to the table. Orders can be un-sent via the Invoice Number or Order Number
This commit is contained in:
@@ -44,6 +44,7 @@ def send_email(test, record):
|
||||
|
||||
# if ShippingCompany != 'None' and ShippingAddress2 == 'None':
|
||||
block = '''
|
||||
<br>{ShippingCompany}
|
||||
<br>{name}
|
||||
<br>{ShippingAddress1}
|
||||
<br>{ShippingCity}, {ShippingState} {ShippingZip}
|
||||
@@ -51,7 +52,7 @@ def send_email(test, record):
|
||||
</p>
|
||||
</td>
|
||||
'''
|
||||
addressBlock = block.format(name=Name, ShippingAddress1=ShippingAddress1, ShippingCity=ShippingCity,
|
||||
addressBlock = block.format(ShippingCompany=ShippingCompany, name=Name, ShippingAddress1=ShippingAddress1, ShippingCity=ShippingCity,
|
||||
ShippingState=ShippingState, ShippingZip=ShippingPostalCode)
|
||||
|
||||
|
||||
@@ -179,7 +180,7 @@ def send_email(test, record):
|
||||
f.close()
|
||||
|
||||
msg = MIMEMultipart()
|
||||
msg['Subject'] = 'INVOICE ' + InvoiceNumber
|
||||
msg['Subject'] = 'Payment Due: Invoice for CFF Portal Order ' + OrderNumber
|
||||
if test is True:
|
||||
msg['To'] = 'ddembinski@gll.com'
|
||||
# msg['Cc'] = 'ddembinski@gll.com'
|
||||
@@ -202,3 +203,4 @@ def send_email(test, record):
|
||||
sent_orders.append(OrderNumber)
|
||||
print(sent_orders)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user