Skip to content

Commit a06f227

Browse files
committed
boleto bb agencia
1 parent d451b9b commit a06f227

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

exemplos/bb_boleto.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'especieDoc' => 'DM',
3939
'pagador' => $pagador,
4040
'beneficiario' => $beneficiario,
41+
'carteira' => 1111,
4142
'carteira' => 11,
4243
'convenio' => 1234567,
4344
]

src/Boleto/Banco/Bb.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,20 @@ public function __construct(array $params = [])
7878
* @var string
7979
*/
8080
protected $variacao_carteira;
81+
82+
/**
83+
* Retorna o campo Agência/Beneficiário do boleto
84+
*
85+
* @return string
86+
*/
87+
public function getAgenciaCodigoBeneficiario()
88+
{
89+
$agencia = $this->getAgencia() . '-' . CalculoDV::bbAgencia($this->getAgencia());
90+
$codigoCliente = $this->getConvenio();
91+
92+
return $agencia . ' / ' . $codigoCliente;
93+
}
94+
8195
/**
8296
* Define o número do convênio. Sempre use string pois a quantidade de caracteres é validada.
8397
*

0 commit comments

Comments
 (0)