Skip to content
Snippets Groups Projects
Commit 878ba07f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

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

parent 87231908
No related branches found
No related tags found
No related merge requests found
...@@ -666,6 +666,11 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t ...@@ -666,6 +666,11 @@ function projectLinesPerDay(&$inc, $parent, $lines, &$level, &$projectsrole, &$t
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou")); else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
print '</td>'; print '</td>';
print '<td align="right">';
print '<textarea name="'.$lines[$i]->id.'note" rows="2" id="note">';
print '</textarea>';
print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
......
<?php <?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* 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) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 François Legastelois <flegastelois@teclib.com> * Copyright (C) 2010 François Legastelois <flegastelois@teclib.com>
* *
...@@ -192,9 +192,10 @@ if ($action == 'addtime' && $user->rights->projet->creer) ...@@ -192,9 +192,10 @@ if ($action == 'addtime' && $user->rights->projet->creer)
foreach($timespent_duration as $key => $val) foreach($timespent_duration as $key => $val)
{ {
$object->fetch($key); $object->fetch($key);
$object->progress = GETPOST($key . 'progress', 'int'); $object->progress = GETPOST($key.'progress', 'int');
$object->timespent_duration = $val; $object->timespent_duration = $val;
$object->timespent_fk_user = $user->id; $object->timespent_fk_user = $user->id;
$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_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 ...@@ -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>'; else print '<td align="right">'.$langs->trans("TimeSpentByUser").'</td>';
print '<td align="center">'.$langs->trans("HourStart").'</td>'; print '<td align="center">'.$langs->trans("HourStart").'</td>';
print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>'; print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>';
print '<td>'.$langs->trans("Note").'</td>';
print "</tr>\n"; print "</tr>\n";
// By default, we can edit only tasks we are assigned to // By default, we can edit only tasks we are assigned to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment