Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def update_sent_state(sender=None, headers=None, **kwargs):

scheduler.add_job(send_after_event_mail, 'cron', hour=5, minute=30)
scheduler.add_job(send_event_fee_notification, 'cron', day=1)
scheduler.add_job(send_event_fee_notification_followup, 'cron', day=15)
scheduler.add_job(send_event_fee_notification_followup, 'cron', day=1, month='1-12')
scheduler.add_job(change_session_state_on_event_completion, 'cron', hour=5, minute=30)
scheduler.add_job(expire_pending_tickets, 'cron', minute=45)
scheduler.add_job(send_monthly_event_invoice, 'cron', day=1, month='1-12')
Expand Down
4 changes: 2 additions & 2 deletions app/api/helpers/scheduled_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ def send_event_fee_notification():
def send_event_fee_notification_followup():
from app import current_app as app
with app.app_context():
incomplete_invoices = EventInvoice.query.filter(EventInvoice.status != 'completed').all()
incomplete_invoices = EventInvoice.query.filter(EventInvoice.status != 'paid').all()
for incomplete_invoice in incomplete_invoices:
if incomplete_invoice.amount > 0:
prev_month = monthdelta(incomplete_invoice.created_at, 1).strftime(
"%b %Y") # Displayed as Aug 2016
app_name = get_settings()['app_name']
frontend_url = get_settings()['frontend_url']
link = '{}/invoices/{}'.format(frontend_url,
link = '{}/event-invoice/{}/review'.format(frontend_url,
incomplete_invoice.identifier)
send_followup_email_for_monthly_fee_payment(incomplete_invoice.user.email,
incomplete_invoice.event.name,
Expand Down