cnab240 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/README.md +50 -4
  2. data/docs/vendor/febraban/subcpadr12_layout_padrao_V86.pdf +0 -0
  3. data/lib/cnab240/arquivo/arquivo.rb +10 -1
  4. data/lib/cnab240/arquivo/v40/header.rb +14 -14
  5. data/lib/cnab240/arquivo/v40/trailer.rb +5 -4
  6. data/lib/cnab240/arquivo/v86/header.rb +12 -12
  7. data/lib/cnab240/arquivo/v86/trailer.rb +3 -3
  8. data/lib/cnab240/ext/bindata.rb +1 -1
  9. data/lib/cnab240/ext/default_mixin.rb +2 -0
  10. data/lib/cnab240/ext/filler.rb +13 -0
  11. data/lib/cnab240/ext/lstring.rb +102 -0
  12. data/lib/cnab240/helper/pagamento_itau.rb +60 -0
  13. data/lib/cnab240/pagamentos/v40/header.rb +18 -18
  14. data/lib/cnab240/pagamentos/v40/trailer.rb +7 -7
  15. data/lib/cnab240/pagamentos/v86/header.rb +14 -14
  16. data/lib/cnab240/pagamentos/v86/titulos/header.rb +13 -13
  17. data/lib/cnab240/pagamentos/v86/titulos/trailer.rb +8 -8
  18. data/lib/cnab240/pagamentos/v86/trailer.rb +8 -8
  19. data/lib/cnab240/pagamentos/v86/tributos/header.rb +14 -14
  20. data/lib/cnab240/pagamentos/v86/tributos/trailer.rb +6 -6
  21. data/lib/cnab240/segmentos/v40/segmento_a.rb +28 -25
  22. data/lib/cnab240/segmentos/v86/segmento_a.rb +15 -15
  23. data/lib/cnab240/segmentos/v86/segmento_b.rb +16 -16
  24. data/lib/cnab240/segmentos/v86/segmento_c.rb +11 -11
  25. data/lib/cnab240/segmentos/v86/segmento_j.rb +14 -14
  26. data/lib/cnab240/segmentos/v86/segmento_j52.rb +11 -11
  27. data/lib/cnab240/segmentos/v86/segmento_n.rb +7 -7
  28. data/lib/cnab240/segmentos/v86/segmento_n1.rb +6 -6
  29. data/lib/cnab240/segmentos/v86/segmento_n2.rb +8 -8
  30. data/lib/cnab240/segmentos/v86/segmento_n3.rb +8 -8
  31. data/lib/cnab240/segmentos/v86/segmento_n4.rb +10 -10
  32. data/lib/cnab240/segmentos/v86/segmento_n5.rb +5 -5
  33. data/lib/cnab240/segmentos/v86/segmento_n6.rb +5 -5
  34. data/lib/cnab240/segmentos/v86/segmento_n7.rb +5 -5
  35. data/lib/cnab240/segmentos/v86/segmento_n8.rb +5 -5
  36. data/lib/cnab240/segmentos/v86/segmento_o.rb +9 -9
  37. data/lib/cnab240/segmentos/v86/segmento_w.rb +4 -4
  38. data/lib/cnab240/segmentos/v86/segmento_z.rb +3 -3
  39. data/lib/cnab240/version.rb +1 -1
  40. data/lib/cnab240.rb +7 -1
  41. data/spec/arquivo/arquivo_spec.rb +10 -0
  42. data/spec/bindata/bindata_spec.rb +17 -2
  43. data/spec/helper/pagamento_itau_spec.rb +55 -0
  44. data/spec/segmentos/v40/segmento_a_spec.rb +18 -13
  45. metadata +10 -5
  46. data/lib/cnab240/helper/remessa.rb +0 -29
@@ -3,15 +3,15 @@ module Cnab240::V86::Pagamentos
3
3
 
4
4
  include Cnab240::DefaultMixin
5
5
 
6
- string :controle_banco, :length => 3, :pad_byte => '0'
7
- string :controle_lote, :length => 4, :pad_byte => '0'
8
- string :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
6
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
7
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
8
+ lstring :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
9
9
 
