Skip to content
Snippets Groups Projects
Commit 4f128a8a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

notification about future voucher expiry date starts 7 days before expiry date

parent 715564e8
No related branches found
No related tags found
1 merge request!136voucher validity
......@@ -171,8 +171,10 @@ def get_subjects_with_no_visit(user):
def get_subjects_with_almost_expired_vouchers(user):
notification_min_date = get_today_midnight_date() + datetime.timedelta(days=14)
contact_attempt_min_date = get_today_midnight_date() - datetime.timedelta(days=14)
# if expiry date is in the next 7 days
notification_min_date = get_today_midnight_date() + datetime.timedelta(days=7)
# if last successful contact was over 7 days ago
contact_attempt_min_date = get_today_midnight_date() - datetime.timedelta(days=7)
result = StudySubject.objects.filter(
subject__dead=False,
resigned=False,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment