diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index f2b4476ed61..d0db633658a 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -919,15 +919,19 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $massactionbutton = ''; $arrayofmassactions = array(); - if ($projectstatic->usage_bill_time) { - $arrayofmassactions = array( - 'generateinvoice'=>$langs->trans("GenerateBill"), - //'builddoc'=>$langs->trans("PDFMerge"), - ); - } - if ( ! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { - $langs->load("interventions"); - $arrayofmassactions['generateinter'] = $langs->trans("GenerateInter"); + + if ($projectstatic->id > 0) { + // If we are on a given project. + if ($projectstatic->usage_bill_time) { + $arrayofmassactions = array( + 'generateinvoice'=>$langs->trans("GenerateBill"), + //'builddoc'=>$langs->trans("PDFMerge"), + ); + } + if ( ! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { + $langs->load("interventions"); + $arrayofmassactions['generateinter'] = $langs->trans("GenerateInter"); + } } //if ($user->rights->projet->creer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete', 'generateinvoice', 'generateinter'))) { @@ -1251,7 +1255,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''; if ($projectstatic->thirdparty->id > 0) { - print ''; + print '
'; print ''; print ''; } if (!empty($allprojectforuser)) { - print ''; + print ''; } // Task if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
'; print $langs->trans('InterToUse'); @@ -1569,7 +1573,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print '