From a61f79c039e081eced1ad0420a46f7a4799b95d6 Mon Sep 17 00:00:00 2001 From: atm-greg Date: Tue, 29 Sep 2020 14:10:24 +0200 Subject: [PATCH] only update reminders if event is not past --- htdocs/comm/action/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 94119fbee5c..3818f459893 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -640,7 +640,7 @@ if (empty($reshook) && $action == 'update') $object->setCategories($categories); $object->loadReminders(); - if (!empty($object->reminders)) + if (!empty($object->reminders) && $object->datep > dol_now()) { foreach ($object->reminders as $reminder) { @@ -650,7 +650,7 @@ if (empty($reshook) && $action == 'update') } //Create reminders - if ($addreminder == 'on'){ + if ($addreminder == 'on' && $object->datep > dol_now()){ $actionCommReminder = new ActionCommReminder($db); $dateremind = dol_time_plus_duree($datep, -$offsetvalue, $offsetunit);