public function listado($terceros = null)
 {
     if (is_null($terceros)) {
         $terceros = Tercero::orderBy('nombre', 'ASC')->paginate();
     }
     return View::make('terceros.listado', compact('terceros'));
 }
示例#2
0
            $operation['message'] = "Se encontraron " . count($operation['result']) . " registros.";
        } else {
            $operation['message'] = "No se encuentran registros con los parametros ingresados.";
        }
        echo json_encode($operation);
    }
    if ($get->instanciar) {
        $get->tipo = base64_decode($get->tipo);
        $conexion = new Conexion();
        if ($get->tipo == "NATURAL") {
            $get->numero_documento = base64_decode($get->numero_documento);
            $tercero = new Tercero();
            $tercero->instanciarSubID($get->numero_documento, $get->tipo, $conexion);
            $_SESSION['tercero'] = serialize($tercero);
            $persona = $tercero->getPersona();
            $operation['message'] = "Se cargo correctamente la información.";
        } else {
            if ($get->tipo == "JURIDICA") {
                $get->nit = base64_decode($get->nit);
                $tercero = new Tercero();
                $tercero->instanciarSubID($get->nit, $get->tipo, $conexion);
                $_SESSION['tercero'] = serialize($tercero);
                $empresa = $tercero->getEmpresa();
                $operation['message'] = "Se cargo correctamente la información.";
            }
        }
        $operation["ejecution"] = true;
        $operation['result'] = true;
        echo json_encode($operation);
    }
}
 /**
  * Show the form for creating a new resource.
  * GET /cuenta/create
  *
  * @return Response
  */
 public function create($id_tercero)
 {
     $tercero = Tercero::find($id_tercero);
     return View::make('cuentas.crear', compact('tercero'));
 }
 public function buscar($documento, $tercero_id)
 {
     $input = Input::all();
     $todos = $input['todos'] == 'false' ? false : true;
     $buscar = $input['buscar'];
     $tercero = Tercero::find($tercero_id);
     $saldos = $this->saldos_en_intervalos($documento, $tercero_id, $todos, $buscar);
     Session::flash('mensaje', 'Mostrando documentos físicos que contienen <strong>' . $buscar . '</strong>');
     return View::make('carteras.listado', compact('documento', 'tercero', 'saldos'));
 }