Пример #1
0
 public function verPDF()
 {
     $Correspondencia = Request::get('correspondencia');
     $OficioSaliente = Correspondencia::join('oficio_saliente', 'IdCorrespondencia', '=', 'oficio_saliente.Correspondencia_Id')->where('correspondencia.IdCorrespondencia', $Correspondencia)->first();
     $pathToFile = public_path() . '/' . $OficioSaliente->URLPDF;
     $name = 'OficioSaliente_' . $OficioSaliente->IdConsecutivo . '_' . $OficioSaliente->FechaEntrega . '.pdf';
     $headers = array('Content-Type' => 'application/pdf');
     //Cambio de estátus a Visto
     return Response::download($pathToFile, $name, $headers);
 }
Пример #2
0
 public function direccion_index()
 {
     $correspondencia = Correspondencia::join('usuario_turna_correspondencia', 'IdCorrespondencia', '=', 'usuario_turna_correspondencia.Correspondencia_Id')->join('usuario', 'usuario_turna_correspondencia.UTC_TurnarA_Id', '=', 'usuario.IdUsuario')->join('oficio_entrante', 'correspondencia.IdCorrespondencia', '=', 'oficio_entrante.Correspondencia_Id')->leftJoin('oficio_saliente', 'correspondencia.IdCorrespondencia', '=', 'oficio_saliente.Correspondencia_Id')->leftJoin('memorandum', 'correspondencia.IdCorrespondencia', '=', 'memorandum.Correspondencia_Id')->join('tipo', 'usuario_turna_correspondencia.Tipo_Id', '=', 'tipo.IdTipo')->join('dependencia', 'oficio_entrante.DependenciaEmite', '=', 'dependencia.IdDependencia')->join('estatus', 'correspondencia.Estatus_Id', '=', 'estatus.IdEstatus')->orderBy('correspondencia.IdCorrespondencia', 'desc')->where('usuario_turna_correspondencia.UTC_TurnarA_Id', Auth::user()->IdUsuario)->get();
     return View::make('direccion.direccion_index', array('correspondencia' => $correspondencia));
 }
Пример #3
0
 public function direccion_turnarA()
 {
     $correspondencia = Request::get('oficioentrante');
     $IdOficio = Correspondencia::join('oficio_entrante', 'IdCorrespondencia', '=', 'oficio_entrante.Correspondencia_Id')->where('IdCorrespondencia', $correspondencia)->first();
     $usuario = Usuario::where('IdUsuario', Auth::user()->IdUsuario)->first();
     $people = Usuario::where('Area_Id', $usuario->Area_Id)->get();
     $sPeople = Usuario::where('Cargo_Id', 4)->get();
     $jPeople = Usuario::where('Cargo_Id', 5)->get();
     return View::make('oficios.direccion_turnarA', array('people' => $people, 'IdCorrespondencia' => $correspondencia, 'IdOficio' => $IdOficio, 'sPeople' => $sPeople, 'jPeople' => $jPeople));
 }