diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 2fda7e1df0e..570caef7f95 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -37,6 +37,8 @@ OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status OpportunitiesStatusForProjects=Leads amount of projects by status ShowProject=Show project ShowTask=Show task +ShowCanceled=Show canceled +HideCanceled=Hide canceled SetProject=Set project NoProject=No project defined or owned NbOfProjects=Number of projects @@ -274,4 +276,4 @@ AddPersonToTask=Add also to tasks UsageOrganizeEvent=Usage: Event Organization PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. -SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them \ No newline at end of file +SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index 6beabd61c1c..01aad98a391 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -37,6 +37,8 @@ OpportunitiesStatusForOpenedProjects=Importe oportunidades de proyectos por esta OpportunitiesStatusForProjects=Importe oportunidades de proyectos por estado ShowProject=Ver proyecto ShowTask=Ver tarea +ShowCanceled=Mostrar cancelados +HideCanceled=Ocultar cancelados SetProject=Definir proyecto NoProject=Ningún proyecto definido NbOfProjects=Numero de proyectos diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 9e14a53e7ea..0002da42a82 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1048,6 +1048,24 @@ foreach ($listofreferent as $key => $value) { } $addform .= '
'; } + if ($key == "order_supplier") { + $addform .= ' + '.$langs->trans("ShowCanceled").' + + '; + } print load_fiche_titre($langs->trans($title), $addform, ''); @@ -1170,9 +1188,16 @@ foreach ($listofreferent as $key => $value) { if (!empty($element->close_code) && $element->close_code == 'replaced') { $qualifiedfortotal = false; // Replacement invoice, do not include into total } + } elseif (($key == 'order_supplier') && ($element->status == 7)) { + $qualifiedfortotal = false; // It makes no sense to include canceled orders in the total + } + + if (($key == "order_supplier") && ($element->status == 7)) { + print ''; + } else { + print ''; } - print ''; // Remove link print '';