Add FIXME
This commit is contained in:
parent
bf4b99fa64
commit
c0e93a17da
@ -419,6 +419,7 @@ if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
|
||||
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
|
||||
if ($socid > 0) $sql.= ' AND a.fk_soc = '.$socid;
|
||||
// FIXME: We must filter on assignement table
|
||||
if ($usergroup > 0) $sql.= " AND ugu.fk_user = a.fk_user_action";
|
||||
if ($action == 'show_day')
|
||||
{
|
||||
@ -453,6 +454,7 @@ if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
// FIXME: We must filter on assignement table
|
||||
if ($filtera > 0 || $filtert > 0 || $filterd > 0 || $usergroup > 0)
|
||||
{
|
||||
$sql.= " AND (";
|
||||
|
||||
@ -163,6 +163,7 @@ if ($actioncode) $sql.=" AND c.code='".$db->escape($actioncode)."'";
|
||||
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
|
||||
if ($socid > 0) $sql.= " AND s.rowid = ".$socid;
|
||||
// FIXME: We must filter on assignement table
|
||||
if ($usergroup > 0) $sql.= " AND ugu.fk_user = a.fk_user_action";
|
||||
if ($type) $sql.= " AND c.id = ".$type;
|
||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||
@ -170,6 +171,7 @@ if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
// FIXME: We must filter on assignement table
|
||||
if ($filtera > 0 || $filtert > 0 || $filterd > 0 || $usergroup > 0)
|
||||
{
|
||||
$sql.= " AND (";
|
||||
|
||||
@ -335,6 +335,7 @@ if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
|
||||
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
|
||||
if ($socid > 0) $sql.= ' AND a.fk_soc = '.$socid;
|
||||
// FIXME: We must filter on assignement table
|
||||
if ($usergroup > 0) $sql.= " AND ugu.fk_user = a.fk_user_action";
|
||||
if ($action == 'show_day')
|
||||
{
|
||||
@ -369,6 +370,7 @@ if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
// FIXME: We must filter on assignement table
|
||||
if ($filtera > 0 || $filtert > 0 || $filterd > 0 || $usergroup > 0)
|
||||
{
|
||||
$sql.= " AND (";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user