/**
  * Lista las solicitudes capturadas por el usuario
  *
  * @return Response
  */
 public function index($scope = null)
 {
     if ($scope == 'presupuesto') {
         $filtro = new FiltroEstatusResponsable();
         $filtro->filtroSolicitudes();
         $solicitudes = Solicitud::estatusResponsable($filtro->arr_estatus, $filtro->arr_responsable)->orderBy('id', 'DESC')->get();
     } else {
         $solicitudes = Solicitud::MisSolicitudes()->orderBy('id', 'DESC')->get();
     }
     $solicitudes->load('urg');
     $solicitudes->load('benef');
     return view('solicitudes.indexSolicitud', compact('solicitudes'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($scope = null)
 {
     if ($scope == 'suministros' || $scope == 'presupuesto') {
         $filtro = new FiltroEstatusResponsable();
         $filtro->filtroReqs();
         $reqs = Req::estatusResponsable($filtro->arr_estatus, $filtro->arr_responsable)->orderBy('req', 'DESC')->get();
     } elseif ($scope == 'seguimiento') {
         $reqs = Req::seguimiento()->get();
     } else {
         $reqs = Req::misReqs()->orderBy('req', 'DESC')->get();
     }
     $reqs->load('proyecto.urg');
     $reqs->load('proyecto.fondos');
     $reqs->load('user');
     return view('reqs.indexReq', compact('reqs'));
 }
示例#3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($scope = null)
 {
     $presupuesto = \Session::get('sel_presupuesto');
     //Determina Acciones Unidad de Presupuesto
     $user = \Auth::user();
     $arr_roles = $user->roles()->lists('role_name')->all();
     if (array_search('Ejecutora', $arr_roles) !== false || array_search('Presupuesto', $arr_roles) !== false) {
         $acciones_presupuesto = true;
     } else {
         $acciones_presupuesto = false;
     }
     if ($scope == 'asignados') {
         $filtro = new FiltroEstatusResponsable();
         $filtro->filtroEgresos();
         $egresos = Egreso::estatusResponsable($filtro->arr_estatus, $filtro->arr_responsable)->withTrashed()->with('benef', 'proyectos.fondos', 'cuentaBancaria', 'user', 'ocs', 'solicitudes')->orderBy('fecha', 'DESC')->paginate(100);
     } else {
         $egresos = Egreso::where('fecha', '>=', $presupuesto . '-01-01')->withTrashed()->with('benef', 'proyectos.fondos', 'cuentaBancaria', 'user', 'ocs', 'solicitudes')->orderBy('fecha', 'DESC')->paginate(100);
     }
     return view('egresos.indexEgresos', compact('egresos', 'acciones_presupuesto'));
 }