NEW The note on time spent can be entered when using the view per day.

This commit is contained in:
Laurent Destailleur 2016-05-04 12:24:15 +02:00
parent 87231908df
commit 878ba07fcd
2 changed files with 9 additions and 2 deletions

View File

@ -666,6 +666,11 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
print '</td>';
print '<td align="right">';
print '<textarea name="'.$lines[$i]->id.'note" rows="2" id="note">';
print '</textarea>';
print '</td>';
print "</tr>\n";
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 François Legastelois <flegastelois@teclib.com>
*
@ -192,9 +192,10 @@ if ($action == 'addtime' && $user->rights->projet->creer)
foreach($timespent_duration as $key => $val)
{
$object->fetch($key);
$object->progress = GETPOST($key . 'progress', 'int');
$object->progress = GETPOST($key.'progress', 'int');
$object->timespent_duration = $val;
$object->timespent_fk_user = $user->id;
$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);
@ -385,6 +386,7 @@ if ($usertoprocess->id == $user->id) print '<td align="right">'.$langs->trans("T
else print '<td align="right">'.$langs->trans("TimeSpentByUser").'</td>';
print '<td align="center">'.$langs->trans("HourStart").'</td>';
print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>';
print '<td>'.$langs->trans("Note").'</td>';
print "</tr>\n";
// By default, we can edit only tasks we are assigned to