mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Can remove a project if project has task.
This commit is contained in:
parent
af0a8fccc8
commit
ea26c7a4c4
|
|
@ -49,7 +49,8 @@ For users:
|
|||
- New: task #11003: checkbox on checks to deposit
|
||||
- New: Numbering module for invoice use same number for invoice
|
||||
and credit note if mask is same.
|
||||
- New: Add status into export. Add default language into export.
|
||||
- New: Add status into export. Add default language into export.
|
||||
- New: Can remove a project if project has tasks.
|
||||
- Fix: Better Postgresql compatibility.
|
||||
|
||||
For developers:
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ NoTasks=No tasks for this project
|
|||
LinkedToAnotherCompany=Linked to other third party
|
||||
TaskIsNotAffectedToYou=Task not allocated to you
|
||||
ErrorTimeSpentIsEmpty=Time spent is empty
|
||||
ThisWillAlsoRemoveTasks=This action will also delete all tasks of project (<b>%s</b> tasks at the moment) and all inputs of time spent.
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Project leader
|
||||
TypeContact_project_external_PROJECTLEADER=Project leader
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ NoTasks=Aucune tâche pour ce projet
|
|||
LinkedToAnotherCompany=Liés à autre société
|
||||
TaskIsNotAffectedToYou=Tâche qui ne vous est pas affectée
|
||||
ErrorTimeSpentIsEmpty=Le temps consommé n'est pas renseigné
|
||||
ThisWillAlsoRemoveTasks=Cette opération détruira également les taches du projet (<b>%s</b> taches actuellement) et le suivi des consommés.
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Chef de projet
|
||||
TypeContact_project_external_PROJECTLEADER=Chef de projet
|
||||
|
|
|
|||
|
|
@ -281,9 +281,9 @@ class Project extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Return list of projects
|
||||
* \param socid To filter on a particular third party
|
||||
* \return array Liste of projects
|
||||
* Return list of projects
|
||||
* @param socid To filter on a particular third party
|
||||
* @return array Liste of projects
|
||||
*/
|
||||
function liste_array($socid='')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
require("../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/projet/class/task.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/project/modules_project.php");
|
||||
|
|
@ -364,7 +365,12 @@ else
|
|||
// Confirmation delete
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$project->id,$langs->trans("DeleteAProject"),$langs->trans("ConfirmDeleteAProject"),"confirm_delete",'','',1);
|
||||
$text=$langs->trans("ConfirmDeleteAProject");
|
||||
$task=new Task($db);
|
||||
$taskarray=$task->getTasksArray(0,0,$project->id,0,0);
|
||||
$nboftask=sizeof($taskarray);
|
||||
if ($nboftask) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks",$nboftask);
|
||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$project->id,$langs->trans("DeleteAProject"),$text,"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user