diff --git a/include/projekt.class.php b/include/projekt.class.php index 06c67d865..beb2db736 100755 --- a/include/projekt.class.php +++ b/include/projekt.class.php @@ -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))