Oubli sur option PROJECT_HIDE_TASKS
This commit is contained in:
parent
c6bfc15031
commit
e0f86f0270
@ -364,6 +364,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$total_ht_by_third=0;
|
$total_ht_by_third=0;
|
||||||
$total_ttc_by_third=0;
|
$total_ttc_by_third=0;
|
||||||
}
|
}
|
||||||
|
$saved_third_id = $element->thirdparty->id;
|
||||||
|
|
||||||
$qualifiedfortotal=true;
|
$qualifiedfortotal=true;
|
||||||
if ($key == 'invoice')
|
if ($key == 'invoice')
|
||||||
@ -449,6 +450,8 @@ foreach ($listofreferent as $key => $value)
|
|||||||
$breakline.='<td></td>';
|
$breakline.='<td></td>';
|
||||||
$breakline.='</tr>';
|
$breakline.='</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//var_dump($element->thirdparty->name.' - '.$saved_third_id.' - '.$element->thirdparty->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($breakline) print $breakline;
|
if ($breakline) print $breakline;
|
||||||
|
|||||||
@ -155,31 +155,33 @@ print "</table>";
|
|||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
// Tasks for all resources of all opened projects and time spent for each task/resource
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
print '<div class="fichecenter">';
|
|
||||||
|
|
||||||
$max = (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA);
|
|
||||||
|
|
||||||
$sql = "SELECT p.ref, p.title, p.rowid as projectid, t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid";
|
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid";
|
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
|
||||||
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
|
||||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
|
||||||
$sql.= " AND p.fk_statut=1";
|
|
||||||
$sql.= " GROUP BY p.ref, p.title, p.rowid, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee";
|
|
||||||
$sql.= " ORDER BY t.rowid, t.dateo, t.datee";
|
|
||||||
$sql.= $db->plimit($max+1); // We want more to know if we have more than limit
|
|
||||||
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ( $resql )
|
|
||||||
{
|
{
|
||||||
|
// Tasks for all resources of all opened projects and time spent for each task/resource
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
|
$max = (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA);
|
||||||
|
|
||||||
|
$sql = "SELECT p.ref, p.title, p.rowid as projectid, t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid";
|
||||||
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
|
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||||
|
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||||
|
$sql.= " AND p.fk_statut=1";
|
||||||
|
$sql.= " GROUP BY p.ref, p.title, p.rowid, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee";
|
||||||
|
$sql.= " ORDER BY t.rowid, t.dateo, t.datee";
|
||||||
|
$sql.= $db->plimit($max+1); // We want more to know if we have more than limit
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ( $resql )
|
||||||
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
@ -265,15 +267,15 @@ if ( $resql )
|
|||||||
|
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user