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

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