10
- string :cnab_g004_1, :length => 9, :pad_byte => '0'
11
- string :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
- string :totais_valor, :length => 18, :pad_byte => '0'
13
- string :totais_qtde_moeda, :length => 18, :pad_byte => '0'
14
- string :numero_aviso_debito, :length => 6, :pad_byte => '0'
10
+ lstring :cnab_g004_1, :length => 9, :pad_byte => '0'
11
+ lstring :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
+ lstring :totais_valor, :length => 18, :pad_byte => '0'
13
+ lstring :totais_qtde_moeda, :length => 18, :pad_byte => '0'
14
+ lstring :numero_aviso_debito, :length => 6, :pad_byte => '0'
15
15
  string :cnab_g004_2, :length => 165, :pad_byte => ' '
16
16
  string :ocorrencias, :length => 10, :pad_byte => ' '
17
17
  end
@@ -3,23 +3,23 @@ module Cnab240::V86::PagamentosTributos
3
3
 
4
4
  include Cnab240::DefaultMixin
5
5
 
6
- string :controle_banco, :length => 3, :pad_byte => '0'
7
- string :controle_lote, :length => 4, :pad_byte => '0'
8
- string :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
6
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
7
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
8
+ lstring :controle_registro, :length => 1, :initial_value => '1', :pad_byte => '0'
9
9
 
10
10
  string :servico_operacao, :length => 1, :initial_value => 'C', :pad_byte => ' '
11
- string :servico_tipo, :length => 2 , :pad_byte => '0'
12
- string :servico_forma, :length => 2, :pad_byte => '0'
13
- string :servico_layout, :length => 3, :initial_value => '011', :pad_byte => '0'
11
+ lstring :servico_tipo, :length => 2 , :pad_byte => '0'
12
+ lstring :servico_forma, :length => 2, :pad_byte => '0'
13
+ lstring :servico_layout, :length => 3, :initial_value => '011', :pad_byte => '0'
14
14
 
15
15
  string :cnab_g004_1, :length => 1, :pad_byte => ' '
16
16
 
17
- string :empresa_tipo, :length => 1, :pad_byte => '0'
18
- string :empresa_numero, :length => 14, :pad_byte => '0'
17
+ lstring :empresa_tipo, :length => 1, :pad_byte => '0'
18
+ lstring :empresa_numero, :length => 14, :pad_byte => '0'
19
19
  string :empresa_convenio, :length => 20, :pad_byte => ' '
20
- string :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
20
+ lstring :empresa_agencia_codigo, :length => 5, :pad_byte => '0'
21
21
  string :empresa_agencia_dv, :length => 1, :pad_byte => ' '
22
- string :empresa_conta_numero, :length => 12, :pad_byte => '0'
22
+ lstring :empresa_conta_numero, :length => 12, :pad_byte => '0'
23
23
  string :empresa_conta_dv, :length => 1, :pad_byte => ' '
24
24
  string :empresa_agencia_conta_dv, :length => 1, :pad_byte => ' '
25
25
  string :empresa_nome, :length => 30, :pad_byte => ' '
@@ -27,14 +27,14 @@ module Cnab240::V86::PagamentosTributos
27
27
  string :informacao_1, :length => 40, :pad_byte => ' '
28
28
 
29
29
  string :endereco_logradouro, :length => 30, :pad_byte => ' '
30
- string :endereco_numero, :length => 5, :pad_byte => '0'
30
+ lstring :endereco_numero, :length => 5, :pad_byte => '0'
31
31
  string :endereco_complemento, :length => 15, :pad_byte => ' '
32
32
  string :endereco_cidade, :length => 20, :pad_byte => ' '
33
- string :endereco_cep, :length => 5, :pad_byte => '0'
34
- string :endereco_complemento_cep, :length => 3, :pad_byte => '0'
33
+ lstring :endereco_cep, :length => 5, :pad_byte => '0'
34
+ lstring :endereco_complemento_cep, :length => 3, :pad_byte => '0'
35
35
  string :endereco_estado, :length => 2, :pad_byte => ' '
36
36
 
37
- string :indicativo_forma_pagamento, :length => 2, :pad_byte => '0'
37
+ lstring :indicativo_forma_pagamento, :length => 2, :pad_byte => '0'
38
38
  string :cnab_g004_2, :length => 6, :pad_byte => ' '
39
39
  string :ocorrencias, :length => 10, :pad_byte => ' '
40
40
 
@@ -3,13 +3,13 @@ module Cnab240::V86::PagamentosTributos
3
3
 
