Fix bad date on time spent view
This commit is contained in:
parent
afc1938676
commit
1becbb8805
@ -640,12 +640,6 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
// Ref
|
||||
print '<td>';
|
||||
$taskstatic->ref=($lines[$i]->ref?$lines[$i]->ref:$lines[$i]->id);
|
||||
print $taskstatic->getNomUrl(1,'withproject');
|
||||
print '</td>';
|
||||
|
||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
||||
{
|
||||
// Thirdparty
|
||||
@ -656,6 +650,12 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Ref
|
||||
print '<td>';
|
||||
$taskstatic->ref=($lines[$i]->ref?$lines[$i]->ref:$lines[$i]->id);
|
||||
print $taskstatic->getNomUrl(1, 'withproject', 'time');
|
||||
print '</td>';
|
||||
|
||||
// Label task
|
||||
print "<td>";
|
||||
for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
@ -663,7 +663,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
$taskstatic->ref=$lines[$i]->label;
|
||||
$taskstatic->date_start=$lines[$i]->date_start;
|
||||
$taskstatic->date_end=$lines[$i]->date_end;
|
||||
print $taskstatic->getNomUrl(0,'withproject');
|
||||
print $taskstatic->getNomUrl(0, 'withproject', 'time');
|
||||
//print "<br>";
|
||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
|
||||
@ -241,13 +241,14 @@ if ($action == 'addtime' && $user->rights->projet->lire)
|
||||
$object->timespent_note = GETPOST($key.'note');
|
||||
if (GETPOST($key."hour") != '' && GETPOST($key."hour") >= 0) // If hour was entered
|
||||
{
|
||||
$object->timespent_date = dol_mktime(GETPOST($key."hour"),GETPOST($key."min"),0,$monthofday,$dayofday,$yearofday);
|
||||
$object->timespent_datehour = dol_mktime(GETPOST($key."hour"),GETPOST($key."min"),0,$monthofday,$dayofday,$yearofday);
|
||||
$object->timespent_withhour = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->timespent_date = dol_mktime(12,0,0,$monthofday,$dayofday,$yearofday);
|
||||
$object->timespent_datehour = dol_mktime(12,0,0,$monthofday,$dayofday,$yearofday);
|
||||
}
|
||||
$object->timespent_date = $object->timespent_datehour;
|
||||
|
||||
if ($object->timespent_date > 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user