Loading module/Application/src/Application/Service/PieceJointeService.php +8 −4 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ class PieceJointeService extends AbstractEntityService pjf.annee <= :annee AND (pjf.dateArchive IS NULL OR pjf.dateArchive > :annee) ORDER BY pjf.annee DESC"; "; $lpjf = $this->getEntityManager()->createQuery($dql)->setParameters([ 'intervenant' => $intervenant->getCode(), 'annee' => $intervenant->getAnnee()->getId(), Loading @@ -164,8 +164,12 @@ class PieceJointeService extends AbstractEntityService foreach ($lpjf as $pjf) { $pj = $pjf->getPieceJointe(); $pj->annee = $pjf->getAnnee(); //Gérer les cas où plusieurs PJ sont éligible mais sans date d'archive, on prend la première uniquement. if(!array_key_exists($pj->getType()->getId(), $result)) { $result[$pj->getType()->getId()] = $pj; } } return $result; } Loading Loading
module/Application/src/Application/Service/PieceJointeService.php +8 −4 Original line number Diff line number Diff line Loading @@ -151,8 +151,8 @@ class PieceJointeService extends AbstractEntityService pjf.annee <= :annee AND (pjf.dateArchive IS NULL OR pjf.dateArchive > :annee) ORDER BY pjf.annee DESC"; "; $lpjf = $this->getEntityManager()->createQuery($dql)->setParameters([ 'intervenant' => $intervenant->getCode(), 'annee' => $intervenant->getAnnee()->getId(), Loading @@ -164,8 +164,12 @@ class PieceJointeService extends AbstractEntityService foreach ($lpjf as $pjf) { $pj = $pjf->getPieceJointe(); $pj->annee = $pjf->getAnnee(); //Gérer les cas où plusieurs PJ sont éligible mais sans date d'archive, on prend la première uniquement. if(!array_key_exists($pj->getType()->getId(), $result)) { $result[$pj->getType()->getId()] = $pj; } } return $result; } Loading