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 $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||||
print "</td>";
|
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))
|
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
||||||
{
|
{
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
@ -656,6 +650,12 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||||||
print '</td>';
|
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
|
// Label task
|
||||||
print "<td>";
|
print "<td>";
|
||||||
for ($k = 0 ; $k < $level ; $k++) print " ";
|
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->ref=$lines[$i]->label;
|
||||||
$taskstatic->date_start=$lines[$i]->date_start;
|
$taskstatic->date_start=$lines[$i]->date_start;
|
||||||
$taskstatic->date_end=$lines[$i]->date_end;
|
$taskstatic->date_end=$lines[$i]->date_end;
|
||||||
print $taskstatic->getNomUrl(0,'withproject');
|
print $taskstatic->getNomUrl(0, 'withproject', 'time');
|
||||||
//print "<br>";
|
//print "<br>";
|
||||||
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
//for ($k = 0 ; $k < $level ; $k++) print " ";
|
||||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
//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');
|
$object->timespent_note = GETPOST($key.'note');
|
||||||
if (GETPOST($key."hour") != '' && GETPOST($key."hour") >= 0) // If hour was entered
|
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;
|
$object->timespent_withhour = 1;
|
||||||
}
|
}
|
||||||
else
|
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)
|
if ($object->timespent_date > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user