Commit 617e8d90fb9bf446994e1c48f6f1072bea04d4fc
1 parent
ae3e73029e
Exists in
master
corregido error al buscar ascenso ya aprobado y el ultimo en el orden
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
src/AppBundle/Controller/AscensoController.php
@@ -450,6 +450,13 @@ class AscensoController extends Controller | @@ -450,6 +450,13 @@ class AscensoController extends Controller | ||
450 | 'idRolInstitucion' => $servicio->getIdRolInstitucion(), | 450 | 'idRolInstitucion' => $servicio->getIdRolInstitucion(), |
451 | 'idEstatus' => 2 | 451 | 'idEstatus' => 2 |
452 | )); | 452 | )); |
453 | + | ||
454 | + if(!$ascenso){ | ||
455 | + $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy(array( | ||
456 | + 'idRolInstitucion' => $servicio->getIdRolInstitucion()), | ||
457 | + array('id' => 'DESC') | ||
458 | + ); | ||
459 | + } | ||
453 | 460 | ||
454 | 461 | ||
455 | $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); | 462 | $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); |