diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index 82835479edb..5db6d762d2a 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -198,40 +198,30 @@ if ($_GET["action"] == 'create')
{
// Projet associe
$langs->load("project");
- print '
| '.$langs->trans("Project").' | |
';
print '| '.$langs->trans("Description").' | ';
print "";
@@ -295,12 +285,33 @@ elseif ($_GET["action"] == 'edit' && $_GET["id"] > 0)
print ' |
| '.$langs->trans("Duration")." (".$langs->trans("days").') | |
';
if ($conf->projet->enabled)
- {
- // Projet associé
- print '| '.$langs->trans("Project").' | ';
- $html->select_projects($fichinter->societe_id,$fichinter->projet_id,"projetidp");
- print ' |
';
- }
+ {
+ $societe=new Societe($db);
+ $societe->fetch($fichinter->societe_id);
+ $numprojet = $societe->has_projects();
+
+ // Projet associé
+ print '| '.$langs->trans("Project").' | ';
+
+ if (!$numprojet)
+ {
+ print '';
+ }
+ else
+ {
+ $html->select_projects($fichinter->societe_id,$fichinter->projet_id,"projetidp");
+ }
+ print ' |
';
+ }
// Description
print '| '.$langs->trans("Description").' | ';
@@ -365,7 +376,11 @@ elseif ($_GET["id"] > 0)
if ($conf->projet->enabled)
{
$fichinter->fetch_projet();
- print '
| '.$langs->trans("Project").' | '.$fichinter->projet->title.' |
';
+ print '| '.$langs->trans("Project").' | ';
+ print '';
+ print $fichinter->projet->title;
+ print '';
+ print ' |
';
}
// Statut