diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index db710e2715d..9adfd8130c6 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -550,50 +550,53 @@ if ($action == 'create' && $user->rights->projet->creer) print '
| '; - print $langs->trans("Usage"); - print ' | '; - print '';
- if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
{
- print 'usage_opportunity ? ' checked="checked"' : '')).'"> ';
- $htmltext = $langs->trans("ProjectFollowOpportunity");
- print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
- print ' '; + print ' | ||||||||||||||||||||||||||||||||||||||||||
| '; + print $langs->trans("Usage"); + print ' | '; + print '';
+ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ print 'usage_opportunity ? ' checked="checked"' : '')) . '"> ';
+ $htmltext = $langs->trans("ProjectFollowOpportunity");
+ print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
+ print ' '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print 'usage_task ? ' checked="checked"' : '')) . '"> '; + $htmltext = $langs->trans("ProjectFollowTasks"); + print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); + print ' '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) + { + print 'usage_bill_time ? ' checked="checked"' : '')) . '"> '; + $htmltext = $langs->trans("ProjectBillTimeDescription"); + print $form->textwithpicto($langs->trans("BillTime"), $htmltext); + print ' '; + } + print ' | ||||||||||||||||||||||||||||||||||||||||||
| '.$langs->trans("Visibility").' | '; @@ -1071,16 +1080,16 @@ elseif ($object->id > 0) // Opportunity Amount print ' | ||||||||||||||||||||||||||||||||||||||||||
| '.$langs->trans("OpportunityAmount").' | '; /*if ($object->opp_status) - { - print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); - }*/ + { + print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); + }*/ if (strcmp($object->opp_amount, '')) print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); print ' | ||||||||||||||||||||||||||||||||||||||||||
| '.$langs->trans('OpportunityWeightedAmount').' | '; - if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency); - print ' | ||||||||||||||||||||||||||||||||||||||||||
| '.$langs->trans('OpportunityWeightedAmount').' | '; + if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency); + print ' |
| '; - print $langs->trans("Usage"); - print ' | '; - print '';
- if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
- {
- print 'usage_opportunity ? ' checked="checked"' : '')).'"> ';
- $htmltext = $langs->trans("ProjectFollowOpportunity");
- print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
- print ' '; - } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { - print 'usage_task ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowTasks"); - print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); - print ' '; - } - if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { - print 'usage_bill_time ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectBillTimeDescription"); - print $form->textwithpicto($langs->trans("BillTime"), $htmltext); - print ' '; - } - print ' |
| '; + print $langs->trans("Usage"); + print ' | '; + print '';
+ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ print 'usage_opportunity ? ' checked="checked"' : '')).'"> ';
+ $htmltext = $langs->trans("ProjectFollowOpportunity");
+ print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
+ print ' '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print 'usage_task ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectFollowTasks"); + print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); + print ' '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) + { + print 'usage_bill_time ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectBillTimeDescription"); + print $form->textwithpicto($langs->trans("BillTime"), $htmltext); + print ' '; + } + print ' |
| '.$langs->trans("Visibility").' | '; if ($object->public) print $langs->trans('SharedProject'); else print $langs->trans('PrivateProject'); print ' |
| '.$langs->trans("OpportunityStatus").' | '; - $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); - print ' |
| '.$langs->trans("OpportunityStatus").' | '; + $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); + if ($code) print $langs->trans("OppStatus".$code); + print ' |
| '.$langs->trans("OpportunityProbability").' | '; - if (strcmp($object->opp_percent, '')) print price($object->opp_percent, '', $langs, 1, 0).' %'; - print ' |
| '.$langs->trans("OpportunityProbability").' | '; + if (strcmp($object->opp_percent, '')) print price($object->opp_percent, '', $langs, 1, 0).' %'; + print ' |
| '.$langs->trans("OpportunityAmount").' | '; - if (strcmp($object->opp_amount, '')) print price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency); - print ' |
| '.$langs->trans("OpportunityAmount").' | '; + if (strcmp($object->opp_amount, '')) print price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency); + print ' |
| '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").' | '; + // Date start - end + print ' |
| '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").' | '; $start = dol_print_date($object->date_start, 'day'); print ($start ? $start : '?'); $end = dol_print_date($object->date_end, 'day'); print ' - '; print ($end ? $end : '?'); if ($object->hasDelay()) print img_warning("Late"); - print ' |
| '.$langs->trans("Budget").' | '; if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency); print ' |
| '.$langs->trans("Description").' | '; - print nl2br($object->description); - print ' | '; + // Description + print ''.$langs->trans("Description").' | '; + print nl2br($object->description); + print ' | '; - // Categories - if ($conf->categorie->enabled) { - print '
| '.$langs->trans("Categories").' | '; - print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1); - print " |
| '.$langs->trans("Categories").' | '; + print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1); + print " |
| '; -print $langs->trans("Usage"); -print ' | '; -print '';
-if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS))
{
- print 'usage_opportunity ? ' checked="checked"' : '')).'"> ';
- $htmltext = $langs->trans("ProjectFollowOpportunity");
- print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
- print ' '; + print ' | ||||||||||||||||||||||||||||||||||||||||||
| '; + print $langs->trans("Usage"); + print ' | '; + print '';
+ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ print 'usage_opportunity ? ' checked="checked"' : '')).'"> ';
+ $htmltext = $langs->trans("ProjectFollowOpportunity");
+ print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
+ print ' '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print 'usage_task ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectFollowTasks"); + print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); + print ' '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) + { + print 'usage_bill_time ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectBillTimeDescription"); + print $form->textwithpicto($langs->trans("BillTime"), $htmltext); + print ' '; + } + print ' | ||||||||||||||||||||||||||||||||||||||||||
| '.$langs->trans("Visibility").' | ';
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index ebc6a7dc556..3f4b1e9a429 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -409,32 +409,35 @@ if ($id > 0 || !empty($ref))
print '
|