project list for zeitaufzeichnung fixed: if project or project phase ends on current day, it is shown. If there is a project phase which has not ended, the corresponding project is shown regardless of whether the project has already ended.

This commit is contained in:
alex
2017-10-25 17:47:23 +02:00
parent 888fba9a37
commit 2273781fe6
+11 -3
View File
@@ -374,7 +374,7 @@ class projekt extends basis_db
JOIN fue.tbl_projekt_ressource USING(ressource_id)
JOIN fue.tbl_projekt USING(projekt_kurzbz)
WHERE (beginn<=now() or beginn is null)
AND (ende>=now() OR ende is null)
AND (ende + interval '1' day >=now() OR ende is null)
AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid);
if ($projektphasen == true)
@@ -387,8 +387,16 @@ class projekt extends basis_db
JOIN fue.tbl_projekt USING (projekt_kurzbz)
JOIN fue.tbl_projekt_ressource USING (projektphase_id)
JOIN fue.tbl_ressource ON (tbl_ressource.ressource_id=tbl_projekt_ressource.ressource_id)
WHERE (tbl_projekt.beginn<=now() or tbl_projekt.beginn is null)
AND (tbl_projekt.ende>=now() OR tbl_projekt.ende is null OR 1=1)
WHERE
(
(
(tbl_projekt.beginn<=now() or tbl_projekt.beginn is null)
AND (tbl_projekt.ende + interval '1' day >=now() OR tbl_projekt.ende is null)
) OR (
(tbl_projektphase.start<=now() or tbl_projektphase.start is null)
AND (tbl_projektphase.ende + interval '1' day >=now() OR tbl_projektphase.ende is null)
)
)
AND mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid);
if ($result = $this->db_query($qry))