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:
Dan Dembinski
2021-05-28 16:26:05 -04:00
parent 64d913572c
commit b83e181c47
4 changed files with 23 additions and 4 deletions

View File

@@ -145,3 +145,14 @@ def mark_sent(InvoiceID, InvoiceDate):
session.query(Invoice).filter(Invoice.InvoiceID == InvoiceID).update({Invoice.InvoiceSent: 1})
session.commit()
def unsend(option, number):
option = option
number = number
# Invoice Number
if option == 1:
session.query(Invoice).filter(Invoice.InvoiceNumber == number).update({Invoice.InvoiceSent: 0})
#Order Number
elif option == 2:
session.query(Invoice).filter(Invoice.OrderID == number).update({Invoice.InvoiceSent: 0})
session.commit()