4
4
  include Cnab240::DefaultMixin
5
5
 
6
- string :controle_banco, :length => 3, :pad_byte => '0'
7
- string :controle_lote, :length => 4, :pad_byte => '0'
8
- string :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
6
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
7
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
8
+ lstring :controle_registro, :length => 1, :initial_value => '5', :pad_byte => '0'
9
9
 
10
- string :cnab_g004_1, :length => 9, :pad_byte => '0'
11
- string :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
- string :totais_valor, :length => 18, :pad_byte => '0'
10
+ lstring :cnab_g004_1, :length => 9, :pad_byte => '0'
11
+ lstring :totais_qtde_registros, :length => 6, :pad_byte => '0'
12
+ lstring :totais_valor, :length => 18, :pad_byte => '0'
13
13
 
14
14
  string :complemento, :length => 189, :pad_byte => ' '
15
15
  string :ocorrencias, :length => 10, :pad_byte => ' '
@@ -4,41 +4,44 @@ module Cnab240::V40
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
9
- string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
+ lstring :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'A', :pad_byte => ' '
13
- string :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
- string :servico_codigo_movimento, :length => 2, :pad_byte => '0'
15
-
16
- string :favorecido_camara, :length => 3, :pad_byte => '0'
17
- string :favorecido_banco, :length => 3, :pad_byte => '0'
18
- string :favorecido_agencia_codigo, :length => 5, :pad_byte => '0'
19
- string :favorecido_agencia_dv, :length => 1, :pad_byte => ' '
20
- string :favorecido_conta_numero, :length => 12, :pad_byte => '0'
21
- string :favorecido_conta_dv, :length => 1, :pad_byte => ' '
13
+ lstring :servico_codigo_movimento, :length => 3, :pad_byte => '0'
14
+
15
+ lstring :favorecido_camara, :length => 3, :pad_byte => '0'
16
+ lstring :favorecido_banco, :length => 3, :pad_byte => '0'
17
+ string :brancos_1, :length => 1, :pad_byte => '0'
18
+
19
+ lstring :favorecido_agencia_codigo, :length => 4, :pad_byte => '0'
20
+ string :brancos_2, :length => 1, :pad_byte => ' '
21
+ string :brancos_3, :length => 7, :pad_byte => '0'
22
+
23
+ lstring :favorecido_conta_numero, :length => 5, :pad_byte => '0'
24
+ string :brancos_4, :length => 1, :pad_byte => ' '
22
25
  string :favorecido_agencia_conta_dv, :length => 1, :pad_byte => ' '
23
26
  string :favorecido_nome, :length => 30, :pad_byte => ' '
24
27
 
25
- string :credito_seu_numero, :length => 20, :pad_byte => ' '
26
- string :credito_data_pagamento, :length => 8, :pad_byte => '0'
28
+ string :credito_seu_numero, :length => 15, :pad_byte => ' '
29
+ string :brancos_5, :length => 5, :pad_byte => ' '
30
+ lstring :credito_data_pagamento, :length => 8, :pad_byte => '0'
27
31
  string :credito_moeda_tipo, :length => 3, :pad_byte => ' '
28
- string :credito_moeda_quantidade, :length => 15, :pad_byte => '0'
29
- string :credito_valor_pagamento, :length => 15, :pad_byte => '0'
32
+ lstring :credito_moeda_quantidade, :length => 15, :pad_byte => '0'
33
+ lstring :credito_valor_pagamento, :length => 15, :pad_byte => '0'
30
34
  string :credito_nosso_numero, :length => 20, :pad_byte => ' '
31
- string :credito_data_real, :length => 8, :pad_byte => '0'
32
- string :credito_valor_real, :length => 15, :pad_byte => '0'
35
+ lstring :credito_data_real, :length => 8, :pad_byte => '0'
36
+ lstring :credito_valor_real, :length => 15, :pad_byte => '0'
33
37
 
34
- string :informacao_2, :length => 40, :pad_byte => ' '
38
+ string :tipo_mora, :length => 2, :pad_byte => '0'
39
+ string :valor_mora, :length => 17, :pad_byte => '0'
35
40
 
