cnab240santander 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cnab240santander/detalhe.rb +2 -2
- data/lib/cnab240santander/version.rb +1 -1
- data/spec/files/cnab_spec.rb +7 -0
- metadata +3 -3
@@ -46,7 +46,7 @@ module Cnab240santander
|
|
46
46
|
#Serviço
|
47
47
|
vlinha["num_registro_lote2"] = linha[8..12] # Num //No Sequencial do Registro no Lote
|
48
48
|
vlinha["segmento2"] = linha[13..13] # Alfa //Cód. segmento do registro detalhe - U
|
49
|
-
vlinha["
|
49
|
+
vlinha["res_banco4"] = linha[14..14] # Alfa //Reservado (uso Banco) - Brancos
|
50
50
|
vlinha["cod_movimento2"] = linha[15..16] # Num //Código de movimento (ocorrência)
|
51
51
|
#Valores
|
52
52
|
vlinha["juros_multa_encargos"] = preparaMoeda(linha[17..31], 2) # Num //Juros / Multa / Encargos - 2 decimais
|
@@ -65,7 +65,7 @@ module Cnab240santander
|
|
65
65
|
vlinha["valor_ocorrencia_sacado"] = preparaMoeda(linha[165..179], 2) # Num //Valor da ocorrência do sacado - 2 decimais
|
66
66
|
vlinha["comp_ocorrencia_sacado"] = linha[180..209] # Alfa //Complemento da ocorrência do sacado
|
67
67
|
vlinha["banco_compensacao"] = linha[210..212] # Num //Código do Banco correspondente compens.
|
68
|
-
vlinha["
|
68
|
+
vlinha["res_banco5"] = linha[213..239] # Alfa //Reservado (uso Banco) - Brancos
|
69
69
|
end
|
70
70
|
|
71
71
|
return vlinha
|
data/spec/files/cnab_spec.rb
CHANGED
@@ -22,4 +22,11 @@ describe "Cnab240santander" do
|
|
22
22
|
cnab.linhas.should be_kind_of(Array)
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
26
|
+
context "Details merged" do
|
27
|
+
it "should parse the details and merge the U and T segments" do
|
28
|
+
cnab = Cnab240santander.retorno(:path => File.dirname(__FILE__)+"/../../RETORNO.TXT", :retorna => 3, :merge => true)
|
29
|
+
cnab.linhas.should be_kind_of(Array)
|
30
|
+
end
|
31
|
+
end
|
25
32
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnab240santander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lairton Borges
|