refactored logic for generating invoices and checking for existence
auto refresh working again - yay
emails being sent separately for generating invoices and reminders for stores that have not yet paid