36
- string :codigo_finalidade_doc, :length => 2, :pad_byte => ' '
37
- string :codigo_finalidade_ted, :length => 5, :pad_byte => ' '
38
- string :codigo_finalidade_complementar, :length => 2, :pad_byte => ' '
41
+ string :complemento, :length => 16, :pad_byte => ' '
42
+ string :brancos_6, :length => 4, :pad_byte => ' '
43
+ string :numero_inscricao, :length => 14, :pad_byte => ' '
39
44
 
40
- string :cnab_g004_1, :length => 3, :pad_byte => ' '
41
- string :aviso, :length => 1, :pad_byte => '0'
42
45
  string :ocorrencias, :length => 10, :pad_byte => ' '
43
46
 
44
47
 
@@ -4,32 +4,32 @@ module Cnab240::V86
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
9
  string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'A', :pad_byte => ' '
13
- string :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
- string :servico_codigo_movimento, :length => 2, :pad_byte => '0'
13
+ lstring :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
+ lstring :servico_codigo_movimento, :length => 2, :pad_byte => '0'
15
15
 
16
- string :favorecido_camara, :length => 3, :pad_byte => '0'
17
- string :favorecido_banco, :length => 3, :pad_byte => '0'
18
- string :favorecido_agencia_codigo, :length => 5, :pad_byte => '0'
16
+ lstring :favorecido_camara, :length => 3, :pad_byte => '0'
17
+ lstring :favorecido_banco, :length => 3, :pad_byte => '0'
18
+ lstring :favorecido_agencia_codigo, :length => 5, :pad_byte => '0'
19
19
  string :favorecido_agencia_dv, :length => 1, :pad_byte => ' '
20
- string :favorecido_conta_numero, :length => 12, :pad_byte => '0'
20
+ lstring :favorecido_conta_numero, :length => 12, :pad_byte => '0'
21
21
  string :favorecido_conta_dv, :length => 1, :pad_byte => ' '
22
22
  string :favorecido_agencia_conta_dv, :length => 1, :pad_byte => ' '
23
23
  string :favorecido_nome, :length => 30, :pad_byte => ' '
24
24
 
25
25
  string :credito_seu_numero, :length => 20, :pad_byte => ' '
26
- string :credito_data_pagamento, :length => 8, :pad_byte => '0'
26
+ lstring :credito_data_pagamento, :length => 8, :pad_byte => '0'
27
27
  string :credito_moeda_tipo, :length => 3, :pad_byte => ' '
28
- string :credito_moeda_quantidade, :length => 15, :pad_byte => '0'
29
- string :credito_valor_pagamento, :length => 15, :pad_byte => '0'
28
+ lstring :credito_moeda_quantidade, :length => 15, :pad_byte => '0'
29
+ lstring :credito_valor_pagamento, :length => 15, :pad_byte => '0'
30
30
  string :credito_nosso_numero, :length => 20, :pad_byte => ' '
31
- string :credito_data_real, :length => 8, :pad_byte => '0'
32
- string :credito_valor_real, :length => 15, :pad_byte => '0'
31
+ lstring :credito_data_real, :length => 8, :pad_byte => '0'
32
+ lstring :credito_valor_real, :length => 15, :pad_byte => '0'
33
33
 
34
34
  string :informacao_2, :length => 40, :pad_byte => ' '
35
35
 
@@ -38,7 +38,7 @@ module Cnab240::V86
38
38
  string :codigo_finalidade_complementar, :length => 2, :pad_byte => ' '
39
39
 
40
40
  string :cnab_g004_1, :length => 3, :pad_byte => ' '
41
- string :aviso, :length => 1, :pad_byte => '0'
41
+ lstring :aviso, :length => 1, :pad_byte => '0'
42
42
  string :ocorrencias, :length => 10, :pad_byte => ' '
43
43
 
44
44
 
@@ -4,36 +4,36 @@ module Cnab240::V86
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
9
- string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
+ lstring :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'B', :pad_byte => ' '
13
13
 
14
14
  string :cnab240_g004_1, :length => 3, :pad_byte => ' '
15
15
 
16
- string :favorecido_inscricao_tipo, :length => 1, :pad_byte => '0'
17
- string :favorecido_inscricao_numero, :length => 14, :pad_byte => '0'
16
+ lstring :favorecido_inscricao_tipo, :length => 1, :pad_byte => '0'
17
+ lstring :favorecido_inscricao_numero, :length => 14, :pad_byte => '0'
18
18
  string :favorecido_endereco_logradouro, :length => 30, :pad_byte => ' '
