id).($type != '' ? '&type='.$type:'').'&mode=byunit">';
diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php
index 6d3dc65903e..794e9c3af00 100644
--- a/htdocs/projet/contact.php
+++ b/htdocs/projet/contact.php
@@ -196,17 +196,20 @@ if ($id > 0 || ! empty($ref))
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 ' |
';
-
- // Opportunity Amount
- print '| '.$langs->trans("OpportunityAmount").' | ';
- if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
- 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 ' |
';
+ }
+
// Budget
print '| '.$langs->trans("Budget").' | ';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 86928cbf2b9..1664f2e7269 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -157,16 +157,19 @@ print ' |
| '.$langs->trans("DateEnd").' | ';
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 ' |
';
-
-// Opportunity Amount
-print '| '.$langs->trans("OpportunityAmount").' | ';
-if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
-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 ' |
';
+}
// Budget
print '| '.$langs->trans("Budget").' | ';
diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php
index 498db12ddc6..b86a961bd69 100644
--- a/htdocs/projet/ganttview.php
+++ b/htdocs/projet/ganttview.php
@@ -142,7 +142,11 @@ if ($id > 0 || ! empty($ref))
print dol_print_date($object->date_end,'day');
print ' |
';
-
+ // Budget
+ print '| '.$langs->trans("Budget").' | ';
+ if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
+ print ' |
';
+
print '';
print '