Debug v17
This commit is contained in:
parent
b4143d3d2c
commit
39fa93486d
@ -1213,8 +1213,8 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref .= dol_escape_htmltag($object->title);
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>';
|
||||
// Thirdparty
|
||||
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
|
||||
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
@ -1232,7 +1232,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
print '<div class="fichehalfleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Usage
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || isModEnabled('eventorganization')) {
|
||||
@ -1302,15 +1302,6 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Opportunity Weighted Amount
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans('OpportunityWeightedAmount').'</td><td>';
|
||||
if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) {
|
||||
print '<span class="amount">'.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
*/
|
||||
}
|
||||
|
||||
// Budget
|
||||
|
||||
@ -240,6 +240,10 @@ if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->pr
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
$title = $langs->trans('ProjectContact').' - '.$object->ref.' '.$object->name;
|
||||
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
|
||||
$title = $object->ref.' '.$object->name.' - '.$langs->trans('ProjectContact');
|
||||
@ -249,18 +253,12 @@ $help_url = 'EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos|DE:
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
|
||||
/* *************************************************************************** */
|
||||
/* */
|
||||
/* Edition and view mode */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) {
|
||||
$object->fetchComments();
|
||||
}
|
||||
@ -293,10 +291,11 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref .= $object->title;
|
||||
$morehtmlref .= dol_escape_htmltag($object->title);
|
||||
$morehtmlref .= '<br>';
|
||||
// Thirdparty
|
||||
if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
|
||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'project');
|
||||
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
@ -358,26 +357,25 @@ if ($id > 0 || !empty($ref)) {
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $object->opp_status) {
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && !empty($object->usage_opportunity)) {
|
||||
// Opportunity status
|
||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) {
|
||||
print $langs->trans("OppStatus".$code);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Opportunity percent
|
||||
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||
print ' <span title="'.$langs->trans("OpportunityProbability").'"> / ';
|
||||
if (strcmp($object->opp_percent, '')) {
|
||||
print price($object->opp_percent, '', $langs, 1, 0).' %';
|
||||
print price($object->opp_percent, 0, $langs, 1, 0).' %';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print '</span></td></tr>';
|
||||
|
||||
// Opportunity Amount
|
||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||
if (strcmp($object->opp_amount, '')) {
|
||||
print '<span class="amount">'.price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency).'</span>';
|
||||
print '<span class="amount">'.price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency).'</span>';
|
||||
if (strcmp($object->opp_percent, '')) {
|
||||
print ' <span title="'.dol_escape_htmltag($langs->trans('OpportunityWeightedAmount')).'"><span class="opacitymedium">'.$langs->trans("Weighted").'</span>: <span class="amount">'.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).'</span></span>';
|
||||
}
|
||||
@ -388,7 +386,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (!is_null($object->budget_amount) && strcmp($object->budget_amount, '')) {
|
||||
print '<span class="amount">'.price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency).'</span>';
|
||||
print '<span class="amount">'.price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -397,7 +395,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$start = dol_print_date($object->date_start, 'day');
|
||||
print ($start ? $start : '?');
|
||||
$end = dol_print_date($object->date_end, 'day');
|
||||
print ' - ';
|
||||
print ' <span class="opacitymedium">-</span> ';
|
||||
print ($end ? $end : '?');
|
||||
if ($object->hasDelay()) {
|
||||
print img_warning("Late");
|
||||
@ -418,7 +416,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
// Description
|
||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
print nl2br($object->description);
|
||||
print dol_htmlentitiesbr($object->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
|
||||
Loading…
Reference in New Issue
Block a user