19
- string :favorecido_endereco_numero, :length => 5, :pad_byte => '0'
19
+ lstring :favorecido_endereco_numero, :length => 5, :pad_byte => '0'
20
20
  string :favorecido_endereco_complemento, :length => 15, :pad_byte => ' '
21
21
  string :favorecido_endereco_bairro, :length => 15, :pad_byte => ' '
22
22
  string :favorecido_endereco_cidade, :length => 20, :pad_byte => ' '
23
- string :favorecido_endereco_cep, :length => 5, :pad_byte => '0'
23
+ lstring :favorecido_endereco_cep, :length => 5, :pad_byte => '0'
24
24
  string :favorecido_endereco_cep_complemento, :length => 3, :pad_byte => ' '
25
25
  string :favorecido_endereco_estado, :length => 2, :pad_byte => ' '
26
26
 
27
- string :pagamento_data_vencimento, :length => 8, :pad_byte => '0'
28
- string :pagamento_valor_documento, :length => 15, :pad_byte => '0'
29
- string :pagamento_valor_abatimento, :length => 15, :pad_byte => '0'
30
- string :pagamento_valor_desconto, :length => 15, :pad_byte => '0'
31
- string :pagamento_valor_mora, :length => 15, :pad_byte => '0'
32
- string :pagamento_valor_multa, :length => 15, :pad_byte => '0'
27
+ lstring :pagamento_data_vencimento, :length => 8, :pad_byte => '0'
28
+ lstring :pagamento_valor_documento, :length => 15, :pad_byte => '0'
29
+ lstring :pagamento_valor_abatimento, :length => 15, :pad_byte => '0'
30
+ lstring :pagamento_valor_desconto, :length => 15, :pad_byte => '0'
31
+ lstring :pagamento_valor_mora, :length => 15, :pad_byte => '0'
32
+ lstring :pagamento_valor_multa, :length => 15, :pad_byte => '0'
33
33
 
34
34
  string :codigo_documento_favorecido, :length => 15, :pad_byte => ' '
35
- string :aviso, :length => 1, :pad_byte => '0'
36
- string :codigo_ug, :length => 6, :pad_byte => '0'
35
+ lstring :aviso, :length => 1, :pad_byte => '0'
36
+ lstring :codigo_ug, :length => 6, :pad_byte => '0'
37
37
 
38
38
  string :cnab_g004_2, :length => 8, :pad_byte => ' '
39
39
 
@@ -4,28 +4,28 @@ module Cnab240::V86
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
9
  string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'C', :pad_byte => ' '
13
13
 
14
14
  string :cnab240_g004_1, :length => 3, :pad_byte => ' '
15
15
 
16
- string :complementar_valor_ir, :length => 15, :pad_byte => '0'
17
- string :complementar_valor_iss, :length => 15, :pad_byte => '0'
18
- string :complementar_valor_iof, :length => 15, :pad_byte => '0'
19
- string :complementar_valor_outras_deducoes, :length => 15, :pad_byte => '0'
20
- string :complementar_valor_outros_acrescimos, :length => 15, :pad_byte => '0'
16
+ lstring :complementar_valor_ir, :length => 15, :pad_byte => '0'
17
+ lstring :complementar_valor_iss, :length => 15, :pad_byte => '0'
18
+ lstring :complementar_valor_iof, :length => 15, :pad_byte => '0'
19
+ lstring :complementar_valor_outras_deducoes, :length => 15, :pad_byte => '0'
20
+ lstring :complementar_valor_outros_acrescimos, :length => 15, :pad_byte => '0'
21
21
 
22
- string :substituta_agencia, :length => 5, :pad_byte => '0'
22
+ lstring :substituta_agencia, :length => 5, :pad_byte => '0'
23
23
  string :substituta_agencia_dv, :length => 1, :pad_byte => ' '
24
- string :substituta_numero_cc, :length => 12, :pad_byte => '0'
24
+ lstring :substituta_numero_cc, :length => 12, :pad_byte => '0'
25
25
  string :substituta_conta_dv, :length => 1, :pad_byte => ' '
26
26
  string :substituta_agencia_conta_dv, :length => 1, :pad_byte => ' '
27
27
 
