Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constantes para o banco Santander #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Cnab/Banco.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Banco
const CEF = 104;
const BRADESCO = 237;
const ITAU = 341;
const UNICRED = 136;

public static function getBanco($codigo)
{
Expand Down Expand Up @@ -37,6 +38,11 @@ public static function getBanco($codigo)
'codigo_do_banco' => self::BRADESCO,
'nome_do_banco' => 'BRADESCO',
);
} elseif ($codigo == self::UNICRED) {
return array(
'codigo_do_banco' => self::UNICRED,
'nome_do_banco' => 'UNICRED',
);
} else {
return false;
}
Expand Down
13 changes: 13 additions & 0 deletions src/Cnab/Especie.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,17 @@ class Especie
const BB_DUPLICATA_DE_SERVICO = 4;

const CNAB240_OUTROS = '99';

// Santander Versão 2.7 - Junho/2015 Cnab 240
const SANTANDER_DUPLICATA_MERCANTIL = '02'; // DM - DUPLICATA MERCANTIL
const SANTANDER_DUPLICATA_SERVICO = '04'; //DS - DUPLICATA DE SERVICO
const SANTANDER_LETRA_CAMBIO_BANCO_353 = '07'; //LC - LETRA DE CÂMBIO (SOMENTE PARA BANCO 353)
const SANTANDER_LETRA_CAMBIO_BANCO_008 = '30'; //LC - LETRA DE CÂMBIO (SOMENTE PARA BANCO 008)
const SANTANDER_NOTA_PROMISSORIA = '12'; //NP - NOTA PROMISSORIA
const SANTANDER_NOTA_PROMISSORIA_RURAL = '13'; //NR - NOTA PROMISSORIA RURAL
const SANTANDER_RECIBO = '17'; //RC - RECIBO
const SANTANDER_APOLICE_SEGURO = '20'; //AP – APOLICE DE SEGURO
const SANTANDER_BOLETO_PROPOSTA = '32'; //BDP – BOLETO DE PROPOSTA*
const SANTANDER_CHEQUE = '97'; //CH – CHEQUE
const SANTANDER_NOTA_PROMISSORIA_DIRETA = '98'; //ND - NOTA PROMISSORIA DIRETA
}
10 changes: 10 additions & 0 deletions src/Cnab/Retorno/Cnab400/Detalhe.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ public function getNumeroDocumento()
return trim($this->numero_do_documento);
}

/**
* Retorna o controle do participante
*
* @return string
*/
public function getControleParticipante()
{
return $this->controle_participante;
}

/**
* Retorna o nosso número do boleto (sem o digito).
*
Expand Down