Commit b472d720bd5357f0353ce1d24d2771d80acf5b89
1 parent
1420b6c02e
Exists in
master
corrige el error de no mostrar el nombre del escalafon al que se esta solicitando el acta de defensa
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
src/AppBundle/Controller/AscensoController.php
... | ... | @@ -505,7 +505,9 @@ class AscensoController extends Controller |
505 | 505 | return $this->redirect($this->generateUrl('cea_index')); |
506 | 506 | } |
507 | 507 | |
508 | - | |
508 | +$ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy( | |
509 | + array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idEstatus' => 1) | |
510 | +); | |
509 | 511 | $solicitudDefensa = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( |
510 | 512 | array( |
511 | 513 | 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), |
... | ... | @@ -561,7 +563,7 @@ class AscensoController extends Controller |
561 | 563 | 'solicitudes/acta_defensa.html.twig', |
562 | 564 | array( |
563 | 565 | 'form' => $form->createView(), |
564 | - 'tipo' => 'Ascenso ' . $solicitudDefensa->getIdEscalafones()->getNombre() | |
566 | + 'tipo' => 'Ascenso ' . $ascenso->getIdEscalafones()->getNombre() | |
565 | 567 | ) |
566 | 568 | ); |
567 | 569 | |
... | ... | @@ -702,7 +704,7 @@ class AscensoController extends Controller |
702 | 704 | $escala_docente = new DocenteEscala(); |
703 | 705 | $escala_docente->setIdRolInstitucion($servicio->getIdRolInstitucion()); |
704 | 706 | $escala_docente->setidEscala($this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById($this->get('request')->request->get('escala'))); |
705 | - $escala_docente->setFechaEscala(new \DateTime($this->get('request')->request->get('fecha_escala'))); | |
707 | + $escala_docente->setFechaEscala($this->get('request')->request->get('fecha_escala')); | |
706 | 708 | $escala_docente->setIdTipoEscala($this->getDoctrine()->getRepository('AppBundle:TipoAscenso')->findOneById($this->get('request')->request->get('tipo'))); |
707 | 709 | $em->persist($escala_docente); |
708 | 710 | ... | ... |