28
- string :valor_inss, :length => 15, :pad_byte => '0'
28
+ lstring :valor_inss, :length => 15, :pad_byte => '0'
29
29
 
30
30
  string :cnab_g004_2, :length => 113, :pad_byte => ' '
31
31
 
@@ -4,28 +4,28 @@ module Cnab240::V86
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
9
- string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
+ lstring :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'J', :pad_byte => ' '
13
- string :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
- string :servico_codigo_movimento, :length => 2, :pad_byte => '0'
13
+ lstring :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
+ lstring :servico_codigo_movimento, :length => 2, :pad_byte => '0'
15
15
 
16
16
  string :codigo_barras, :length => 44, :pad_byte => ' '
17
17
  string :nome_cedente, :length => 30, :pad_byte => ' '
18
- string :data_vencimento, :length => 8, :pad_byte => '0'
19
- string :valor_titulo, :length => 15, :pad_byte => '0'
20
- string :valor_desconto_abatimento, :length => 15, :pad_byte => '0'
21
- string :valor_mora_juros, :length => 15, :pad_byte => '0'
22
- string :data_pagamento, :length => 8, :pad_byte => '0'
23
- string :valor_pagamento, :length => 15, :pad_byte => '0'
24
- string :quantidade_moeda, :length => 15, :pad_byte => '0'
18
+ lstring :data_vencimento, :length => 8, :pad_byte => '0'
19
+ lstring :valor_titulo, :length => 15, :pad_byte => '0'
20
+ lstring :valor_desconto_abatimento, :length => 15, :pad_byte => '0'
21
+ lstring :valor_mora_juros, :length => 15, :pad_byte => '0'
22
+ lstring :data_pagamento, :length => 8, :pad_byte => '0'
23
+ lstring :valor_pagamento, :length => 15, :pad_byte => '0'
24
+ lstring :quantidade_moeda, :length => 15, :pad_byte => '0'
25
25
  string :referencia_sacado, :length => 20, :pad_byte => ' '
26
26
 
27
27
  string :nosso_numero, :length => 20, :pad_byte => ' '
28
- string :codigo_moeda, :length => 2, :pad_byte => '0'
28
+ lstring :codigo_moeda, :length => 2, :pad_byte => '0'
29
29
 
30
30
  string :cnab_g004_1, :length => 6, :pad_byte => ' '
31
31
  string :ocorrencias, :length => 10, :pad_byte => ' '
@@ -4,27 +4,27 @@ module Cnab240::V86
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
9
  string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'J', :pad_byte => ' '
13
- string :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
- string :servico_codigo_movimento, :length => 2, :pad_byte => '0'
13
+ lstring :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
+ lstring :servico_codigo_movimento, :length => 2, :pad_byte => '0'
15
15
 
16
16
  string :cod_registro_opcional, :length => 2, :initial_value => '52'
17
17
 
18
- string :sacado_tipo_inscricao, :length => 1, :pad_byte => '0'
19
- string :sacado_numero_inscricao, :length => 15, :pad_byte => '0'
18
+ lstring :sacado_tipo_inscricao, :length => 1, :pad_byte => '0'
19
+ lstring :sacado_numero_inscricao, :length => 15, :pad_byte => '0'
20
20
  string :sacado_nome, :length => 40, :pad_byte => ' '
21
21
 
22
- string :cedente_tipo_inscricao, :length => 1, :pad_byte => '0'
23
- string :cedente_numero_inscricao, :length => 15, :pad_byte => '0'
22
+ lstring :cedente_tipo_inscricao, :length => 1, :pad_byte => '0'
23
+ lstring :cedente_numero_inscricao, :length => 15, :pad_byte => '0'
24
24
  string :cedente_nome, :length => 40, :pad_byte => ' '
25
25
 
26
- string :sacador_tipo_inscricao, :length => 1, :pad_byte => '0'
27
- string :sacador_numero_inscricao, :length => 15, :pad_byte => '0'
26
+ lstring :sacador_tipo_inscricao, :length => 1, :pad_byte => '0'
27
+ lstring :sacador_numero_inscricao, :length => 15, :pad_byte => '0'
28
28
  string :sacador_nome, :length => 40, :pad_byte => ' '
29
29
 
30
30
 
