Commented out sendmail parts for testing. Added SentInvoice table that tracks when invoices were sent. Added InvoiceID and InvoiceSent columns to Invoice table. Now tracks which invoices haven't been sent and only sends those. Once hte invoice has been sent it marks it has having been sent in the database and adds the date to the SentInvoice table. Started adding parts to allow xlsx filent not to be hardcoded. Updated TableSetup using the PyCharm autogeneric SQL thing.

This commit is contained in:
Dan Dembinski
2021-04-01 15:52:47 -04:00
parent ae4d6c1a1f
commit 82ad72007c
4 changed files with 79 additions and 41 deletions

View File

@@ -2,6 +2,7 @@ import sendEmail
import InvoiceDatabase
running = True
fileName = '1.xlsx'
while running is True:
print('1. load new excel file\n2. Send Test emails\n3. Send Invoices\n4. Quit')
@@ -9,7 +10,7 @@ while running is True:
if option == 1:
print('Enter invoice number')
invoiceNumber = str(input())
InvoiceDatabase.load_sheet(invoiceNumber)
InvoiceDatabase.load_sheet(invoiceNumber, fileName)
elif option == 2:
sendEmail.send_email(True, 'ALL')
elif option == 3: