public function BottomBB($i) { $this->SetDrawColor('00', '00', '80'); $this->Image($this->logoPath . $this->boleto[$i]->getBanco() . '.png', 20, $this->GetY() - 2, 28); $this->Cell(29, 6, '', ''); $this->SetFont('', '', 13); $this->Cell(15, 6, $this->boleto[$i]->getBanco(true), 'LR', 0, 'C'); $this->SetFont('', '', 10); $this->Cell(0, 6, $this->boleto[$i]->getLinha(), '', 1, 'R'); $this->Ln(1); $this->risco(); $this->Ln(1); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(120, $this->desc, $this->_('Local de pagamento'), ''); $x = $this->GetX(); $y = $this->GetY(); $this->Cell(50, $this->desc, $this->_('Vencimento'), '', 1, 'L', true); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(120, $this->cell, $this->_($this->boleto[$i]->getLocalPagamento()), ''); $this->Cell(50, $this->cell, $this->_($this->boleto[$i]->getDataVencimento()->format('d/m/Y')), '', 1, 'R', true); $this->riscoBB($x, $y); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(120, $this->desc, $this->_('Beneficiário'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('Agência/Código beneficiário'), 'T', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(120, $this->cell, $this->_($this->boleto[$i]->getCedenteNome()), ''); $this->Cell(50, $this->cell, $this->_($this->boleto[$i]->getBanco(true)), '', 1, ''); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(30, $this->desc, $this->_('Data do documento'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(40, $this->desc, $this->_('Número do documento'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(15, $this->desc, $this->_('Espécie Doc.'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(10, $this->desc, $this->_('Aceite'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(25, $this->desc, $this->_('Data processamento'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('Nosso número'), 'T', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(30, $this->cell, $this->_($this->boleto[$i]->getDataDocumento()->format('d/m/Y')), ''); $this->Cell(40, $this->cell, $this->_($this->boleto[$i]->getNumero()), ''); $this->Cell(15, $this->cell, $this->_($this->boleto[$i]->getEspecieDocumento()), ''); $this->Cell(10, $this->cell, $this->_($this->boleto[$i]->getAceite()), ''); $this->Cell(25, $this->cell, $this->_($this->boleto[$i]->getDataProcessamento()->format('d/m/Y')), ''); $this->Cell(50, $this->cell, $this->_($this->boleto[$i]->getNossoNumero()), '', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); $x = $this->GetX(); $y = $this->GetY(); $this->Cell(30, $this->desc, $this->_('Uso do Banco'), 'T', 0, '', true); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(25, $this->desc, $this->_('Carteira'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(12, $this->desc, $this->_('Espécie'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(28, $this->desc, $this->_('Quantidade'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(25, $this->desc, $this->_('Valor Documento'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('Valor Documento'), 'T', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(30, $this->cell, $this->_(''), '', 0, '', true); $this->riscoBB($x, $y); $this->Cell(25, $this->cell, $this->_($this->boleto[$i]->getCarteira()), ''); $this->Cell(12, $this->cell, $this->_('R$'), ''); $this->Cell(28, $this->cell, $this->_('1'), ''); $this->Cell(25, $this->cell, $this->_(Util::nReal($this->boleto[$i]->getValor())), ''); $this->Cell(50, $this->cell, $this->_(Util::nReal($this->boleto[$i]->getValor())), '', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->desc, $this->_('Instruções (Texto de responsabilidade do beneficiário)'), 'T'); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('(-) Desconto / Abatimentos)'), 'T', 1); $xInstrucoes = $this->GetX(); $yInstrucoes = $this->GetY(); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->cell, $this->_(''), ''); $this->Cell(50, $this->cell, $this->_(''), '', 1); $this->Cell(120, $this->desc, $this->_(''), ''); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('(-) Outras deduções'), 'T', 1); $this->Cell(120, $this->cell, $this->_(''), ''); $this->Cell(50, $this->cell, $this->_(''), '', 1); $this->Cell(120, $this->desc, $this->_(''), ''); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('(+) Mora / Multa'), 'T', 1); $this->Cell(120, $this->cell, $this->_(''), ''); $this->Cell(50, $this->cell, $this->_(''), '', 1); $this->Cell(120, $this->desc, $this->_(''), ''); $this->riscoBB($this->GetX(), $this->GetY()); $this->Cell(50, $this->desc, $this->_('(+) Outros acréscimos'), 'T', 1); $this->Cell(120, $this->cell, $this->_(''), ''); $this->Cell(50, $this->cell, $this->_(''), '', 1); $this->Cell(120, $this->desc, $this->_(''), ''); $x = $this->GetX(); $y = $this->GetY(); $this->Cell(50, $this->desc, $this->_('(=) Valor cobrado'), 'T', 1, '', true); $this->Cell(120, $this->cell, $this->_(''), 'B'); $this->Cell(50, $this->cell, $this->_(''), 'B', 1, '', true); $this->riscoBB($x, $y); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->riscoBB($this->GetX(), $this->GetY(), 18); $this->Cell(0, $this->desc, $this->_('Pagador'), '', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(0, $this->cell, $this->_($this->boleto[$i]->getSacadoNome()), '', 1); $this->Cell(0, $this->cell, $this->_($this->boleto[$i]->getSacadoEndereco()), '', 1); $this->Cell(0, $this->cell, $this->_($this->boleto[$i]->getSacadoCidadeUF()), '', 1); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->cell, $this->_('Pagador/Avalista'), 'TB'); $this->riscoBB($this->GetX(), $this->GetY(), 3); $this->Cell(12, $this->cell, $this->_('Cód. Baixa'), 'BT'); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(38, $this->cell, $this->_($this->boleto[$i]->getCodigoBaixa()), 'BT', 1); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(118, $this->desc, $this->_(''), 0); $this->Cell(52, $this->desc, $this->_('Autenticação mecânica - Ficha de Compensação'), 0, 1); $xOriginal = $this->GetX(); $yOriginal = $this->GetY(); if (count($this->boleto[$i]->getInstrucoes()) > 0) { $this->SetXY($xInstrucoes, $yInstrucoes); $this->Ln(1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); foreach ($this->boleto[$i]->getInstrucoes() as $in) { $this->Cell(0, $this->cell, $this->_($in), 0, 1); } } $this->SetXY($xOriginal, $yOriginal); return $this; }
/** * Return Boleto Array. * * @return array */ public function toArray() { return array_merge(['linha_digitavel' => $this->getLinhaDigitavel(), 'codigo_barras' => $this->getCodigoBarras(), 'beneficiario' => $this->getBeneficiario()->getNome(), 'beneficiario_nome_documento' => $this->getBeneficiario()->getNomeDocumento(), 'beneficiario_cpf_cnpj' => $this->getBeneficiario()->getDocumento(), 'beneficiario_endereco1' => $this->getBeneficiario()->getEndereco(), 'beneficiario_endereco2' => $this->getBeneficiario()->getCepCidadeUf(), 'logo_base64' => $this->getLogoBase64(), 'logo' => $this->getLogo(), 'logo_banco_base64' => $this->getLogoBancoBase64(), 'logo_banco' => $this->getLogoBanco(), 'codigo_banco_com_dv' => $this->getCodigoBancoComDv(), 'especie' => 'R$', 'quantidade' => $this->getQuantidade(), 'data_vencimento' => $this->getDataVencimento()->format('d/m/Y'), 'data_processamento' => $this->getDataProcessamento()->format('d/m/Y'), 'data_documento' => $this->getDataDocumento()->format('d/m/Y'), 'valor_documento' => Util::nReal($this->getValor(), 2, false), 'desconto_abatimento' => Util::nReal($this->getDescontosAbatimentos(), 2, false), 'outras_deducoes' => Util::nReal($this->getOutrasDeducoes(), 2, false), 'multa' => Util::nReal($this->getMulta(), 2, false), 'juros' => Util::nReal($this->getMulta(), 2, false), 'outros_acrescimos' => Util::nReal($this->getOutrosAcrescimos(), 2, false), 'valor_cobrado' => Util::nReal($this->getValorCobrado(), 2, false), 'valor_unitario' => Util::nReal($this->getValorUnitario(), 2, false), 'sacador_avalista' => $this->getSacadorAvalista() ? $this->getSacadorAvalista()->getNomeDocumento() : null, 'pagador' => $this->getPagador()->getNome(), 'pagador_nome_documento' => $this->getPagador()->getNomeDocumento(), 'pagador_documento' => $this->getPagador()->getDocumento(), 'pagador_endereco1' => $this->getPagador()->getEndereco(), 'pagador_endereco2' => $this->getPagador()->getCepCidadeUf(), 'demonstrativo' => array_slice((array) $this->getDescricaoDemonstrativo() + [null, null, null, null, null], 0, 5), 'instrucoes' => array_slice((array) $this->getInstrucoes() + [null, null, null, null, null, null, null, null], 0, 8), 'local_pagamento' => $this->getLocalPagamento(), 'numero_documento' => $this->getNumeroDocumento(), 'agencia_codigo_beneficiario' => $this->getAgenciaCodigoBeneficiario(), 'nosso_numero' => $this->getNossoNumero(), 'nosso_numero_boleto' => $this->getNossoNumeroBoleto(), 'especie_doc' => $this->getEspecieDoc(), 'especie_doc_cod' => $this->getEspecieDocCodigo(), 'aceite' => $this->getAceite(), 'carteira' => $this->getCarteiraNome(), 'uso_banco' => $this->getUsoBanco()], $this->variaveis_adicionais); }
/** * @param integer $i * * @return $this */ protected function Bottom($i) { $this->Image($this->boleto[$i]->getLogoBanco(), 20, $this->GetY() - 2, 28); $this->Cell(29, 6, '', 'B'); $this->SetFont($this->PadraoFont, 'B', 13); $this->Cell(15, 6, $this->boleto[$i]->getCodigoBancoComDv(), 'LBR', 0, 'C'); $this->SetFont($this->PadraoFont, 'B', 10); $this->Cell(0, 6, $this->boleto[$i]->getLinhaDigitavel(), 'B', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->desc, $this->_('Local de pagamento'), 'TLR'); $this->Cell(50, $this->desc, $this->_('Vencimento'), 'TR', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(120, $this->cell, $this->_($this->boleto[$i]->getLocalPagamento()), 'LR'); $this->Cell(50, $this->cell, $this->_($this->boleto[$i]->getDataVencimento()->format('d/m/Y')), 'R', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->desc, $this->_('Beneficiário'), 'TLR'); $this->Cell(50, $this->desc, $this->_('Agência/Código beneficiário'), 'TR', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(120, $this->cell, $this->_($this->boleto[$i]->getBeneficiario()->getNomeDocumento()), 'LR'); $this->Cell(50, $this->cell, $this->_($this->boleto[$i]->getAgenciaCodigoBeneficiario()), 'R', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(30, $this->desc, $this->_('Data do documento'), 'TLR'); $this->Cell(40, $this->desc, $this->_('Número do documento'), 'TR'); $this->Cell(15, $this->desc, $this->_('Espécie Doc.'), 'TR'); $this->Cell(10, $this->desc, $this->_('Aceite'), 'TR'); $this->Cell(25, $this->desc, $this->_('Data processamento'), 'TR'); $this->Cell(50, $this->desc, $this->_('Nosso número'), 'TR', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(30, $this->cell, $this->_($this->boleto[$i]->getDataDocumento()->format('d/m/Y')), 'LR'); $this->Cell(40, $this->cell, $this->_($this->boleto[$i]->getNumeroDocumento()), 'R'); $this->Cell(15, $this->cell, $this->_($this->boleto[$i]->getEspecieDoc()), 'R'); $this->Cell(10, $this->cell, $this->_($this->boleto[$i]->getAceite()), 'R'); $this->Cell(25, $this->cell, $this->_($this->boleto[$i]->getDataProcessamento()->format('d/m/Y')), 'R'); $this->Cell(50, $this->cell, $this->_($this->boleto[$i]->getNossoNumeroBoleto()), 'R', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); if (isset($this->boleto[$i]->variaveis_adicionais['esconde_uso_banco']) && $this->boleto[$i]->variaveis_adicionais['esconde_uso_banco']) { $this->Cell(55, $this->desc, $this->_('Carteira'), 'TLR'); } else { $cip = isset($this->boleto[$i]->variaveis_adicionais['mostra_cip']) && $this->boleto[$i]->variaveis_adicionais['mostra_cip']; $this->Cell($cip ? 23 : 30, $this->desc, $this->_('Uso do Banco'), 'TLR'); if ($cip) { $this->Cell(7, $this->desc, $this->_('CIP'), 'TLR'); } $this->Cell(25, $this->desc, $this->_('Carteira'), 'TR'); } $this->Cell(12, $this->desc, $this->_('Espécie'), 'TR'); $this->Cell(28, $this->desc, $this->_('Quantidade'), 'TR'); $this->Cell(25, $this->desc, $this->_('Valor Documento'), 'TR'); $this->Cell(50, $this->desc, $this->_('Valor Documento'), 'TR', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); if (isset($this->boleto[$i]->variaveis_adicionais['esconde_uso_banco']) && $this->boleto[$i]->variaveis_adicionais['esconde_uso_banco']) { $this->TextFitCell(55, $this->cell, $this->_($this->boleto[$i]->getCarteiraNome()), 'LR', 0, 'L'); } else { $cip = isset($this->boleto[$i]->variaveis_adicionais['mostra_cip']) && $this->boleto[$i]->variaveis_adicionais['mostra_cip']; $this->Cell($cip ? 23 : 30, $this->cell, $this->_(''), 'LR'); if ($cip) { $this->Cell(7, $this->cell, $this->_($this->boleto[$i]->getCip()), 'LR'); } $this->Cell(25, $this->cell, $this->_(strtoupper($this->boleto[$i]->getCarteiraNome())), 'R'); } $this->Cell(12, $this->cell, $this->_('R$'), 'R'); $this->Cell(28, $this->cell, $this->_('1'), 'R'); $this->Cell(25, $this->cell, $this->_(Util::nReal($this->boleto[$i]->getValor())), 'R'); $this->Cell(50, $this->cell, $this->_(Util::nReal($this->boleto[$i]->getValor())), 'R', 1, 'R'); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->desc, $this->_('Instruções (Texto de responsabilidade do beneficiário)'), 'TLR'); $this->Cell(50, $this->desc, $this->_('(-) Desconto / Abatimentos)'), 'TR', 1); $xInstrucoes = $this->GetX(); $yInstrucoes = $this->GetY(); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->cell, $this->_(''), 'LR'); $this->Cell(50, $this->cell, $this->_(''), 'R', 1); $this->Cell(120, $this->desc, $this->_(''), 'LR'); $this->Cell(50, $this->desc, $this->_('(-) Outras deduções'), 'TR', 1); $this->Cell(120, $this->cell, $this->_(''), 'LR'); $this->Cell(50, $this->cell, $this->_(''), 'R', 1); $this->Cell(120, $this->desc, $this->_(''), 'LR'); $this->Cell(50, $this->desc, $this->_('(+) Mora / Multa'), 'TR', 1); $this->Cell(120, $this->cell, $this->_(''), 'LR'); $this->Cell(50, $this->cell, $this->_(''), 'R', 1); $this->Cell(120, $this->desc, $this->_(''), 'LR'); $this->Cell(50, $this->desc, $this->_('(+) Outros acréscimos'), 'TR', 1); $this->Cell(120, $this->cell, $this->_(''), 'LR'); $this->Cell(50, $this->cell, $this->_(''), 'R', 1); $this->Cell(120, $this->desc, $this->_(''), 'LR'); $this->Cell(50, $this->desc, $this->_('(=) Valor cobrado'), 'TR', 1); $this->Cell(120, $this->cell, $this->_(''), 'BLR'); $this->Cell(50, $this->cell, $this->_(''), 'BR', 1); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(0, $this->desc, $this->_('Pagador'), 'LR', 1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(0, $this->cell, $this->_($this->boleto[$i]->getPagador()->getNomeDocumento()), 'LR', 1); $this->Cell(0, $this->cell, $this->_($this->boleto[$i]->getPagador()->getEndereco()), 'LR', 1); $this->Cell(0, $this->cell, $this->_($this->boleto[$i]->getPagador()->getCepCidadeUf()), 'LR', 1); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(120, $this->cell, $this->_(''), 'BLR'); $this->Cell(12, $this->cell, $this->_('Cód. Baixa'), 'B'); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->Cell(38, $this->cell, $this->_(''), 'BR', 1); $this->SetFont($this->PadraoFont, '', $this->fdes); $this->Cell(20, $this->desc, $this->_('Sacador/Avalista'), 0); $this->Cell(98, $this->desc, $this->_($this->boleto[$i]->getSacadorAvalista() ? $this->boleto[$i]->getSacadorAvalista()->getNomeDocumento() : ''), 0); $this->Cell(52, $this->desc, $this->_('Autenticação mecânica - Ficha de Compensação'), 0, 1); $xOriginal = $this->GetX(); $yOriginal = $this->GetY(); if (count($this->boleto[$i]->getInstrucoes()) > 0) { $this->SetXY($xInstrucoes, $yInstrucoes); $this->Ln(1); $this->SetFont($this->PadraoFont, 'B', $this->fcel); $this->listaLinhas($this->boleto[$i]->getInstrucoes(), 0); $this->SetXY($xOriginal, $yOriginal); } return $this; }