@@ -4,20 +4,20 @@ module Cnab240::V86
4
4
  include Cnab240::DefaultMixin
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
- string :controle_banco, :length => 3, :pad_byte => '0'
8
- string :controle_lote, :length => 4, :pad_byte => '0'
7
+ lstring :controle_banco, :length => 3, :pad_byte => '0'
8
+ lstring :controle_lote, :length => 4, :pad_byte => '0'
9
9
  string :controle_registro, :length => 1, :initial_value => '3', :pad_byte => '0'
10
10
 
11
- string :servico_numero_registro, :length => 5, :pad_byte => '0'
11
+ lstring :servico_numero_registro, :length => 5, :pad_byte => '0'
12
12
  string :servico_codigo_segmento, :length => 1, :initial_value => 'N', :pad_byte => ' '
13
- string :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
- string :servico_codigo_movimento, :length => 2, :pad_byte => '0'
13
+ lstring :servico_tipo_movimento, :length => 1, :pad_byte => '0'
14
+ lstring :servico_codigo_movimento, :length => 2, :pad_byte => '0'
15
15
 
16
16
  string :seu_numero, :length => 20, :pad_byte => ' '
17
17
  string :nosso_numero, :length => 20, :pad_byte => ' '
18
18
  string :contribuinte, :length => 30, :pad_byte => ' '
19
- string :data_pagamento, :length => 8, :pad_byte => '0'
20
- string :valor_pagamento, :length => 15, :pad_byte => '0'
19
+ lstring :data_pagamento, :length => 8, :pad_byte => '0'
20
+ lstring :valor_pagamento, :length => 15, :pad_byte => '0'
21
21
 
22
22
  # string :informacoes_complementares, :length => 120, :pad_byte => ' '
23
23
  choice :n_complemento, :selection => :get_n do
@@ -5,14 +5,14 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :mes_ano_competencia, :length => 6, :pad_byte => '0'
13
- string :valor_tributo, :length => 15, :pad_byte => '0'
14
- string :valor_outras_entidades, :length => 15, :pad_byte => '0'
15
- string :atualizacao_monetaria, :length => 15, :pad_byte => '0'
12
+ lstring :mes_ano_competencia, :length => 6, :pad_byte => '0'
13
+ lstring :valor_tributo, :length => 15, :pad_byte => '0'
14
+ lstring :valor_outras_entidades, :length => 15, :pad_byte => '0'
15
+ lstring :atualizacao_monetaria, :length => 15, :pad_byte => '0'
16
16
 
17
17
  string :cnab, :length => 45, :pad_byte => ' '
18
18
 
@@ -5,16 +5,16 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :periodo_apuracao, :length => 8, :pad_byte => '0'
13
- string :numero_referencia, :length => 17, :pad_byte => '0'
14
- string :valor_principal, :length => 15, :pad_byte => '0'
15
- string :valor_multa, :length => 15, :pad_byte => '0'
16
- string :valor_juros_encargos, :length => 15, :pad_byte => '0'
17
- string :data_vencimento, :length => 8, :pad_byte => '0'
12
+ lstring :periodo_apuracao, :length => 8, :pad_byte => '0'
13
+ lstring :numero_referencia, :length => 17, :pad_byte => '0'
14
+ lstring :valor_principal, :length => 15, :pad_byte => '0'
15
+ lstring :valor_multa, :length => 15, :pad_byte => '0'
16
+ lstring :valor_juros_encargos, :length => 15, :pad_byte => '0'
17
+ lstring :data_vencimento, :length => 8, :pad_byte => '0'
18
18
 
19
19
  string :cnab, :length => 18, :pad_byte => ' '
20
20
 
@@ -5,16 +5,16 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :periodo_apuracao, :length => 8, :pad_byte => '0'
13
- string :receita_bruta, :length => 15, :pad_byte => '0'
14
- string :percentual, :length => 7, :pad_byte => '0'
15
- string :valor_principal, :length => 15, :pad_byte => '0'
16
- string :valor_multa, :length => 15, :pad_byte => '0'
17
- string :valor_juros_encargos, :length => 15, :pad_byte => '0'
12
+ lstring :periodo_apuracao, :length => 8, :pad_byte => '0'
13
+ lstring :receita_bruta, :length => 15, :pad_byte => '0'
14
+ lstring :percentual, :length => 7, :pad_byte => '0'
15
+ lstring :valor_principal, :length => 15, :pad_byte => '0'
16
+ lstring :valor_multa, :length => 15, :pad_byte => '0'
17
+ lstring :valor_juros_encargos, :length => 15, :pad_byte => '0'
18
18
 
