ExCnab.Cnab240.Templates.Details.ModelB (ex_cnab v1.3.6)
Template to generate an cnab 240 object from file, following the B-segment pattern;
Link to this section Summary
Functions
This function generate a Header Chunk Map from a Cnab240 file, using the FEBRABAN convention. The fields follows the B-segment hierarchy, and the returns is in PT BR.
Link to this section Functions
Link to this function
encode(map)
Link to this function
generate(raw_string)
@spec generate(String.t()) :: {:ok, Map.t()}
This function generate a Header Chunk Map from a Cnab240 file, using the FEBRABAN convention. The fields follows the B-segment hierarchy, and the returns is in PT BR.
You can see all hierarchy in the FEBRABAN documentation.
CNAB
├── Controle
│ ├── Banco (1..3)
│ ├── Lote (4..7)
│ └── Registro (8..8)
│
├── Serviço
│ ├── N do registro (9..13)
│ └── Segmento (14..14)
│
├── CNAB (15..17)
│
│── Dados complementares
│ ├── Favorecido
│ │ ├── Inscrição
│ │ │ ├── Tipo (18..18)
│ │ │ └── Número (19..32)
│ │ │
│ │ ├── Logradouro (33..62)
│ │ │
│ │ ├── Número (63..67)
│ │ │
│ │ ├── Complemento (68..82)
│ │ │
│ │ ├── Bairro (83..97)
│ │ │
│ │ ├── Cidade (98..117)
│ │ │
│ │ ├── CEP (118..122)
│ │ │
│ │ ├── Complemento CEP (123..125)
│ │ │
│ │ └── Estado (126..127)
│ │
│ ├── PAGTO
│ │ │
│ │ ├── Vencimento (128..135)
│ │ │
│ │ ├── Valor documento (136..150)
│ │ │
│ │ ├── Abatimento (151..165)
│ │ │
│ │ ├── Desconto (166..180)
│ │ │
│ │ ├── Mora (181..195)
│ │ │
│ │ └── Multa (196..210)
│ │
│ └── Cód/Doc. Favorec. (211..225)
│
├── Aviso (226..226)
│
├── Código UG Centralizadora (227..232)
│
└── Identificação do banco no SPB (233..240)
Para Pix
CNAB
├── Controle
│ ├── Banco (1..3)
│ ├── Lote (4..7)
│ └── Registro (8..8)
│
├── Serviço
│ ├── N do registro (9..13)
│ └── Segmento (14..14)
│
├── Identificador favorecido (15..17)
│
│── Dados complementares
│ ├── informação 10 (18..32)
│ ├── informação 11 (33..127)
│ └── informação 12 (128..226)
│
├── Código UG Centralizadora (227..232)
│
└── Identificação do banco no SPB (233..240)