diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index f69b54cffdc..727ef1d7fdd 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -134,7 +134,7 @@ if (empty($reshook))
$error++;
setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors');
}
-
+
if (! $error)
{
$error=0;
@@ -308,8 +308,8 @@ if (empty($reshook))
setEventMessages($langs->trans("FailedToCloseProject").':'.$object->error, $object->errors, 'errors');
}
}
-
-
+
+
if ($error)
{
$db->rollback();
@@ -322,7 +322,7 @@ if (empty($reshook))
if (GETPOST('socid','int') > 0) $object->fetch_thirdparty(GETPOST('socid','int'));
else unset($object->thirdparty);
}
-
+
}
// Build doc
@@ -619,7 +619,7 @@ if ($action == 'create' && $user->rights->projet->creer)
{
print ' ';
print ' ';
- }
+ }
print '';
print '';
@@ -641,12 +641,12 @@ if ($action == 'create' && $user->rights->projet->creer)
});
';
}
-elseif ($object->id > 0)
+elseif ($object->id > 0)
{
/*
* Show or edit
*/
-
+
$res=$object->fetch_optionals($object->id,$extralabels);
// To verify role of users
@@ -828,26 +828,26 @@ elseif ($object->id > 0)
else
{
// Project card
-
+
$linkback = ''.$langs->trans("BackToList").' ';
-
+
$morehtmlref='
';
// Title
$morehtmlref.=$object->title;
// Thirdparty
- if ($object->thirdparty->id > 0)
+ if ($object->thirdparty->id > 0)
{
$morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
}
$morehtmlref.='
';
-
+
// Define a complementary filter for search of next/prev ref.
if (! $user->rights->projet->all->lire)
{
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
-
+
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
@@ -881,18 +881,18 @@ elseif ($object->id > 0)
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,0,$langs,1,0,0,$conf->currency);
print '';
}
-
+
// Date start - end
print ''.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").' ';
print dol_print_date($object->date_start,'day');
$end=dol_print_date($object->date_end,'day');
- if ($end)
+ if ($end)
{
print ' - '.$end;
if ($object->hasDelay()) print img_warning($langs->trans('Late'));
}
print ' ';
-
+
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,0,$langs,1,0,0,$conf->currency);
@@ -901,16 +901,16 @@ elseif ($object->id > 0)
// Other attributes
$cols = 2;
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
-
+
print '';
-
+
print '';
print '';
print '
';
print '
';
-
+
print '
';
-
+
// Description
print ''.$langs->trans("Description").' ';
print nl2br($object->description);
@@ -922,13 +922,13 @@ elseif ($object->id > 0)
print $form->showCategories($object->id,'project',1);
print " ";
}
-
+
print '
';
-
+
print '
';
print '
';
print '';
-
+
print '
';
}
@@ -947,9 +947,10 @@ elseif ($object->id > 0)
// Change probability from status
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
+ // Default value to close or not when we set opp to 'WON'.
$defaultcheckedwhenoppclose=1;
if (empty($conf->global->PROJECT_HIDE_TASKS)) $defaultcheckedwhenoppclose=0;
-
+
print '';
print '