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:
3
main.py
3
main.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user