diff --git a/cultivationtask.php b/cultivationtask.php
index 4a57974..8e1afc1 100644
--- a/cultivationtask.php
+++ b/cultivationtask.php
@@ -362,7 +362,7 @@ function displayTaskButtons($task)
print '' . $langs->trans('Modify') . '';
}
// Delete button
- if ($user->rights->projet->supprimer && ! $task->hasChildren() && ( ! $task->hasTimeSpent() || $conf->global->MAIN_VERSION_LAST_UPGRADE < "5")) {
+ if ($user->rights->projet->supprimer && ! $task->hasChildren() && ( $conf->global->MAIN_VERSION_LAST_UPGRADE < "5" || ! $task->hasTimeSpent() )) {
print '' . $langs->trans('Delete') . '';
} else {
print '' . $langs->trans('Delete') . '';