diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index eaf77527122..3a01e80c4ba 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -486,21 +486,24 @@ if ($action == 'create' && $user->rights->projet->creer)
print $form->select_date(($date_end?$date_end:-1),'projectend');
print '';
- // Opportunity status
- print '
| '.$langs->trans("OpportunityStatus").' | ';
- print '';
- print $formproject->selectOpportunityStatus('opp_status',$object->opp_status);
- print ' |
';
+ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ // Opportunity status
+ print '| '.$langs->trans("OpportunityStatus").' | ';
+ print '';
+ print $formproject->selectOpportunityStatus('opp_status',$object->opp_status);
+ print ' |
';
- // Opportunity amount
- print '| '.$langs->trans("OpportunityAmount").' | ';
- print ' | ';
- print '
';
+ // Opportunity amount
+ print '| '.$langs->trans("OpportunityAmount").' | ';
+ print ' | ';
+ print '
';
+ }
- // Budget
- print '| '.$langs->trans("Budget").' | ';
- print ' | ';
- print '
';
+ // Budget
+ print '| '.$langs->trans("Budget").' | ';
+ print ' | ';
+ print '
';
// Description
print '| '.$langs->trans("Description").' | ';
@@ -644,17 +647,20 @@ else
print $form->select_date($object->date_end?$object->date_end:-1,'projectend');
print '
';
- // Opportunity status
- print '| '.$langs->trans("OpportunityStatus").' | ';
- print '';
- print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1);
- print ' | ';
- print '
';
+ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ // Opportunity status
+ print '| '.$langs->trans("OpportunityStatus").' | ';
+ print '';
+ print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1);
+ print ' | ';
+ print '
';
- // Opportunity amount
- print '| '.$langs->trans("OpportunityAmount").' | ';
- print ' | ';
- print '
';
+ // Opportunity amount
+ print '| '.$langs->trans("OpportunityAmount").' | ';
+ print ' | ';
+ print '
';
+ }
// Budget
print '| '.$langs->trans("Budget").' | ';
@@ -722,16 +728,19 @@ else
print dol_print_date($object->date_end,'day');
print '
';
- // Opportunity status
- print '| '.$langs->trans("OpportunityStatus").' | ';
- $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
- if ($code) print $langs->trans("OppStatus".$code);
- print ' |
';
+ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ // Opportunity status
+ print '| '.$langs->trans("OpportunityStatus").' | ';
+ $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
+ if ($code) print $langs->trans("OppStatus".$code);
+ print ' |
';
- // Opportunity Amount
- print '| '.$langs->trans("OpportunityAmount").' | ';
- if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
- print ' |
';
+ // Opportunity Amount
+ print '| '.$langs->trans("OpportunityAmount").' | ';
+ if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
+ print ' |
';
+ }
// Budget
print '| '.$langs->trans("Budget").' | ';
|