Fix: Some fields not visibles. Wrong value for calculated time.
This commit is contained in:
parent
868809caba
commit
a853aed348
@ -41,7 +41,7 @@ class Task extends CommonObject
|
||||
var $fk_task_parent;
|
||||
var $label;
|
||||
var $description;
|
||||
var $duration_effective;
|
||||
var $duration_effective; // total of time spent on this task
|
||||
var $planned_workload;
|
||||
var $date_c;
|
||||
var $date_start;
|
||||
|
||||
@ -348,7 +348,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td></tr>';
|
||||
|
||||
// Progress
|
||||
print '<tr><td>'.$langs->trans("Progress").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
|
||||
print $formother->select_percent($object->progress,'progress');
|
||||
print '</td></tr>';
|
||||
|
||||
@ -436,14 +436,15 @@ if ($id > 0 || ! empty($ref))
|
||||
print convertSecondToTime($object->planned_workload,'allhourmin');
|
||||
print '</td></tr>';
|
||||
|
||||
// Progress
|
||||
// Declared progress
|
||||
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
|
||||
print $object->progress.' %';
|
||||
print '</td></tr>';
|
||||
|
||||
// Progress
|
||||
// Calculated progress
|
||||
print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td colspan="3">';
|
||||
print $object->progress.' %';
|
||||
if ($object->planned_workload) print round(100 * $object->duration_effective / $object->planned_workload,2).' %';
|
||||
else print '';
|
||||
print '</td></tr>';
|
||||
|
||||
// Description
|
||||
|
||||
@ -50,7 +50,7 @@ $projectstatic = new Project($db);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
*/
|
||||
|
||||
if ($action == 'addtimespent' && $user->rights->projet->creer)
|
||||
{
|
||||
@ -171,7 +171,7 @@ if (! empty($project_ref) && ! empty($withproject))
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
*/
|
||||
|
||||
llxHeader("",$langs->trans("Task"));
|
||||
|
||||
@ -283,9 +283,6 @@ if ($id > 0 || ! empty($ref))
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td></tr>';
|
||||
|
||||
// Planned workload
|
||||
print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td colspan="3">'.convertSecondToTime($object->planned_workload,'allhourmin').'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (empty($withproject))
|
||||
{
|
||||
@ -300,6 +297,30 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="3">';
|
||||
print dol_print_date($object->date_start,'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td colspan="3">';
|
||||
print dol_print_date($object->date_end,'dayhour');
|
||||
print '</td></tr>';
|
||||
|
||||
// Planned workload
|
||||
print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td colspan="3">'.convertSecondToTime($object->planned_workload,'allhourmin').'</td></tr>';
|
||||
|
||||
// Declared progress
|
||||
print '<tr><td>'.$langs->trans("ProgressDeclared").'</td><td colspan="3">';
|
||||
print $object->progress.' %';
|
||||
print '</td></tr>';
|
||||
|
||||
// Calculated progress
|
||||
print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td colspan="3">';
|
||||
if ($object->planned_workload) print round(100 * $object->duration_effective / $object->planned_workload,2).' %';
|
||||
else print '';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user