private function GeraAgrupamento($SomenteCr, $SomenteEx, $SomenteCO) {


	//Gera o filtro referente aos lançamentos que serão agrupados
	$this->MontaFiltroAgrupamento($SomenteCr, $SomenteEx, $SomenteCO);

	$ObjAgrupamento = new CArupamento();

	if ($this->getCodEmpresaDoGrupoEnvioBoleto())
	    $this->setCodEmp($this->getCodEmpresaDoGrupoEnvioBoleto());

	if ($ObjAgrupamento->VerificaListaLancamentos(TRUE, TRUE, $this->getTransacao())) {
	    if (unserialize($_SESSION['ArrayAgrup'])->GravaAgrupamento($this->getArrayInfoCrCodTransCRParcelamento(), $this->getCodEmp(), $this->getValor(), false, $this->getTransacao())) {
		unset($_SESSION['ArrayAgrup']);
		return true;
	    } else {
		$this->setStatusOperacao(true);
		$this->Msg($ObjAgrupamento->getMotivoErro());
		return false;
	    }
	} else {
	    $this->setMsg($ObjAgrupamento->getMotivoErro() . "\n\n Erro ao gerar agrupamento referente ao fechamento " . $this->getCodFechamentoSigmo() . "\nEmp:" . $this->getCodEmp() . " ID:" . $this->getIdFechamento());
	    $this->setStatusOperacao(true);
	    return false;
	}

	$this->setMsg($ObjAgrupamento->getMotivoErro());
    }
    public function Agrupar() {
	$ObjAgrupamento = new CArupamento();
	if ($ObjAgrupamento->VerificaListaLancamentos()) {
	    echo 1;
	    exit();
	} else {
	    echo $ObjAgrupamento->getMotivoErro();
	    exit();
	}
    }