Code Duplication    Length = 3-6 lines in 2 locations

programs/utilit/statistics.class.php 1 location

@@ 160-162 (lines=3) @@
157
		$types = array();
158
159
		$organization = '';
160
		if(isset($this->filter['organization']) && $this->filter['organization']){
161
			$organization = 'AND p.id_organization='.$babDB->quote($this->filter['organization']);
162
		}
163
164
		$res = $babDB->db_query('
165
			SELECT

programs/utilit/entry.class.php 1 location

@@ 2676-2681 (lines=6) @@
2673
				$where[] = 'YEAR(e.date_begin)='.$babDB->quote($this->year);
2674
			}
2675
2676
			if (isset($this->organization) && $this->organization)
2677
			{
2678
				$req .= ', absences_personnel p';
2679
				$where[] = 'e.id_user=p.id_user';
2680
				$where[] = 'p.id_organization='.$babDB->quote($this->organization);
2681
			}
2682
2683
			if (isset($this->archived))
2684
			{