/**
  * Devuelve el listado de solicitudes que han sido asignadas a la empresa como parte de las ventas (Proveedores)
  * 
  * @return Response
  */
 public function verVentasJSONAction()
 {
     $user = $this->get('security.context')->getToken()->getUser();
     $solLocalDetDao = new SolLocalDetDao($this->getDoctrine());
     $registros = array();
     if ($user->getEntidad() != null) {
         $registros = $solLocalDetDao->getVentasLocalesDetByEntidad($user->getEntidad()->getEntId());
     }
     $numfilas = count($registros);
     if ($numfilas != 0) {
         $solLocal = new SolLocal();
         $i = 0;
         foreach ($registros as $ent) {
             $solLocal->setSolLocalFecha($ent['solLocalFecha']);
             $solLocal->setAuditDateIns($ent['auditDateIns']);
             if ($ent['entHabilitado'] == false || $ent['HAB'] == 0) {
                 $registros[$i]['estNombre'] = SolLocal::$BLOQUEADA;
             }
             $registros[$i]['solLocalFechaText'] = $solLocal->getSolLocalFechaText();
             $registros[$i]['auditDateInsText'] = $solLocal->getAuditDateInsText();
             $i = $i + 1;
         }
     }
     $datos = json_encode($registros);
     $pages = floor($numfilas / 10) + 1;
     $jsonresponse = '{
            "page":"1",
            "total":"' . $pages . '",
            "records":"' . $numfilas . '", 
            "rows":' . $datos . '}';
     $response = new Response($jsonresponse);
     $response->headers->set('Content-Type', 'application/json');
     return $response;
 }
 public function delSolLocal(SolLocal $solLocal)
 {
     if (!$solLocal) {
         throw $this->createNotFoundException('No se encontro entidad con ese id ' . $solLocal->getSolLocalId());
     }
     //$this->em->remove($entidad);
     $this->em->flush();
     $matrizMensajes = array('El proceso de eliminar termino con exito', 'SolLocal ' . $solLocal->getSolLocalId());
     return $matrizMensajes;
 }