/** * @param Boleto $boleto * @return int */ public function getDigitoVerificadorCodigoBarras(Boleto $boleto) { $numero = $this->getCodigo() . $boleto->getNumeroMoeda() . $boleto->getFatorVencimento() . $boleto->getValorBoletoSemVirgula() . $this->getCampoLivre($boleto) . $this->getDvCampoLivre($boleto); return $this->tratarRestoDigitoVerificadorGeral(Modulo::modulo11($numero, 9, 1)); }
/** * @param Boleto $boleto * @return string */ public function getLinha(Boleto $boleto) { return $this->getCodigo() . $boleto->getNumeroMoeda() . $boleto->getDigitoVerificadorCodigoBarras() . $boleto->getFatorVencimento() . $boleto->getValorBoletoSemVirgula() . $boleto->getCedente()->getAgencia() . $boleto->getNossoNumeroSemDigitoVerificador() . Numero::formataNumero($boleto->getCedente()->getConta(), 7, 0) . "0"; }