Subversion Repositories Applications.gtt

Rev

Rev 90 | Rev 103 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 90 Rev 101
Line 118... Line 118...
118
    	// Récupération du temps de travail pour un utilisateur pour le mois donné
118
    	// Récupération du temps de travail pour un utilisateur pour le mois donné
119
    	$TravailProjet = new TravailProjet();
119
    	$TravailProjet = new TravailProjet();
120
		$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
120
		$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
121
		$param = array($Utilisateur->getIdUtilisateur(), $mois_courant_j1, $mois_courant_j36);
121
		$param = array($Utilisateur->getIdUtilisateur(), $mois_courant_j1, $mois_courant_j36);
122
		$tab_tp = $TravailProjet->consulter($cmd, $param);
122
		$tab_tp = $TravailProjet->consulter($cmd, $param);
123
		if ($tab_tp && count($tab_tp) == 1) {
-
 
124
			$tab_tp = array($tab_tp);
-
 
125
		}
-
 
Line 126... Line 123...
126
		
123
		
127
		if ($tab_tp != false) {
124
		if ($tab_tp != false) {
128
			$tab_projet_id = array();
125
			$tab_projet_id = array();
129
			foreach ($tab_tp as $utp) {
126
			foreach ($tab_tp as $utp) {
Line 136... Line 133...
136
			foreach ($tab_p as $Projet) {
133
			foreach ($tab_p as $Projet) {
137
				// Récupération de la catégorie du projet
134
				// Récupération de la catégorie du projet
138
				$ProjetCategorie = new ProjetCategorie();
135
				$ProjetCategorie = new ProjetCategorie();
139
				$cmd = ProjetCategorie::GPC_ID;
136
				$cmd = ProjetCategorie::GPC_ID;
140
				$param = $Projet->getCeCategorie();
137
				$param = $Projet->getCeCategorie();
141
				$Categorie = $ProjetCategorie->consulter($cmd, $param);
138
				$Categorie = current($ProjetCategorie->consulter($cmd, $param));
Line 142... Line 139...
142
				
139
				
143
				// Nous vérifions le temps de travail pour ce projet
140
				// Nous vérifions le temps de travail pour ce projet
144
				$aso_tps_w = 0;
141
				$aso_tps_w = 0;
145
				if ($tab_tp) {
142
				if ($tab_tp) {
Line 172... Line 169...
172
		//+-------------------------------------------------------------------------------------------------+
169
		//+-------------------------------------------------------------------------------------------------+
173
		// Récupération des motifs d'absence
170
		// Récupération des motifs d'absence
174
		$AbsenceMotif = new AbsenceMotif();
171
		$AbsenceMotif = new AbsenceMotif();
175
		$cmd = AbsenceMotif::GAM_TOUS;
172
		$cmd = AbsenceMotif::GAM_TOUS;
176
		$tab_am = $AbsenceMotif->consulter($cmd);
173
		$tab_am = $AbsenceMotif->consulter($cmd);
177
		if ($tab_am && count($tab_am) == 1) {
-
 
178
			$tab_am = array($tab_am);
-
 
179
		}
-
 
Line 180... Line 174...
180
 
174
 
181
		// Récupération des absences pour un utilisateur à une date donnée
175
		// Récupération des absences pour un utilisateur à une date donnée
182
    	$Absence = new Absence();
176
    	$Absence = new Absence();
183
		$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
177
		$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
184
		$param = array($Utilisateur->getIdUtilisateur(), $mois_courant_j1, $mois_courant_j36);
178
		$param = array($Utilisateur->getIdUtilisateur(), $mois_courant_j1, $mois_courant_j36);
185
		$tab_a = $Absence->consulter($cmd, $param);
-
 
186
		if ($tab_a && count($tab_a) == 1) {
-
 
187
			$tab_a = array($tab_a);
-
 
188
		}
179
		$tab_a = $Absence->consulter($cmd, $param);
189
		if ($tab_a != false) {
180
		if ($tab_a != false) {
190
			$aso_stat['ab_total'] = '';
181
			$aso_stat['ab_total'] = '';
191
			if ($tab_am) {
182
			if ($tab_am) {
192
				foreach ($tab_am as $AM) {
183
				foreach ($tab_am as $AM) {