formatos-febraban 0.3.48 → 0.3.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/formatos/cnab400/cnab_400.rb +61 -157
- data/lib/formatos/cnab400/cnab_400_detalhe.rb +276 -0
- data/lib/formatos/cnab400/cnab_400_header.rb +175 -0
- data/lib/formatos/cnab400/cnab_400_trailler.rb +84 -0
- data/lib/formatos/febraban.rb +1 -0
- data/lib/formatos/febraban/version.rb +1 -1
- data/lib/formatos/febraban150/febraban_150.rb +5 -4
- data/lib/formatos/febraban150/febraban_150_a.rb +127 -70
- metadata +4 -7
- data/lib/formatos/cnab400/cnab_400_0.rb +0 -194
- data/lib/formatos/cnab400/cnab_400_1.rb +0 -443
- data/lib/formatos/cnab400/cnab_400_2.rb +0 -188
- data/lib/formatos/cnab400/cnab_400_3.rb +0 -194
- data/lib/formatos/cnab400/cnab_400_7.rb +0 -194
- data/lib/formatos/cnab400/cnab_400_9.rb +0 -55
@@ -1,55 +0,0 @@
|
|
1
|
-
|
2
|
-
#-------------------------------------------------------------------
|
3
|
-
#-------------------------------------------------------------------
|
4
|
-
# Header - Empresa e Banco
|
5
|
-
class Cnab4009 < FormatSection
|
6
|
-
require 'date'
|
7
|
-
|
8
|
-
def initialize master
|
9
|
-
super(master, true, true, false)
|
10
|
-
|
11
|
-
@section = Section.new({
|
12
|
-
0 => Position.new(1, 1, true, '9', true), # Identificação do Registro
|
13
|
-
1 => Position.new(2, 394, false, '1'), # Branco
|
14
|
-
2 => Position.new(395, 400, true), # Número Seqüencial de Registro
|
15
|
-
})
|
16
|
-
end
|
17
|
-
|
18
|
-
#-------------------------------------------------------------------
|
19
|
-
#-------------------------------------------------------------------
|
20
|
-
# Gerais
|
21
|
-
def process_section (file)
|
22
|
-
self.set_id_registro (file[1..1])
|
23
|
-
self.set_branco (file[2..393])
|
24
|
-
self.set_seq_registro (file[394..400])
|
25
|
-
end
|
26
|
-
|
27
|
-
#-------------------------------------------------------------------
|
28
|
-
#-------------------------------------------------------------------
|
29
|
-
# Setters
|
30
|
-
def set_id_registro code
|
31
|
-
code = code.to_i
|
32
|
-
|
33
|
-
unless code
|
34
|
-
self.set_section_value(0, code)
|
35
|
-
else
|
36
|
-
raise
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def set_branco branco
|
41
|
-
branco = branco.to_s
|
42
|
-
self.set_section_value(1, branco)
|
43
|
-
end
|
44
|
-
|
45
|
-
def set_seq_registro sequencial
|
46
|
-
sequencial = sequencial.to_i
|
47
|
-
self.set_section_value(2, sequencial)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|