19
19
  string :cnab, :length => 21, :pad_byte => ' '
20
20
 
@@ -5,18 +5,18 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :vencimento, :length => 8, :pad_byte => '0'
13
- string :ie_munic_declar, :length => 12, :pad_byte => '0'
14
- string :divida_ativa_etiqueta, :length => 13, :pad_byte => '0'
15
- string :periodo_referencia, :length => 6, :pad_byte => '0'
16
- string :numero_parcela_notificacao, :length => 13, :pad_byte => '0'
17
- string :valor_receita, :length => 15, :pad_byte => '0'
18
- string :valor_juros_encargos, :length => 14, :pad_byte => '0'
19
- string :valor_multa, :length => 14, :pad_byte => '0'
12
+ lstring :vencimento, :length => 8, :pad_byte => '0'
13
+ lstring :ie_munic_declar, :length => 12, :pad_byte => '0'
14
+ lstring :divida_ativa_etiqueta, :length => 13, :pad_byte => '0'
15
+ lstring :periodo_referencia, :length => 6, :pad_byte => '0'
16
+ lstring :numero_parcela_notificacao, :length => 13, :pad_byte => '0'
17
+ lstring :valor_receita, :length => 15, :pad_byte => '0'
18
+ lstring :valor_juros_encargos, :length => 14, :pad_byte => '0'
19
+ lstring :valor_multa, :length => 14, :pad_byte => '0'
20
20
 
21
21
  string :cnab, :length => 1, :pad_byte => ' '
22
22
 
@@ -5,14 +5,14 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :exercicio, :length => 4, :pad_byte => '0'
13
- string :renavam, :length => 9, :pad_byte => '0'
12
+ lstring :exercicio, :length => 4, :pad_byte => '0'
13
+ lstring :renavam, :length => 9, :pad_byte => '0'
14
14
  string :uf, :length => 2, :pad_byte => ' '
15
- string :municipio, :length => 5, :pad_byte => '0'
15
+ lstring :municipio, :length => 5, :pad_byte => '0'
16
16
  string :placa, :length => 7, :pad_byte => ' '
17
17
  string :opcao_pagamento, :length => 1, :pad_byte => ' '
18
18
 
@@ -5,14 +5,14 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :exercicio, :length => 4, :pad_byte => '0'
13
- string :renavam, :length => 9, :pad_byte => '0'
12
+ lstring :exercicio, :length => 4, :pad_byte => '0'
13
+ lstring :renavam, :length => 9, :pad_byte => '0'
14
14
  string :uf, :length => 2, :pad_byte => ' '
15
- string :municipio, :length => 5, :pad_byte => '0'
15
+ lstring :municipio, :length => 5, :pad_byte => '0'
16
16
  string :placa, :length => 7, :pad_byte => ' '
17
17
  string :opcao_pagamento, :length => 1, :pad_byte => ' '
18
18
 
@@ -5,14 +5,14 @@ module Cnab240::V86
5
5
  include Cnab240::SegmentoMixin
6
6
 
7
7
  string :receita, :length => 6, :pad_byte => ' '
8
- string :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
- string :identificacao_contribuinte, :length => 14, :pad_byte => '0'
8
+ lstring :tipo_identificacao_contribuinte, :length => 2, :pad_byte => '0'
9
+ lstring :identificacao_contribuinte, :length => 14, :pad_byte => '0'
10
10
  string :identificacao_tributo, :length => 2, :pad_byte => ' '
11
11
 
12
- string :exercicio, :length => 4, :pad_byte => '0'
13
- string :renavam, :length => 9, :pad_byte => '0'
12
+ lstring :exercicio, :length => 4, :pad_byte => '0'
13
+ lstring :renavam, :length => 9, :pad_byte => '0'
14
14
  string :uf, :length => 2, :pad_byte => ' '
15
- string :municipio, :length => 5, :pad_byte => '0'
15
+ lstring :municipio, :length => 5, :pad_byte => '0'
16
16
  string :placa, :length => 7, :pad_byte => ' '
17
17
  string :opcao_pagamento, :length => 1, :pad_byte => ' '
18
18
  string :opcao_retirada, :length => 1, :pad_byte => ' '