Fix date start/end of project are day not hours
This commit is contained in:
parent
18acff5e57
commit
a4384b1921
@ -917,9 +917,9 @@ elseif ($object->id > 0)
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start,'dayhour');
|
$start = dol_print_date($object->date_start,'day');
|
||||||
print ($start?$start:'?');
|
print ($start?$start:'?');
|
||||||
$end = dol_print_date($object->date_end,'dayhour');
|
$end = dol_print_date($object->date_end,'day');
|
||||||
print ' - ';
|
print ' - ';
|
||||||
print ($end?$end:'?');
|
print ($end?$end:'?');
|
||||||
if ($object->hasDelay()) print img_warning("Late");
|
if ($object->hasDelay()) print img_warning("Late");
|
||||||
|
|||||||
@ -150,26 +150,26 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
|
|
||||||
// Project card
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref='<div class="refidno">';
|
$morehtmlref='<div class="refidno">';
|
||||||
// Title
|
// Title
|
||||||
$morehtmlref.=$object->title;
|
$morehtmlref.=$object->title;
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if ($object->thirdparty->id > 0)
|
if ($object->thirdparty->id > 0)
|
||||||
{
|
{
|
||||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
||||||
}
|
}
|
||||||
$morehtmlref.='</div>';
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (! $user->rights->projet->all->lire)
|
if (! $user->rights->projet->all->lire)
|
||||||
{
|
{
|
||||||
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
||||||
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
if ($object->public) print $langs->trans('SharedProject');
|
||||||
@ -192,7 +192,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||||
if ($code) print $langs->trans("OppStatus".$code);
|
if ($code) print $langs->trans("OppStatus".$code);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Opportunity percent
|
// Opportunity percent
|
||||||
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||||
if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
|
if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
|
||||||
@ -203,12 +203,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
|
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start,'dayhour');
|
$start = dol_print_date($object->date_start,'day');
|
||||||
print ($start?$start:'?');
|
print ($start?$start:'?');
|
||||||
$end = dol_print_date($object->date_end,'dayhour');
|
$end = dol_print_date($object->date_end,'day');
|
||||||
print ' - ';
|
print ' - ';
|
||||||
print ($end?$end:'?');
|
print ($end?$end:'?');
|
||||||
if ($object->hasDelay()) print img_warning("Late");
|
if ($object->hasDelay()) print img_warning("Late");
|
||||||
@ -222,40 +222,40 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="ficheaddleft">';
|
print '<div class="ficheaddleft">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
print nl2br($object->description);
|
print nl2br($object->description);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
if ($conf->categorie->enabled) {
|
if ($conf->categorie->enabled) {
|
||||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||||
print $form->showCategories($object->id,'project',1);
|
print $form->showCategories($object->id,'project',1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
// Contacts lines (modules that overwrite templates must declare this into descriptor)
|
||||||
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
|
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
|
||||||
foreach($dirtpls as $reldir)
|
foreach($dirtpls as $reldir)
|
||||||
|
|||||||
@ -185,9 +185,9 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start,'dayhour');
|
$start = dol_print_date($object->date_start,'day');
|
||||||
print ($start?$start:'?');
|
print ($start?$start:'?');
|
||||||
$end = dol_print_date($object->date_end,'dayhour');
|
$end = dol_print_date($object->date_end,'day');
|
||||||
print ' - ';
|
print ' - ';
|
||||||
print ($end?$end:'?');
|
print ($end?$end:'?');
|
||||||
if ($object->hasDelay()) print img_warning("Late");
|
if ($object->hasDelay()) print img_warning("Late");
|
||||||
|
|||||||
@ -140,9 +140,9 @@ if (($id > 0 && is_numeric($id)) || ! empty($ref))
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start,'dayhour');
|
$start = dol_print_date($object->date_start,'day');
|
||||||
print ($start?$start:'?');
|
print ($start?$start:'?');
|
||||||
$end = dol_print_date($object->date_end,'dayhour');
|
$end = dol_print_date($object->date_end,'day');
|
||||||
print ' - ';
|
print ' - ';
|
||||||
print ($end?$end:'?');
|
print ($end?$end:'?');
|
||||||
if ($object->hasDelay()) print img_warning("Late");
|
if ($object->hasDelay()) print img_warning("Late");
|
||||||
|
|||||||
@ -281,9 +281,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start,'dayhour');
|
$start = dol_print_date($object->date_start,'day');
|
||||||
print ($start?$start:'?');
|
print ($start?$start:'?');
|
||||||
$end = dol_print_date($object->date_end,'dayhour');
|
$end = dol_print_date($object->date_end,'day');
|
||||||
print ' - ';
|
print ' - ';
|
||||||
print ($end?$end:'?');
|
print ($end?$end:'?');
|
||||||
if ($object->hasDelay()) print img_warning("Late");
|
if ($object->hasDelay()) print img_warning("Late");
|
||||||
|
|||||||
@ -152,9 +152,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
print dol_print_date($projectstatic->date_start,'day');
|
$start = dol_print_date($projectstatic->date_start,'day');
|
||||||
$end=dol_print_date($projectstatic->date_end,'day');
|
print ($start?$start:'?');
|
||||||
if ($end) print ' - '.$end;
|
$end = dol_print_date($projectstatic->date_end,'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end?$end:'?');
|
||||||
|
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
@ -263,7 +266,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Include comment tpl view
|
// Include comment tpl view
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_comment.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_comment.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -228,9 +228,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
print dol_print_date($projectstatic->date_start,'day');
|
$start = dol_print_date($projectstatic->date_start,'day');
|
||||||
$end=dol_print_date($projectstatic->date_end,'day');
|
print ($start?$start:'?');
|
||||||
if ($end) print ' - '.$end;
|
$end = dol_print_date($projectstatic->date_end,'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end?$end:'?');
|
||||||
|
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
|
|||||||
@ -172,9 +172,12 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
print dol_print_date($projectstatic->date_start,'day');
|
$start = dol_print_date($projectstatic->date_start,'day');
|
||||||
$end=dol_print_date($projectstatic->date_end,'day');
|
print ($start?$start:'?');
|
||||||
if ($end) print ' - '.$end;
|
$end = dol_print_date($projectstatic->date_end,'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end?$end:'?');
|
||||||
|
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
|
|||||||
@ -150,9 +150,12 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
print dol_print_date($projectstatic->date_start,'day');
|
$start = dol_print_date($projectstatic->date_start,'day');
|
||||||
$end=dol_print_date($projectstatic->date_end,'day');
|
print ($start?$start:'?');
|
||||||
if ($end) print ' - '.$end;
|
$end = dol_print_date($projectstatic->date_end,'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end?$end:'?');
|
||||||
|
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
|
|||||||
@ -262,9 +262,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
print dol_print_date($projectstatic->date_start,'day');
|
$start = dol_print_date($projectstatic->date_start,'day');
|
||||||
$end=dol_print_date($projectstatic->date_end,'day');
|
print ($start?$start:'?');
|
||||||
if ($end) print ' - '.$end;
|
$end = dol_print_date($projectstatic->date_end,'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end?$end:'?');
|
||||||
|
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
|
|||||||
@ -349,9 +349,12 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||||
print dol_print_date($projectstatic->date_start,'day');
|
$start = dol_print_date($projectstatic->date_start,'day');
|
||||||
$end=dol_print_date($projectstatic->date_end,'day');
|
print ($start?$start:'?');
|
||||||
if ($end) print ' - '.$end;
|
$end = dol_print_date($projectstatic->date_end,'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end?$end:'?');
|
||||||
|
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user