Fix: we check whether the task has no sub-task

This commit is contained in:
Regis Houssin 2010-02-10 16:22:08 +00:00
parent 860611c103
commit 2c58a7f66f

View File

@ -121,6 +121,8 @@ if ($taskid)
$result=$projectstatic->fetch($task->fk_project);
if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid);
if ($mesg) print $mesg;
$head=task_prepare_head($task);
dol_fiche_head($head, 'task', $langs->trans("Task"),0,'projecttask');
@ -262,7 +264,7 @@ if ($taskid)
}
// Delete
if ($user->rights->projet->supprimer)
if ($user->rights->projet->supprimer && ! $task->hasChildren())
{
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$task->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
}