Fix error on sql error (field does not exists)
This commit is contained in:
parent
485dc9a57a
commit
95d5a1088b
@ -143,6 +143,7 @@ class ProjectStats extends Stats
|
|||||||
|
|
||||||
if (! empty($this->userid))
|
if (! empty($this->userid))
|
||||||
$sqlwhere[] = ' t.fk_user_resp=' . $this->userid;
|
$sqlwhere[] = ' t.fk_user_resp=' . $this->userid;
|
||||||
|
// Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project
|
||||||
if (! empty($this->socid))
|
if (! empty($this->socid))
|
||||||
$sqlwhere[] = ' t.fk_soc=' . $this->socid;
|
$sqlwhere[] = ' t.fk_soc=' . $this->socid;
|
||||||
if (! empty($this->year) && empty($this->yearmonth))
|
if (! empty($this->year) && empty($this->yearmonth))
|
||||||
|
|||||||
@ -138,8 +138,9 @@ class TaskStats extends Stats
|
|||||||
|
|
||||||
if (! empty($this->userid))
|
if (! empty($this->userid))
|
||||||
$sqlwhere[] = ' t.fk_user_resp=' . $this->userid;
|
$sqlwhere[] = ' t.fk_user_resp=' . $this->userid;
|
||||||
|
// Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project
|
||||||
if (! empty($this->socid))
|
if (! empty($this->socid))
|
||||||
$sqlwhere[] = ' t.fk_soc=' . $this->socid;
|
$sqlwhere[] = ' p.fk_soc=' . $this->socid; // Link on thirdparty is on project, not on task
|
||||||
if (! empty($this->year) && empty($this->yearmonth))
|
if (! empty($this->year) && empty($this->yearmonth))
|
||||||
$sqlwhere[] = " date_format(t.datec,'%Y')='" . $this->db->escape($this->year) . "'";
|
$sqlwhere[] = " date_format(t.datec,'%Y')='" . $this->db->escape($this->year) . "'";
|
||||||
if (! empty($this->yearmonth))
|
if (! empty($this->yearmonth))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user