diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 4b929fea438..1c6db9a50fa 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -462,19 +462,22 @@ if ($action == 'create' && $user->rights->projet->creer)
print '
| '.$langs->trans("Label").' | |
';
// Thirdparty
- print '| '.$langs->trans("ThirdParty").' | ';
- $filteronlist='';
- if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
- $text=$form->select_thirdparty_list(GETPOST('socid','int'),'socid',$filteronlist,'SelectThirdParty',1);
- if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile))
+ if ($conf->societe->enabled)
{
- $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
- print $form->textwithtooltip($text.' '.img_help(),$texthelp,1);
+ print ' |
| '.$langs->trans("ThirdParty").' | ';
+ $filteronlist='';
+ if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
+ $text=$form->select_thirdparty_list(GETPOST('socid','int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), '', 0, 0, 'minwidth300');
+ if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile))
+ {
+ $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
+ print $form->textwithtooltip($text.' '.img_help(),$texthelp,1);
+ }
+ else print $text;
+ print ' '.$langs->trans("AddThirdParty").'';
+ print ' |
';
}
- else print $text;
- print ' '.$langs->trans("AddThirdParty").'';
- print '';
-
+
// Status
if ($status != '')
{
@@ -657,14 +660,17 @@ else
print ' | ';
// Thirdparty
- print '| '.$langs->trans("ThirdParty").' | ';
- $filteronlist='';
- if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
- $text=$form->select_thirdparty_list($object->thirdparty->id, 'socid', $filteronlist, 1, 1);
- $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
- print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1, 0, '', '', 2);
- print ' |
';
-
+ if ($conf->societe->enabled)
+ {
+ print '| '.$langs->trans("ThirdParty").' | ';
+ $filteronlist='';
+ if (! empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist=$conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST;
+ $text=$form->select_thirdparty_list($object->thirdparty->id, 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), '', 0, 0, 'minwidth300');
+ $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
+ print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1, 0, '', '', 2);
+ print ' |
';
+ }
+
// Visibility
print '| '.$langs->trans("Visibility").' | ';
$array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject"));
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index f3905d5af5e..9f1cc038cc5 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -113,7 +113,7 @@ if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate";
$arrayfields=array(
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
'p.title'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
- 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
+ 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>$conf->societe->enabled),
'commercial'=>array('label'=>$langs->trans("SalesRepresentative"), 'checked'=>1),
'p.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100),
'p.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101),
|