forked from fredroo/openboleto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adicionada classe para geração de boletos da Caixa para os convênios …
…SIGCB
- Loading branch information
Lucas Zardo
committed
Mar 23, 2014
1 parent
2ae170b
commit c8d54e7
Showing
9 changed files
with
446 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
* OpenBoleto - Geração de boletos bancários em PHP | ||
* | ||
* LICENSE: The MIT License (MIT) | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this | ||
* software and associated documentation files (the "Software"), to deal in the Software | ||
* without restriction, including without limitation the rights to use, copy, modify, | ||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject to the following | ||
* conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies | ||
* or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
--> | ||
<html lang="pt-BR"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title><?php echo $cedente; ?></title> | ||
<style type="text/css"> | ||
/* Embed the CSS content here */ | ||
<?php include $resource_path . '/css/styles.css' ?> | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div style="width: 666px"> | ||
<div class="noprint info"> | ||
<h2>Instruções de Impressão</h2> | ||
<ul> | ||
<li>Imprima em impressora jato de tinta (ink jet) ou laser em qualidade normal ou alta (Não use modo econômico).</li> | ||
<li>Utilize folha A4 (210 x 297 mm) ou Carta (216 x 279 mm) e margens mínimas à esquerda e à direita do formulário.</li> | ||
<li>Corte na linha indicada. Não rasure, risque, fure ou dobre a região onde se encontra o código de barras.</li> | ||
<li>Caso não apareça o código de barras no final, pressione F5 para atualizar esta tela.</li> | ||
<li>Caso tenha problemas ao imprimir, copie a sequencia numérica abaixo e pague no caixa eletrônico ou no internet banking:</li> | ||
</ul> | ||
<span class="header">Linha Digitável: <?php echo $linha_digitavel; ?></span> | ||
<?php if ($valor_documento) : ?><span class="header">Valor: R$ <?php echo $valor_documento; ?></span><?php endif ?> | ||
<?php if ($pagamento_minimo) : ?><span class="header">Pagamento mínimo: R$ <?php echo $pagamento_minimo; ?></span><?php endif ?> | ||
<br> | ||
<div class="linha-pontilhada" style="margin-bottom: 20px;">Recibo do sacado</div> | ||
</div> | ||
|
||
<div class="info-empresa"> | ||
<?php if ($logotipo) : ?> | ||
<div style="display: inline-block;"> | ||
<img alt="logotipo" src="<?php echo $logotipo; ?>" /> | ||
</div> | ||
<?php endif ?> | ||
</div> | ||
<br> | ||
|
||
<table class="table-boleto" cellpadding="0" cellspacing="0" border="0"> | ||
<tbody> | ||
<tr> | ||
<td valign="bottom" colspan="8" class="noborder nopadding"> | ||
<div class="logocontainer"> | ||
<div class="logobanco"> | ||
<img src="<?php echo $logo_banco; ?>" alt="logotipo do banco"> | ||
</div> | ||
<div class="codbanco"><?php echo $codigo_banco_com_dv ?></div> | ||
</div> | ||
<div class="linha-digitavel"><?php echo $linha_digitavel ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td width="520" colspan="4"> | ||
<div class="titulo">Pagador</div> | ||
<div class="conteudo"><?php echo $sacado ?></div> | ||
</td> | ||
<td> | ||
<div class="titulo">CPF/CNPJ do Pagador</div> | ||
<div class="conteudo rtl"><?php echo $sacado_documento ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td width="130"> | ||
<div class="titulo">Nosso Número</div> | ||
<div class="conteudo"><?php echo $nosso_numero ?></div> | ||
</td> | ||
<td width="130"> | ||
<div class="titulo">Nr. Documento</div> | ||
<div class="conteudo"><?php echo $numero_documento ?></div> | ||
</td> | ||
<td colspan="2"> | ||
<div class="titulo">Agência/Código do Beneficiário</div> | ||
<div class="conteudo"><?php echo $agencia_codigo_cedente ?></div> | ||
</td> | ||
<td width="130" class="caixa-gray-bg"> | ||
<div class="titulo">Vencimento</div> | ||
<div class="conteudo rtl"><?php echo $data_vencimento ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="2"> | ||
<div class="titulo">Beneficiário</div> | ||
<div class="conteudo"><?php echo $cedente ?></div> | ||
</td> | ||
<td colspan="2"> | ||
<div class="titulo">CPF/CNPJ do Beneficiário</div> | ||
<div class="conteudo"><?php echo $cedente_cpf_cnpj ?></div> | ||
</td> | ||
<td width="130" class="caixa-gray-bg"> | ||
<div class="titulo">Valor do Documento</div> | ||
<div class="conteudo rtl"><?php echo $valor_documento ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="4"> | ||
<div class="titulo">Endereço do Beneficiário</div> | ||
<div class="conteudo"><?php echo $cedente_endereco1 ?> | <?php echo $cedente_endereco2 ?></div> | ||
</td> | ||
<td width="130"> | ||
<div class="titulo">(-) Descontos / Abatimentos</div> | ||
<div class="conteudo rtl"><?php echo $desconto_abatimento ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="4" rowspan="3" style="vertical-align: top;"> | ||
<div class="titulo"><b>Demonstrativo</b></div> | ||
<div style="margin-top: 10px" class="conteudo"><?php echo $demonstrativo[0] ?></div> | ||
<div class="conteudo"><?php echo $demonstrativo[1] ?></div> | ||
<div class="conteudo"><?php echo $demonstrativo[2] ?></div> | ||
<div class="conteudo"><?php echo $demonstrativo[3] ?></div> | ||
<div style="margin-bottom: 10px;" class="conteudo"><?php echo $demonstrativo[4] ?></div> | ||
</td> | ||
<td width="130"> | ||
<div class="titulo">(-) Outras deduções</div> | ||
<div class="conteudo rtl"><?php echo $outras_deducoes ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td width="130"> | ||
<div class="titulo">(+) Outros acréscimos</div> | ||
<div class="conteudo rtl"><?php echo $outros_acrescimos ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td width="130"> | ||
<div class="titulo">(=) Valor cobrado</div> | ||
<div class="conteudo rtl"><?php echo $valor_cobrado ?></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="3" class="bottomborder"> | ||
<b>SAC CAIXA</b>: 0800 726 0101 (informações, reclamações, sugestões e elogios) <br> | ||
<b>Para pessoas com deficiência auditiva ou de fala</b>: 0800 726 2492 <br> | ||
<b>Ouvidoria</b>: 0800 725 7474 <br> | ||
<b>caixa.gov.br</b> | ||
</td> | ||
<td width="400" colspan="2" style="vertical-align: top;" class="bottomborder"> | ||
<div class="titulo"><center>Autenticação Mecânica - <b>Recibo do Pagador</b></center></div> | ||
<div class="conteudo"></div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<br> | ||
<div class="linha-pontilhada">Corte na linha pontilhada</div> | ||
<br> | ||
|
||
<!-- Ficha de compensação --> | ||
<?php include('partials/ficha-de-compensacao.phtml') ?> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
require '../autoloader.php'; | ||
|
||
use OpenBoleto\Banco\Caixa; | ||
use OpenBoleto\Agente; | ||
|
||
$sacado = new Agente('Lucas Zardo', '021.271.270-56', 'Av Presidente Vargas 2043 AP 302', '97015-513', 'Santa Maria', 'RS'); | ||
$cedente = new Agente('DELIVERY MUCH ONLINE LTDA', '14.490.065/0001-77', 'Av Roraima 1000 - ITSM Sala 10', '97105-900', 'Santa Maria', 'RS'); | ||
|
||
$boleto = new Caixa(array( | ||
// Parâmetros obrigatórios | ||
'dataVencimento' => new DateTime('2013-01-24'), | ||
'valor' => 23.00, | ||
'sequencial' => 1234567, | ||
'sacado' => $sacado, | ||
'cedente' => $cedente, | ||
'agencia' => '0501', // Até 4 dígitos | ||
'carteira' => 'SR', // SR => Sem Registro ou RG => Registrada | ||
'conta' => '433756', // Até 6 dígitos | ||
|
||
// Parâmetros recomendáveis | ||
//'logoPath' => 'http://empresa.com.br/logo.jpg', // Logo da sua empresa | ||
'contaDv' => 2, | ||
'agenciaDv' => 1, | ||
'descricaoDemonstrativo' => array( // Até 5 | ||
'Compra de materiais cosméticos', | ||
'Compra de alicate', | ||
), | ||
'instrucoes' => array( // Até 8 | ||
'Após o dia 30/11 cobrar 2% de mora e 1% de juros ao dia.', | ||
'Não receber após o vencimento.', | ||
), | ||
|
||
// Parâmetros opcionais | ||
//'resourcePath' => '../resources', | ||
//'moeda' => Caixa::MOEDA_REAL, | ||
//'dataDocumento' => new DateTime(), | ||
//'dataProcessamento' => new DateTime(), | ||
//'contraApresentacao' => true, | ||
//'pagamentoMinimo' => 23.00, | ||
//'aceite' => 'N', | ||
//'especieDoc' => 'ABC', | ||
//'numeroDocumento' => '123.456.789', | ||
//'usoBanco' => 'Uso banco', | ||
//'layout' => 'caixa.phtml', | ||
//'logoPath' => 'http://boletophp.com.br/img/opensource-55x48-t.png', | ||
//'sacadorAvalista' => new Agente('Antônio da Silva', '02.123.123/0001-11'), | ||
//'descontosAbatimentos' => 123.12, | ||
//'moraMulta' => 123.12, | ||
//'outrasDeducoes' => 123.12, | ||
//'outrosAcrescimos' => 123.12, | ||
//'valorCobrado' => 123.12, | ||
//'valorUnitario' => 123.12, | ||
//'quantidade' => 1, | ||
)); | ||
|
||
echo $boleto->getOutput(); |
Oops, something went wrong.