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:
@@ -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()
|
||||
Reference in New Issue
Block a user