diff --git a/cnab240/bancos/nexxera/__init__.py b/cnab240/bancos/nexxera/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cnab240/bancos/nexxera/specs/HeaderArquivo.json b/cnab240/bancos/nexxera/specs/HeaderArquivo.json new file mode 100755 index 0000000..91a1aa3 --- /dev/null +++ b/cnab240/bancos/nexxera/specs/HeaderArquivo.json @@ -0,0 +1,153 @@ +{ + "nome": "HeaderArquivo", + "campos": { + "00.0": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.0": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.0": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 0 + }, + "03.0": { + "nome": "vazio1", + "posicao_inicio": 9, + "posicao_fim": 14, + "formato": "alfa", + "default": "" + }, + "04.0": { + "nome": "layout_arquivo", + "posicao_inicio": 15, + "posicao_fim": 17, + "formato": "num", + "default": 81 + }, + "05.0": { + "nome": "tipo_inscricao", + "posicao_inicio": 18, + "posicao_fim": 18, + "formato": "num", + "default": 2 + }, + "06.0": { + "nome": "numero_inscricao", + "posicao_inicio": 19, + "posicao_fim": 32, + "formato": "num" + }, + "07.0": { + "nome": "vazio2", + "posicao_inicio": 33, + "posicao_fim": 52, + "formato": "alfa", + "default": "" + }, + "08.0": { + "nome": "numero_agencia", + "posicao_inicio": 53, + "posicao_fim": 57, + "formato": "num" + }, + "09.0": { + "nome": "vazio3", + "posicao_inicio": 58, + "posicao_fim": 58, + "formato": "alfa", + "default": "" + }, + "10.0": { + "nome": "numero_conta", + "posicao_inicio": 59, + "posicao_fim": 70, + "formato": "num" + }, + "11.0": { + "nome": "vazio4", + "posicao_inicio": 71, + "posicao_fim": 71, + "formato": "alfa", + "default": "" + }, + "12.0": { + "nome": "agencia_conta_dv", + "posicao_inicio": 72, + "posicao_fim": 72, + "formato": "num" + }, + "13.0": { + "nome": "nome_empresa", + "posicao_inicio": 73, + "posicao_fim": 102, + "formato": "alfa", + "default": "" + }, + "14.0": { + "nome": "nome_do_banco", + "posicao_inicio": 103, + "posicao_fim": 132, + "formato": "alfa", + "default": "" + }, + "15.0": { + "nome": "vazio5", + "posicao_inicio": 133, + "posicao_fim": 142, + "formato": "alfa", + "default": "" + }, + "16.0": { + "nome": "arquivo_codigo", + "posicao_inicio": 143, + "posicao_fim": 143, + "formato": "num" + }, + "17.0": { + "nome": "arquivo_data_de_geracao", + "posicao_inicio": 144, + "posicao_fim": 151, + "formato": "num" + }, + "18.0": { + "nome": "arquivo_hora_de_geracao", + "posicao_inicio": 152, + "posicao_fim": 157, + "formato": "num" + }, + "19.0": { + "nome": "vazio6", + "posicao_inicio": 158, + "posicao_fim": 166, + "formato": "num", + "default": 0 + }, + "20.0": { + "nome": "densidade", + "posicao_inicio": 167, + "posicao_fim": 171, + "formato": "num", + "default": 0 + }, + "21.0": { + "nome": "vazio7", + "posicao_inicio": 172, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/HeaderLotePagamento.json b/cnab240/bancos/nexxera/specs/HeaderLotePagamento.json new file mode 100755 index 0000000..8c8625e --- /dev/null +++ b/cnab240/bancos/nexxera/specs/HeaderLotePagamento.json @@ -0,0 +1,196 @@ +{ + "nome": "HeaderLotePagamento", + "campos": { + "00.1": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.1": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.1": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 1 + }, + "03.1": { + "nome": "servico_operacao", + "posicao_inicio": 9, + "posicao_fim": 9, + "formato": "alfa", + "default": "C" + }, + "04.1": { + "nome": "tipo_pagamento", + "posicao_inicio": 10, + "posicao_fim": 11, + "formato": "num", + "default": 98 + }, + "05.1": { + "nome": "forma_pagamento", + "posicao_inicio": 12, + "posicao_fim": 13, + "formato": "num", + "default": 1 + }, + "06.1": { + "nome": "servico_servico", + "posicao_inicio": 14, + "posicao_fim": 16, + "formato": "num", + "default": 40 + }, + "07.1": { + "nome": "vazio1", + "posicao_inicio": 17, + "posicao_fim": 17, + "formato": "alfa", + "default": "" + }, + "08.1": { + "nome": "tipo_inscricao", + "posicao_inicio": 18, + "posicao_fim": 18, + "formato": "num", + "default": 2 + }, + "09.1": { + "nome": "numero_inscricao", + "posicao_inicio": 19, + "posicao_fim": 32, + "formato": "num" + }, + "10.1": { + "nome": "identificacao_lancamento", + "posicao_inicio": 33, + "posicao_fim": 36, + "formato": "alfa", + "default": "" + }, + "11.1": { + "nome": "vazio2", + "posicao_inicio": 37, + "posicao_fim": 52, + "formato": "alfa", + "default": "" + }, + "12.1": { + "nome": "numero_agencia", + "posicao_inicio": 53, + "posicao_fim": 57, + "formato": "num" + }, + "13.1": { + "nome": "vazio3", + "posicao_inicio": 58, + "posicao_fim": 58, + "formato": "alfa", + "default": "" + }, + "14.1": { + "nome": "numero_conta", + "posicao_inicio": 59, + "posicao_fim": 70, + "formato": "num" + }, + "15.1": { + "nome": "vazio4", + "posicao_inicio": 71, + "posicao_fim": 71, + "formato": "alfa", + "default": "" + }, + "16.1": { + "nome": "agencia_conta_dv", + "posicao_inicio": 72, + "posicao_fim": 72, + "formato": "num" + }, + "17.1": { + "nome": "nome_empresa", + "posicao_inicio": 73, + "posicao_fim": 102, + "formato": "alfa", + "default": "" + }, + "18.1": { + "nome": "finalidade_lote", + "posicao_inicio": 103, + "posicao_fim": 132, + "formato": "alfa", + "default": "" + }, + "19.1": { + "nome": "historico_cc_debitada", + "posicao_inicio": 133, + "posicao_fim": 142, + "formato": "alfa", + "default": "" + }, + "20.1": { + "nome": "endereco_logradouro", + "posicao_inicio": 143, + "posicao_fim": 172, + "formato": "alfa", + "default": "" + }, + "21.1": { + "nome": "endereco_numero", + "posicao_inicio": 173, + "posicao_fim": 177, + "formato": "num" + }, + "22.1": { + "nome": "endereco_complemento", + "posicao_inicio": 178, + "posicao_fim": 192, + "formato": "alfa", + "default": "" + }, + "23.1": { + "nome": "endereco_cidade", + "posicao_inicio": 193, + "posicao_fim": 212, + "formato": "alfa", + "default": "" + }, + "24.1": { + "nome": "endereco_cep", + "posicao_inicio": 213, + "posicao_fim": 220, + "formato": "num" + }, + "25.1": { + "nome": "endereco_estado", + "posicao_inicio": 221, + "posicao_fim": 222, + "formato": "alfa", + "default": "" + }, + "26.1": { + "nome": "vazio5", + "posicao_inicio": 223, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "27.1": { + "nome": "ocorrencias", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/HeaderLoteSisPag2.json b/cnab240/bancos/nexxera/specs/HeaderLoteSisPag2.json new file mode 100755 index 0000000..41b3111 --- /dev/null +++ b/cnab240/bancos/nexxera/specs/HeaderLoteSisPag2.json @@ -0,0 +1,185 @@ +{ + "nome": "HeaderLoteSisPag2", + "campos": { + "00.1_2": { + "nome": "codigo_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.1_2": { + "nome": "codigo_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.1_2": { + "nome": "tipo_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 1 + }, + "03.1_2": { + "nome": "tipo_operacao", + "posicao_inicio": 9, + "posicao_fim": 9, + "formato": "alfa", + "default": "" + }, + "04.1_2": { + "nome": "tipo_pagamento", + "posicao_inicio": 10, + "posicao_fim": 11, + "formato": "num" + }, + "05.1_2": { + "nome": "forma_pagamento", + "posicao_inicio": 12, + "posicao_fim": 13, + "formato": "num" + }, + "06.1_2": { + "nome": "layout_lote", + "posicao_inicio": 14, + "posicao_fim": 16, + "formato": "num" + }, + "07.1_2": { + "nome": "vazio1", + "posicao_inicio": 17, + "posicao_fim": 17, + "formato": "alfa", + "default": "" + }, + "08.1_2": { + "nome": "tipo_inscricao", + "posicao_inicio": 18, + "posicao_fim": 18, + "formato": "num" + }, + "09.1_2": { + "nome": "numero_inscricao", + "posicao_inicio": 19, + "posicao_fim": 32, + "formato": "num" + }, + "10.1_2": { + "nome": "vazio2", + "posicao_inicio": 33, + "posicao_fim": 52, + "formato": "alfa", + "default": "" + }, + "11.1_2": { + "nome": "numero_agencia", + "posicao_inicio": 53, + "posicao_fim": 57, + "formato": "num" + }, + "12.1_2": { + "nome": "vazio3", + "posicao_inicio": 58, + "posicao_fim": 58, + "formato": "alfa", + "default": "" + }, + "13.1_2": { + "nome": "numero_conta", + "posicao_inicio": 59, + "posicao_fim": 70, + "formato": "num" + }, + "14.1_2": { + "nome": "vazio4", + "posicao_inicio": 71, + "posicao_fim": 71, + "formato": "alfa", + "default": "" + }, + "15.1_2": { + "nome": "agencia_conta_dv", + "posicao_inicio": 72, + "posicao_fim": 72, + "formato": "num" + }, + "16.1_2": { + "nome": "nome_empresa", + "posicao_inicio": 73, + "posicao_fim": 102, + "formato": "alfa", + "default": "" + }, + "17.1_2": { + "nome": "finalidade_lote", + "posicao_inicio": 103, + "posicao_fim": 132, + "formato": "alfa", + "default": "" + }, + "18.1_2": { + "nome": "historico_cc_debitada", + "posicao_inicio": 133, + "posicao_fim": 142, + "formato": "alfa", + "default": "" + }, + "19.1_2": { + "nome": "endereco_logradouro", + "posicao_inicio": 143, + "posicao_fim": 172, + "formato": "alfa", + "default": "" + }, + "20.1_2": { + "nome": "endereco_numero", + "posicao_inicio": 173, + "posicao_fim": 177, + "formato": "num" + }, + "21.1_2": { + "nome": "endereco_complemento", + "posicao_inicio": 178, + "posicao_fim": 192, + "formato": "alfa", + "default": "" + }, + "22.1_2": { + "nome": "endereco_cidade", + "posicao_inicio": 193, + "posicao_fim": 212, + "formato": "alfa", + "default": "" + }, + "23.1_2": { + "nome": "endereco_cep", + "posicao_inicio": 213, + "posicao_fim": 220, + "formato": "num" + }, + "24.1_2": { + "nome": "endereco_estado", + "posicao_inicio": 221, + "posicao_fim": 222, + "formato": "alfa", + "default": "" + }, + "25.1_2": { + "nome": "vazio5", + "posicao_inicio": 223, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "26.1_2": { + "nome": "ocorrencias", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/SegmentoA.json b/cnab240/bancos/nexxera/specs/SegmentoA.json new file mode 100755 index 0000000..d9cd05a --- /dev/null +++ b/cnab240/bancos/nexxera/specs/SegmentoA.json @@ -0,0 +1,199 @@ +{ + "nome": "SegmentoA", + "campos": { + "00.3A": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.3A": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.3A": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 3 + }, + "03.3A": { + "nome": "servico_numero_registro", + "posicao_inicio": 9, + "posicao_fim": 13, + "formato": "num" + }, + "04.3A": { + "nome": "servico_segmento", + "posicao_inicio": 14, + "posicao_fim": 14, + "formato": "alfa", + "default": "A" + }, + "05.3A": { + "nome": "servico_codigo_movimento", + "posicao_inicio": 15, + "posicao_fim": 17, + "formato": "num" + }, + "06.3A": { + "nome": "camara", + "posicao_inicio": 18, + "posicao_fim": 20, + "formato": "num" + }, + "07.3A": { + "nome": "banco_favorecido", + "posicao_inicio": 21, + "posicao_fim": 23, + "formato": "num" + }, + "08.3A": { + "nome": "numero_agencia_conta", + "posicao_inicio": 24, + "posicao_fim": 43, + "formato": "alfa", + "default": "" + }, + "09.3A": { + "nome": "nome_favorecido", + "posicao_inicio": 44, + "posicao_fim": 73, + "formato": "alfa", + "default": "" + }, + "10.3A": { + "nome": "seu_numero", + "posicao_inicio": 74, + "posicao_fim": 93, + "formato": "alfa", + "default": "" + }, + "11.3A": { + "nome": "data_pagto", + "posicao_inicio": 94, + "posicao_fim": 101, + "formato": "num" + }, + "12.3A": { + "nome": "tipo_moeda", + "posicao_inicio": 102, + "posicao_fim": 104, + "formato": "alfa", + "default": "REA" + }, + "13.3A": { + "nome": "codigo_ispb", + "posicao_inicio": 105, + "posicao_fim": 112, + "formato": "num" + }, + "14.3A": { + "nome": "ZEROS", + "posicao_inicio": 113, + "posicao_fim": 119, + "formato": "num", + "default": 0 + }, + "15.3A": { + "nome": "valor_pagto", + "posicao_inicio": 120, + "posicao_fim": 134, + "formato": "num", + "decimais": 2 + }, + "16.3A": { + "nome": "nosso_numero", + "posicao_inicio": 135, + "posicao_fim": 149, + "formato": "alfa", + "default": "" + }, + "17.3A": { + "nome": "vazio1", + "posicao_inicio": 150, + "posicao_fim": 154, + "formato": "alfa", + "default": "" + }, + "18.3A": { + "nome": "data_efetiva", + "posicao_inicio": 155, + "posicao_fim": 162, + "formato": "num" + }, + "19.3A": { + "nome": "valor_efetivo", + "posicao_inicio": 163, + "posicao_fim": 177, + "formato": "num" + }, + "20.3A": { + "nome": "detalhe_finalidade", + "posicao_inicio": 178, + "posicao_fim": 195, + "formato": "alfa", + "default": "" + }, + "21.3A": { + "nome": "vazio2", + "posicao_inicio": 196, + "posicao_fim": 197, + "formato": "alfa", + "default": "" + }, + "22.3A": { + "nome": "numero_documento", + "posicao_inicio": 198, + "posicao_fim": 203, + "formato": "num" + }, + "23.3A": { + "nome": "numero_inscricao", + "posicao_inicio": 204, + "posicao_fim": 217, + "formato": "num" + }, + "24.3A": { + "nome": "finalidade_doc_status_func", + "posicao_inicio": 218, + "posicao_fim": 219, + "formato": "alfa", + "default": "" + }, + "25.3A": { + "nome": "finalidade_ted", + "posicao_inicio": 220, + "posicao_fim": 224, + "formato": "alfa", + "default": "" + }, + "26.3A": { + "nome": "vazio3", + "posicao_inicio": 225, + "posicao_fim": 229, + "formato": "alfa", + "default": "" + }, + "27.3A": { + "nome": "aviso", + "posicao_inicio": 230, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "28.3A": { + "nome": "ocorrencias", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/SegmentoAnf.json b/cnab240/bancos/nexxera/specs/SegmentoAnf.json new file mode 100755 index 0000000..38cb46c --- /dev/null +++ b/cnab240/bancos/nexxera/specs/SegmentoAnf.json @@ -0,0 +1,184 @@ +{ + "nome": "SegmentoAnf", + "campos": { + "00.3Anf": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.3Anf": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.3Anf": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 3 + }, + "03.3Anf": { + "nome": "servico_numero_registro", + "posicao_inicio": 9, + "posicao_fim": 13, + "formato": "num" + }, + "04.3Anf": { + "nome": "servico_segmento", + "posicao_inicio": 14, + "posicao_fim": 14, + "formato": "alfa", + "default": "A" + }, + "05.3Anf": { + "nome": "servico_codigo_movimento", + "posicao_inicio": 15, + "posicao_fim": 17, + "formato": "num" + }, + "06.3Anf": { + "nome": "ZEROS", + "posicao_inicio": 18, + "posicao_fim": 20, + "formato": "num", + "default": 0 + }, + "07.3Anf": { + "nome": "banco_favorecido", + "posicao_inicio": 21, + "posicao_fim": 23, + "formato": "num" + }, + "08.3Anf": { + "nome": "numero_agencia numero_conta", + "posicao_inicio": 24, + "posicao_fim": 43, + "formato": "alfa", + "default": "" + }, + "09.3Anf": { + "nome": "nome_favorecido", + "posicao_inicio": 44, + "posicao_fim": 73, + "formato": "alfa", + "default": "" + }, + "10.3Anf": { + "nome": "seu_numero", + "posicao_inicio": 74, + "posicao_fim": 93, + "formato": "alfa", + "default": "" + }, + "11.3Anf": { + "nome": "data_pagto", + "posicao_inicio": 94, + "posicao_fim": 101, + "formato": "num" + }, + "12.3Anf": { + "nome": "tipo_moeda", + "posicao_inicio": 102, + "posicao_fim": 104, + "formato": "alfa", + "default": "" + }, + "13.3Anf": { + "nome": "ZEROS", + "posicao_inicio": 105, + "posicao_fim": 119, + "formato": "num", + "default": 0 + }, + "14.3Anf": { + "nome": "valor_pagto", + "posicao_inicio": 120, + "posicao_fim": 134, + "formato": "num" + }, + "15.3Anf": { + "nome": "nosso_numero", + "posicao_inicio": 135, + "posicao_fim": 149, + "formato": "alfa", + "default": "" + }, + "16.3Anf": { + "nome": "vazio1", + "posicao_inicio": 150, + "posicao_fim": 154, + "formato": "alfa", + "default": "" + }, + "17.3Anf": { + "nome": "data_efetiva", + "posicao_inicio": 155, + "posicao_fim": 162, + "formato": "num" + }, + "18.3Anf": { + "nome": "valor_efetivo", + "posicao_inicio": 163, + "posicao_fim": 177, + "formato": "num" + }, + "19.3Anf": { + "nome": "num_nota_fiscal_cnpj", + "posicao_inicio": 178, + "posicao_fim": 191, + "formato": "num" + }, + "20.3Anf": { + "nome": "vazio2", + "posicao_inicio": 192, + "posicao_fim": 197, + "formato": "alfa", + "default": "" + }, + "21.3Anf": { + "nome": "numero_documento", + "posicao_inicio": 198, + "posicao_fim": 203, + "formato": "num" + }, + "22.3Anf": { + "nome": "numero_inscricao_favorecido", + "posicao_inicio": 204, + "posicao_fim": 217, + "formato": "num" + }, + "23.3Anf": { + "nome": "tipo_identificacao", + "posicao_inicio": 218, + "posicao_fim": 218, + "formato": "num" + }, + "24.3Anf": { + "nome": "vazio3", + "posicao_inicio": 219, + "posicao_fim": 229, + "formato": "alfa", + "default": "" + }, + "25.3Anf": { + "nome": "aviso_favorecido", + "posicao_inicio": 230, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "26.3Anf": { + "nome": "ocorrencias", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/SegmentoB.json b/cnab240/bancos/nexxera/specs/SegmentoB.json new file mode 100755 index 0000000..d5889ba --- /dev/null +++ b/cnab240/bancos/nexxera/specs/SegmentoB.json @@ -0,0 +1,127 @@ +{ + "nome": "SegmentoB", + "campos": { + "00.3B": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.3B": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.3B": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 3 + }, + "03.3B": { + "nome": "servico_numero_registro", + "posicao_inicio": 9, + "posicao_fim": 13, + "formato": "num" + }, + "04.3B": { + "nome": "servico_segmento", + "posicao_inicio": 14, + "posicao_fim": 14, + "formato": "alfa", + "default": "A" + }, + "05.3B": { + "nome": "vazio1", + "posicao_inicio": 15, + "posicao_fim": 17, + "formato": "alfa", + "default": "" + }, + "06.3B": { + "nome": "tipo_inscricao", + "posicao_inicio": 18, + "posicao_fim": 18, + "formato": "num" + }, + "07.3B": { + "nome": "numero_inscricao", + "posicao_inicio": 19, + "posicao_fim": 32, + "formato": "num" + }, + "08.3B": { + "nome": "endereco_logradouro", + "posicao_inicio": 33, + "posicao_fim": 62, + "formato": "alfa", + "default": "" + }, + "09.3B": { + "nome": "endereco_numero", + "posicao_inicio": 63, + "posicao_fim": 67, + "formato": "num" + }, + "10.3B": { + "nome": "endereco_complemento", + "posicao_inicio": 68, + "posicao_fim": 82, + "formato": "alfa", + "default": "" + }, + "11.3B": { + "nome": "endereco_bairro", + "posicao_inicio": 83, + "posicao_fim": 97, + "formato": "alfa", + "default": "" + }, + "12.3B": { + "nome": "endereco_cidade", + "posicao_inicio": 98, + "posicao_fim": 117, + "formato": "alfa", + "default": "" + }, + "13.3B": { + "nome": "endereco_cep", + "posicao_inicio": 118, + "posicao_fim": 125, + "formato": "num" + }, + "14.3B": { + "nome": "endereco_estado", + "posicao_inicio": 126, + "posicao_fim": 127, + "formato": "alfa", + "default": "" + }, + "15.3B": { + "nome": "email", + "posicao_inicio": 128, + "posicao_fim": 227, + "formato": "alfa", + "default": "" + }, + "16.3B": { + "nome": "vazio2", + "posicao_inicio": 228, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "17.3B": { + "nome": "ocorrencias", + "posicao_inicio": -231, + "posicao_fim": -240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/SegmentoC.json b/cnab240/bancos/nexxera/specs/SegmentoC.json new file mode 100755 index 0000000..89399aa --- /dev/null +++ b/cnab240/bancos/nexxera/specs/SegmentoC.json @@ -0,0 +1,140 @@ +{ + "nome": "SegmentoC", + "campos": { + "00.3C": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.3C": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.3C": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 3 + }, + "03.3C": { + "nome": "servico_numero_registro", + "posicao_inicio": 9, + "posicao_fim": 13, + "formato": "num" + }, + "04.3C": { + "nome": "servico_segmento", + "posicao_inicio": 14, + "posicao_fim": 14, + "formato": "alfa", + "default": "A" + }, + "05.3C": { + "nome": "valor_csll", + "posicao_inicio": 15, + "posicao_fim": 29, + "formato": "num" + }, + "06.3C": { + "nome": "vazio1", + "posicao_inicio": 30, + "posicao_fim": 37, + "formato": "alfa", + "default": "" + }, + "07.3C": { + "nome": "data_vencimento", + "posicao_inicio": 38, + "posicao_fim": 45, + "formato": "alfa", + "default": "" + }, + "08.3C": { + "nome": "valor_documento", + "posicao_inicio": 46, + "posicao_fim": 60, + "formato": "num" + }, + "09.3C": { + "nome": "valor_pis", + "posicao_inicio": 61, + "posicao_fim": 75, + "formato": "num" + }, + "10.3C": { + "nome": "valor_ir", + "posicao_inicio": 76, + "posicao_fim": 90, + "formato": "num" + }, + "11.3C": { + "nome": "valor_iss", + "posicao_inicio": 91, + "posicao_fim": 105, + "formato": "num" + }, + "12.3C": { + "nome": "valor_cofins", + "posicao_inicio": 106, + "posicao_fim": 120, + "formato": "num" + }, + "13.3C": { + "nome": "desconto", + "posicao_inicio": 121, + "posicao_fim": 135, + "formato": "num" + }, + "14.3C": { + "nome": "abatimento", + "posicao_inicio": 136, + "posicao_fim": 150, + "formato": "num" + }, + "15.3C": { + "nome": "outras_deducoes", + "posicao_inicio": 151, + "posicao_fim": 165, + "formato": "num" + }, + "16.3C": { + "nome": "mora", + "posicao_inicio": 166, + "posicao_fim": 180, + "formato": "num" + }, + "17.3C": { + "nome": "multa", + "posicao_inicio": 181, + "posicao_fim": 195, + "formato": "num" + }, + "18.3C": { + "nome": "outros_acrescimos", + "posicao_inicio": 196, + "posicao_fim": 210, + "formato": "num" + }, + "19.3C": { + "nome": "fatura_documento", + "posicao_inicio": 211, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "20.3C": { + "nome": "vazio2", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/SegmentoJ.json b/cnab240/bancos/nexxera/specs/SegmentoJ.json new file mode 100644 index 0000000..1dd5067 --- /dev/null +++ b/cnab240/bancos/nexxera/specs/SegmentoJ.json @@ -0,0 +1,164 @@ +{ + "nome": "SegmentoJ", + "campos": { + "00.3J": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.3J": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.3J": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 3 + }, + "03.3J": { + "nome": "servico_numero_registro", + "posicao_inicio": 9, + "posicao_fim": 13, + "formato": "num" + }, + "04.3J": { + "nome": "servico_segmento", + "posicao_inicio": 14, + "posicao_fim": 14, + "formato": "alfa", + "default": "J" + }, + "05.3J": { + "nome": "servico_codigo_movimento", + "posicao_inicio": 15, + "posicao_fim": 17, + "formato": "num" + }, + "06.3J": { + "nome": "cod_barras_banco_favorecido", + "posicao_inicio": 18, + "posicao_fim": 20, + "formato": "num" + }, + "07.3J": { + "nome": "cod_barras_moeda", + "posicao_inicio": 21, + "posicao_fim": 21, + "formato": "num" + }, + "08.3J": { + "nome": "cod_barras_dv", + "posicao_inicio": 22, + "posicao_fim": 22, + "formato": "num" + }, + "09.3J": { + "nome": "cod_barras_vencimento", + "posicao_inicio": 23, + "posicao_fim": 26, + "formato": "num" + }, + "10.3J": { + "nome": "cod_barras_valor", + "posicao_inicio": 27, + "posicao_fim": 36, + "formato": "num", + "decimais": 2 + }, + "11.3J": { + "nome": "cod_barras_campo_livre", + "posicao_inicio": 37, + "posicao_fim": 61, + "formato": "num" + }, + "12.3J": { + "nome": "nome_favorecido", + "posicao_inicio": 62, + "posicao_fim": 91, + "formato": "alfa" + }, + "13.3J": { + "nome": "data_vencto", + "posicao_inicio": 92, + "posicao_fim": 99, + "formato": "num" + }, + "14.3J": { + "nome": "valor_titulo", + "posicao_inicio": 100, + "posicao_fim": 114, + "formato": "num", + "decimais": 2 + }, + "15.3J": { + "nome": "descontos", + "posicao_inicio": 115, + "posicao_fim": 129, + "formato": "num", + "decimais": 2 + }, + "16.3J": { + "nome": "acrescimos", + "posicao_inicio": 130, + "posicao_fim": 144, + "formato": "num", + "decimais": "2" + }, + "17.3J": { + "nome": "data_pgto", + "posicao_inicio": 145, + "posicao_fim": 152, + "formato": "num" + }, + "18.3J": { + "nome": "valor_pgto", + "posicao_inicio": 153, + "posicao_fim": 167, + "formato": "num", + "decimais": 2 + }, + "19.3J": { + "nome": "ZEROS", + "posicao_inicio": 168, + "posicao_fim": 182, + "formato": "num", + "default": 0 + }, + "20.3J": { + "nome": "seu_numero", + "posicao_inicio": 183, + "posicao_fim": 202, + "formato": "alfa", + "default": "" + }, + "21.3J": { + "nome": "BRANCOS", + "posicao_inicio": 203, + "posicao_fim": 215, + "formato": "alfa", + "default": "" + }, + "22.3J": { + "nome": "nosso_numero", + "posicao_inicio": 216, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "23.3J": { + "nome": "ocorrencias", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/SegmentoZ.json b/cnab240/bancos/nexxera/specs/SegmentoZ.json new file mode 100755 index 0000000..02ecd4a --- /dev/null +++ b/cnab240/bancos/nexxera/specs/SegmentoZ.json @@ -0,0 +1,75 @@ +{ + "nome": "SegmentoZ", + "campos": { + "00.3Z": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.3Z": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.3Z": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 3 + }, + "03.3Z": { + "nome": "servico_numero_registro", + "posicao_inicio": 9, + "posicao_fim": 13, + "formato": "num" + }, + "04.3Z": { + "nome": "servico_segmento", + "posicao_inicio": 14, + "posicao_fim": 14, + "formato": "alfa", + "default": "A" + }, + "05.3Z": { + "nome": "autenticacao", + "posicao_inicio": 15, + "posicao_fim": 78, + "formato": "alfa", + "default": "" + }, + "06.3Z": { + "nome": "seu_numero", + "posicao_inicio": 79, + "posicao_fim": 98, + "formato": "alfa", + "default": "" + }, + "07.3Z": { + "nome": "vazio1", + "posicao_inicio": 99, + "posicao_fim": 103, + "formato": "alfa", + "default": "" + }, + "08.3Z": { + "nome": "nosso_numero", + "posicao_inicio": 104, + "posicao_fim": 118, + "formato": "alfa", + "default": "" + }, + "09.3Z": { + "nome": "vazio2", + "posicao_inicio": 119, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/TrailerArquivo.json b/cnab240/bancos/nexxera/specs/TrailerArquivo.json new file mode 100644 index 0000000..4bc3ab0 --- /dev/null +++ b/cnab240/bancos/nexxera/specs/TrailerArquivo.json @@ -0,0 +1,53 @@ +{ + "nome": "TrailerArquivo", + "campos": { + "00.": { + "nome": "codigo_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.": { + "nome": "codigo_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 9999 + }, + "02.": { + "nome": "tipo_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 9 + }, + "03.": { + "nome": "vazio1", + "posicao_inicio": 9, + "posicao_fim": 17, + "formato": "alfa", + "default": "" + }, + "04.": { + "nome": "totais_quantidade_lotes", + "posicao_inicio": 18, + "posicao_fim": 23, + "formato": "num" + }, + "05.": { + "nome": "totais_quantidade_registros", + "posicao_inicio": 24, + "posicao_fim": 29, + "formato": "num" + }, + "06.": { + "nome": "vazio2", + "posicao_inicio": 30, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/TrailerLotePagamento.json b/cnab240/bancos/nexxera/specs/TrailerLotePagamento.json new file mode 100755 index 0000000..c0737a5 --- /dev/null +++ b/cnab240/bancos/nexxera/specs/TrailerLotePagamento.json @@ -0,0 +1,68 @@ +{ + "nome": "TrailerLotePagamento", + "campos": { + "00.5": { + "nome": "controle_banco", + "posicao_inicio": 1, + "posicao_fim": 3, + "formato": "num", + "default": 341 + }, + "01.5": { + "nome": "controle_lote", + "posicao_inicio": 4, + "posicao_fim": 7, + "formato": "num", + "default": 0 + }, + "02.5": { + "nome": "controle_registro", + "posicao_inicio": 8, + "posicao_fim": 8, + "formato": "num", + "default": 5 + }, + "03.5": { + "nome": "vazio1", + "posicao_inicio": 9, + "posicao_fim": 17, + "formato": "alfa", + "default": "" + }, + "04.5": { + "nome": "quantidade_registros", + "posicao_inicio": 18, + "posicao_fim": 23, + "formato": "num" + }, + "05.5": { + "nome": "total_valor_pagtos", + "posicao_inicio": 24, + "posicao_fim": 41, + "formato": "num", + "decimais": 2 + }, + "06.5": { + "nome": "ZEROS", + "posicao_inicio": 42, + "posicao_fim": 59, + "formato": "num", + "default": 0 + }, + "07.5": { + "nome": "vazio2", + "posicao_inicio": 60, + "posicao_fim": 230, + "formato": "alfa", + "default": "" + }, + "08.5": { + "nome": "ocorrencias", + "posicao_inicio": 231, + "posicao_fim": 240, + "formato": "alfa", + "default": "" + } + } +} + diff --git a/cnab240/bancos/nexxera/specs/spec_to_doc.py b/cnab240/bancos/nexxera/specs/spec_to_doc.py new file mode 100644 index 0000000..779b458 --- /dev/null +++ b/cnab240/bancos/nexxera/specs/spec_to_doc.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import sys +import json +from collections import OrderedDict + +fname = sys.argv[1] +f = open(fname, "r", encoding="utf-8") +spec = json.load(f, object_pairs_hook=OrderedDict) +f.close() + +campos = spec.get('campos') +for campo in list(campos.values()): + campo_nome = campo.get('nome') + campo_formato = campo.get('formato') + campo_decimais = campo.get('decimais') + + if campo_decimais: + tipo = 'Decimal ({0} digitos)'.format(campo_decimais) + elif campo_formato == 'alfa': + tipo = 'str' + else: + tipo = 'int' + + print((' ' * 8) + ':param {0}:'.format(campo_nome)) + print((' ' * 8) + ':type {0}: {1}'.format(campo_nome, tipo)) + print()