br_boleto 1.2.2 → 2.0.0
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/README.markdown +278 -98
- data/br_boleto.gemspec +5 -3
- data/lib/br_boleto/active_model_base.rb +1 -1
- data/lib/br_boleto/association/have_conta.rb +109 -0
- data/lib/br_boleto/association/have_pagador.rb +38 -0
- data/lib/br_boleto/association/have_pagamentos.rb +44 -0
- data/lib/br_boleto/boleto/base.rb +50 -379
- data/lib/br_boleto/boleto/caixa.rb +28 -143
- data/lib/br_boleto/boleto/sicoob.rb +24 -144
- data/lib/br_boleto/conta/base.rb +288 -0
- data/lib/br_boleto/conta/caixa.rb +109 -0
- data/lib/br_boleto/conta/sicoob.rb +64 -0
- data/lib/br_boleto/helper/default_codes.rb +33 -0
- data/lib/br_boleto/helper/format_value.rb +1 -0
- data/lib/br_boleto/helper/number.rb +30 -0
- data/lib/br_boleto/pagador.rb +82 -0
- data/lib/br_boleto/remessa/base.rb +28 -50
- data/lib/br_boleto/remessa/cnab240/base.rb +22 -131
- data/lib/br_boleto/remessa/cnab240/caixa.rb +16 -62
- data/lib/br_boleto/remessa/cnab240/helper/header_arquivo.rb +7 -7
- data/lib/br_boleto/remessa/cnab240/helper/header_lote.rb +6 -6
- data/lib/br_boleto/remessa/cnab240/helper/segmento_p.rb +22 -22
- data/lib/br_boleto/remessa/cnab240/helper/segmento_q.rb +16 -16
- data/lib/br_boleto/remessa/cnab240/helper/segmento_r.rb +3 -3
- data/lib/br_boleto/remessa/cnab240/helper/segmento_s.rb +3 -3
- data/lib/br_boleto/remessa/cnab240/helper/trailer_arquivo.rb +3 -3
- data/lib/br_boleto/remessa/cnab240/helper/trailer_lote.rb +3 -3
- data/lib/br_boleto/remessa/cnab240/sicoob.rb +36 -73
- data/lib/br_boleto/remessa/cnab400/base.rb +95 -0
- data/lib/br_boleto/remessa/cnab400/helper/detalhe.rb +136 -0
- data/lib/br_boleto/remessa/cnab400/helper/header.rb +114 -0
- data/lib/br_boleto/remessa/cnab400/helper/trailer.rb +50 -0
- data/lib/br_boleto/remessa/cnab400/sicoob.rb +249 -0
- data/lib/br_boleto/remessa/lote.rb +1 -23
- data/lib/br_boleto/remessa/pagamento.rb +188 -51
- data/lib/br_boleto/retorno/base.rb +9 -0
- data/lib/br_boleto/retorno/cnab240/base.rb +2 -10
- data/lib/br_boleto/retorno/cnab400/base.rb +48 -0
- data/lib/br_boleto/retorno/cnab400/sicoob.rb +42 -0
- data/lib/br_boleto/retorno/pagamento.rb +12 -6
- data/lib/br_boleto/string_methods.rb +8 -2
- data/lib/br_boleto/validations.rb +19 -0
- data/lib/br_boleto/version.rb +3 -3
- data/lib/br_boleto.rb +38 -8
- data/lib/config/locales/br-boleto-en.yml +89 -0
- data/lib/config/locales/br-boleto-pt-BR.yml +89 -0
- data/test/br_boleto/association/have_conta_test.rb +319 -0
- data/test/br_boleto/association/have_pagador_test.rb +110 -0
- data/test/br_boleto/association/have_pagamentos_test.rb +113 -0
- data/test/br_boleto/boleto/base_test.rb +127 -201
- data/test/br_boleto/boleto/caixa_test.rb +58 -72
- data/test/br_boleto/boleto/sicoob_test.rb +88 -147
- data/test/br_boleto/conta/base_test.rb +490 -0
- data/test/br_boleto/conta/caixa_test.rb +154 -0
- data/test/br_boleto/conta/sicoob_test.rb +144 -0
- data/test/br_boleto/helper/number_test.rb +29 -0
- data/test/br_boleto/pagador_test.rb +158 -0
- data/test/br_boleto/remessa/base_test.rb +37 -62
- data/test/br_boleto/remessa/cnab240/base_test.rb +75 -95
- data/test/br_boleto/remessa/cnab240/caixa_test.rb +61 -96
- data/test/br_boleto/remessa/cnab240/helper/header_arquivo_test.rb +11 -11
- data/test/br_boleto/remessa/cnab240/helper/header_lote_test.rb +8 -8
- data/test/br_boleto/remessa/cnab240/helper/segmento_p_test.rb +17 -15
- data/test/br_boleto/remessa/cnab240/helper/segmento_q_test.rb +13 -13
- data/test/br_boleto/remessa/cnab240/helper/segmento_r_test.rb +2 -2
- data/test/br_boleto/remessa/cnab240/helper/segmento_s_test.rb +3 -3
- data/test/br_boleto/remessa/cnab240/helper/trailer_arquivo_test.rb +1 -1
- data/test/br_boleto/remessa/cnab240/helper/trailer_lote_test.rb +1 -1
- data/test/br_boleto/remessa/cnab240/sicoob_test.rb +136 -131
- data/test/br_boleto/remessa/cnab400/base_test.rb +263 -0
- data/test/br_boleto/remessa/cnab400/sicoob_test.rb +179 -0
- data/test/br_boleto/remessa/lote_test.rb +2 -41
- data/test/br_boleto/remessa/pagamento_test.rb +186 -188
- data/test/br_boleto/retorno/base_test.rb +0 -1
- data/test/br_boleto/retorno/cnab240/base_test.rb +12 -11
- data/test/br_boleto/retorno/cnab240/caixa_test.rb +11 -11
- data/test/br_boleto/retorno/cnab240/sicoob_test.rb +11 -11
- data/test/br_boleto/retorno/cnab400/sicoob_test.rb +227 -0
- data/test/br_boleto/retorno/pagamento_test.rb +6 -6
- data/test/factories/boleto/base.rb +9 -7
- data/test/factories/boleto/boleto_caixa.rb +2 -9
- data/test/factories/boleto/boleto_sicoob.rb +10 -8
- data/test/factories/conta/base.rb +10 -0
- data/test/factories/conta/caixa.rb +15 -0
- data/test/factories/conta/sicoob.rb +16 -0
- data/test/factories/pagador.rb +15 -0
- data/test/factories/remessa/base.rb +0 -6
- data/test/factories/remessa/cnab240/base.rb +0 -10
- data/test/factories/remessa/cnab240/caixa.rb +1 -6
- data/test/factories/remessa/cnab240/sicoob.rb +1 -10
- data/test/factories/remessa/cnab400/base.rb +8 -0
- data/test/factories/remessa/cnab400/sicoob.rb +8 -0
- data/test/factories/remessa/pagamento.rb +8 -7
- data/test/fixtures/remessa/cnab240/sicoob.rem +8 -0
- data/test/{files → fixtures}/retorno/cnab240/caixa.ret +0 -0
- data/test/{files → fixtures}/retorno/cnab240/padrao240.ret +0 -0
- data/test/fixtures/retorno/cnab400/sicoob.ret +7 -0
- data/test/inheritance/boleto_test.rb +4 -1
- data/test/inheritance/sicoob_test.rb +23 -7
- data/test/test_helper.rb +70 -0
- metadata +63 -6
|
@@ -3,7 +3,8 @@ require 'test_helper'
|
|
|
3
3
|
require 'pry'
|
|
4
4
|
describe BrBoleto::Retorno::Cnab240::Base do
|
|
5
5
|
subject { BrBoleto::Retorno::Cnab240::Base.new(file) }
|
|
6
|
-
let(:file) {
|
|
6
|
+
let(:file) { open_fixture('retorno/cnab240/padrao240.ret') }
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
it "Deve ler o código do banco" do
|
|
9
10
|
subject.codigo_banco.must_equal '756'
|
|
@@ -43,8 +44,8 @@ describe BrBoleto::Retorno::Cnab240::Base do
|
|
|
43
44
|
pagamento.valor_iof.must_equal 0.0
|
|
44
45
|
pagamento.valor_pago.must_equal 129.39
|
|
45
46
|
pagamento.valor_liquido.must_equal 129.39
|
|
46
|
-
pagamento.
|
|
47
|
-
pagamento.
|
|
47
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
48
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
48
49
|
pagamento.data_ocorrencia.must_equal Date.parse('02/05/2016')
|
|
49
50
|
pagamento.data_credito.must_equal Date.parse('03/05/2016')
|
|
50
51
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -83,8 +84,8 @@ describe BrBoleto::Retorno::Cnab240::Base do
|
|
|
83
84
|
pagamento.valor_iof.must_equal 0.0
|
|
84
85
|
pagamento.valor_pago.must_equal 29.0
|
|
85
86
|
pagamento.valor_liquido.must_equal 29.0
|
|
86
|
-
pagamento.
|
|
87
|
-
pagamento.
|
|
87
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
88
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
88
89
|
pagamento.data_ocorrencia.must_equal Date.parse('05/05/2016')
|
|
89
90
|
pagamento.data_credito.must_equal Date.parse('06/05/2016')
|
|
90
91
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -123,8 +124,8 @@ describe BrBoleto::Retorno::Cnab240::Base do
|
|
|
123
124
|
pagamento.valor_iof.must_equal 0.0
|
|
124
125
|
pagamento.valor_pago.must_equal 89.1
|
|
125
126
|
pagamento.valor_liquido.must_equal 89.1
|
|
126
|
-
pagamento.
|
|
127
|
-
pagamento.
|
|
127
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
128
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
128
129
|
pagamento.data_ocorrencia.must_equal Date.parse('05/05/2016')
|
|
129
130
|
pagamento.data_credito.must_equal Date.parse('06/05/2016')
|
|
130
131
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -163,8 +164,8 @@ describe BrBoleto::Retorno::Cnab240::Base do
|
|
|
163
164
|
pagamento.valor_iof.must_equal 0.0
|
|
164
165
|
pagamento.valor_pago.must_equal 29.0
|
|
165
166
|
pagamento.valor_liquido.must_equal 29.0
|
|
166
|
-
pagamento.
|
|
167
|
-
pagamento.
|
|
167
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
168
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
168
169
|
pagamento.data_ocorrencia.must_equal Date.parse('06/05/2016')
|
|
169
170
|
pagamento.data_credito.must_equal nil
|
|
170
171
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -202,8 +203,8 @@ describe BrBoleto::Retorno::Cnab240::Base do
|
|
|
202
203
|
pagamento.valor_iof.must_equal 0.0
|
|
203
204
|
pagamento.valor_pago.must_equal 47.37
|
|
204
205
|
pagamento.valor_liquido.must_equal 47.37
|
|
205
|
-
pagamento.
|
|
206
|
-
pagamento.
|
|
206
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
207
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
207
208
|
pagamento.data_ocorrencia.must_equal Date.parse('06/05/2016')
|
|
208
209
|
pagamento.data_credito.must_equal nil
|
|
209
210
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
|
2
2
|
|
|
3
3
|
describe BrBoleto::Retorno::Cnab240::Caixa do
|
|
4
4
|
subject { BrBoleto::Retorno::Cnab240::Caixa.new(file) }
|
|
5
|
-
let(:file) {
|
|
5
|
+
let(:file) { open_fixture('retorno/cnab240/caixa.ret') }
|
|
6
6
|
|
|
7
7
|
it "Deve ler o código do banco" do
|
|
8
8
|
subject.codigo_banco.must_equal '104'
|
|
@@ -42,8 +42,8 @@ describe BrBoleto::Retorno::Cnab240::Caixa do
|
|
|
42
42
|
pagamento.valor_iof.must_equal 0.0
|
|
43
43
|
pagamento.valor_pago.must_equal 129.39
|
|
44
44
|
pagamento.valor_liquido.must_equal 129.39
|
|
45
|
-
pagamento.
|
|
46
|
-
pagamento.
|
|
45
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
46
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
47
47
|
pagamento.data_ocorrencia.must_equal Date.parse('02/05/2016')
|
|
48
48
|
pagamento.data_credito.must_equal Date.parse('03/05/2016')
|
|
49
49
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -82,8 +82,8 @@ describe BrBoleto::Retorno::Cnab240::Caixa do
|
|
|
82
82
|
pagamento.valor_iof.must_equal 0.0
|
|
83
83
|
pagamento.valor_pago.must_equal 29.0
|
|
84
84
|
pagamento.valor_liquido.must_equal 29.0
|
|
85
|
-
pagamento.
|
|
86
|
-
pagamento.
|
|
85
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
86
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
87
87
|
pagamento.data_ocorrencia.must_equal Date.parse('05/05/2016')
|
|
88
88
|
pagamento.data_credito.must_equal Date.parse('06/05/2016')
|
|
89
89
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -122,8 +122,8 @@ describe BrBoleto::Retorno::Cnab240::Caixa do
|
|
|
122
122
|
pagamento.valor_iof.must_equal 0.0
|
|
123
123
|
pagamento.valor_pago.must_equal 89.1
|
|
124
124
|
pagamento.valor_liquido.must_equal 89.1
|
|
125
|
-
pagamento.
|
|
126
|
-
pagamento.
|
|
125
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
126
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
127
127
|
pagamento.data_ocorrencia.must_equal Date.parse('05/05/2016')
|
|
128
128
|
pagamento.data_credito.must_equal Date.parse('06/05/2016')
|
|
129
129
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -162,8 +162,8 @@ describe BrBoleto::Retorno::Cnab240::Caixa do
|
|
|
162
162
|
pagamento.valor_iof.must_equal 0.0
|
|
163
163
|
pagamento.valor_pago.must_equal 29.0
|
|
164
164
|
pagamento.valor_liquido.must_equal 29.0
|
|
165
|
-
pagamento.
|
|
166
|
-
pagamento.
|
|
165
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
166
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
167
167
|
pagamento.data_ocorrencia.must_equal Date.parse('06/05/2016')
|
|
168
168
|
pagamento.data_credito.must_equal nil
|
|
169
169
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -202,8 +202,8 @@ describe BrBoleto::Retorno::Cnab240::Caixa do
|
|
|
202
202
|
pagamento.valor_iof.must_equal 0.0
|
|
203
203
|
pagamento.valor_pago.must_equal 47.37
|
|
204
204
|
pagamento.valor_liquido.must_equal 47.37
|
|
205
|
-
pagamento.
|
|
206
|
-
pagamento.
|
|
205
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
206
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
207
207
|
pagamento.data_ocorrencia.must_equal Date.parse('06/05/2016')
|
|
208
208
|
pagamento.data_credito.must_equal nil
|
|
209
209
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -2,7 +2,7 @@ require 'test_helper'
|
|
|
2
2
|
|
|
3
3
|
describe BrBoleto::Retorno::Cnab240::Sicoob do
|
|
4
4
|
subject { BrBoleto::Retorno::Cnab240::Sicoob.new(file) }
|
|
5
|
-
let(:file) {
|
|
5
|
+
let(:file) { open_fixture('retorno/cnab240/padrao240.ret') }
|
|
6
6
|
|
|
7
7
|
it "Deve ler o código do banco" do
|
|
8
8
|
subject.codigo_banco.must_equal '756'
|
|
@@ -42,8 +42,8 @@ describe BrBoleto::Retorno::Cnab240::Sicoob do
|
|
|
42
42
|
pagamento.valor_iof.must_equal 0.0
|
|
43
43
|
pagamento.valor_pago.must_equal 129.39
|
|
44
44
|
pagamento.valor_liquido.must_equal 129.39
|
|
45
|
-
pagamento.
|
|
46
|
-
pagamento.
|
|
45
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
46
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
47
47
|
pagamento.data_ocorrencia.must_equal Date.parse('02/05/2016')
|
|
48
48
|
pagamento.data_credito.must_equal Date.parse('03/05/2016')
|
|
49
49
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -82,8 +82,8 @@ describe BrBoleto::Retorno::Cnab240::Sicoob do
|
|
|
82
82
|
pagamento.valor_iof.must_equal 0.0
|
|
83
83
|
pagamento.valor_pago.must_equal 29.0
|
|
84
84
|
pagamento.valor_liquido.must_equal 29.0
|
|
85
|
-
pagamento.
|
|
86
|
-
pagamento.
|
|
85
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
86
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
87
87
|
pagamento.data_ocorrencia.must_equal Date.parse('05/05/2016')
|
|
88
88
|
pagamento.data_credito.must_equal Date.parse('06/05/2016')
|
|
89
89
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -122,8 +122,8 @@ describe BrBoleto::Retorno::Cnab240::Sicoob do
|
|
|
122
122
|
pagamento.valor_iof.must_equal 0.0
|
|
123
123
|
pagamento.valor_pago.must_equal 89.1
|
|
124
124
|
pagamento.valor_liquido.must_equal 89.1
|
|
125
|
-
pagamento.
|
|
126
|
-
pagamento.
|
|
125
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
126
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
127
127
|
pagamento.data_ocorrencia.must_equal Date.parse('05/05/2016')
|
|
128
128
|
pagamento.data_credito.must_equal Date.parse('06/05/2016')
|
|
129
129
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -162,8 +162,8 @@ describe BrBoleto::Retorno::Cnab240::Sicoob do
|
|
|
162
162
|
pagamento.valor_iof.must_equal 0.0
|
|
163
163
|
pagamento.valor_pago.must_equal 29.0
|
|
164
164
|
pagamento.valor_liquido.must_equal 29.0
|
|
165
|
-
pagamento.
|
|
166
|
-
pagamento.
|
|
165
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
166
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
167
167
|
pagamento.data_ocorrencia.must_equal Date.parse('06/05/2016')
|
|
168
168
|
pagamento.data_credito.must_equal nil
|
|
169
169
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -202,8 +202,8 @@ describe BrBoleto::Retorno::Cnab240::Sicoob do
|
|
|
202
202
|
pagamento.valor_iof.must_equal 0.0
|
|
203
203
|
pagamento.valor_pago.must_equal 47.37
|
|
204
204
|
pagamento.valor_liquido.must_equal 47.37
|
|
205
|
-
pagamento.
|
|
206
|
-
pagamento.
|
|
205
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
206
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
207
207
|
pagamento.data_ocorrencia.must_equal Date.parse('06/05/2016')
|
|
208
208
|
pagamento.data_credito.must_equal nil
|
|
209
209
|
pagamento.codigo_ocorrencia_sacado.must_equal ""
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
describe BrBoleto::Retorno::Cnab400::Sicoob do
|
|
4
|
+
subject { BrBoleto::Retorno::Cnab400::Sicoob.new(file) }
|
|
5
|
+
let(:file) { open_fixture('retorno/cnab400/sicoob.ret') }
|
|
6
|
+
|
|
7
|
+
it "Deve ler o código do banco" do
|
|
8
|
+
subject.codigo_banco.must_equal '756'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it "Deve carregar 5 pagamentos" do
|
|
12
|
+
subject.pagamentos.size.must_equal 5
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe "deve setar as informações corretas para os pagamentos" do
|
|
16
|
+
it "valores para o pagamento 1" do
|
|
17
|
+
pagamento = subject.pagamentos[0]
|
|
18
|
+
pagamento.modalidade.must_equal '01'
|
|
19
|
+
pagamento.agencia_com_dv.must_equal "30690"
|
|
20
|
+
pagamento.agencia_sem_dv.must_equal "3069"
|
|
21
|
+
pagamento.numero_conta_com_dv.must_equal "000567329"
|
|
22
|
+
pagamento.numero_conta_sem_dv.must_equal "00056732"
|
|
23
|
+
pagamento.nosso_numero.must_equal "000000157595"
|
|
24
|
+
pagamento.carteira.must_equal "1"
|
|
25
|
+
pagamento.numero_documento.must_equal "000000000157595"
|
|
26
|
+
pagamento.data_vencimento.must_equal Date.parse('16/09/2016')
|
|
27
|
+
pagamento.valor_titulo.must_equal 400.0
|
|
28
|
+
pagamento.banco_recebedor.must_equal "756"
|
|
29
|
+
pagamento.agencia_recebedora_com_dv.must_equal "30690"
|
|
30
|
+
pagamento.sacado_documento.must_equal "00000000000000"
|
|
31
|
+
pagamento.valor_tarifa.must_equal 1.89
|
|
32
|
+
pagamento.valor_juros_multa.must_equal 0.0
|
|
33
|
+
pagamento.valor_desconto.must_equal 10.0
|
|
34
|
+
pagamento.valor_abatimento.must_equal 0.0
|
|
35
|
+
pagamento.valor_iof.must_equal 0.0
|
|
36
|
+
pagamento.valor_pago.must_equal 390.0
|
|
37
|
+
pagamento.valor_liquido.must_equal 390.0
|
|
38
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
39
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
40
|
+
pagamento.data_ocorrencia.must_equal Date.parse('05/09/2016')
|
|
41
|
+
pagamento.data_credito.must_equal Date.parse('05/09/2016')
|
|
42
|
+
pagamento.data_ocorrencia_sacado.must_equal Date.parse('05/09/2016')
|
|
43
|
+
pagamento.valor_ocorrencia_sacado.must_equal 390.0
|
|
44
|
+
pagamento.parcela.must_equal '01'
|
|
45
|
+
pagamento.especie_titulo.must_equal '01'
|
|
46
|
+
pagamento.codigo_ocorrencia_sacado.must_be_nil
|
|
47
|
+
pagamento.dv_conta_e_agencia.must_be_nil
|
|
48
|
+
pagamento.identificacao_titulo_empresa.must_be_nil
|
|
49
|
+
pagamento.codigo_moeda.must_be_nil
|
|
50
|
+
pagamento.sacado_tipo_documento.must_be_nil
|
|
51
|
+
pagamento.sacado_nome.must_be_nil
|
|
52
|
+
pagamento.numero_contrato.must_be_nil
|
|
53
|
+
pagamento.motivo_ocorrencia.must_be_nil
|
|
54
|
+
pagamento.complemento_ocorrencia_sacado.must_be_nil
|
|
55
|
+
pagamento.codigo_ocorrencia_banco_correspondente.must_be_nil
|
|
56
|
+
pagamento.nosso_numero_banco_correspondente.must_be_nil
|
|
57
|
+
end
|
|
58
|
+
it "valores para o pagamento 2" do
|
|
59
|
+
pagamento = subject.pagamentos[1]
|
|
60
|
+
pagamento.modalidade.must_equal '02'
|
|
61
|
+
pagamento.agencia_com_dv.must_equal "30690"
|
|
62
|
+
pagamento.agencia_sem_dv.must_equal "3069"
|
|
63
|
+
pagamento.numero_conta_com_dv.must_equal "000567329"
|
|
64
|
+
pagamento.numero_conta_sem_dv.must_equal "00056732"
|
|
65
|
+
pagamento.nosso_numero.must_equal "000000152106"
|
|
66
|
+
pagamento.carteira.must_equal "2"
|
|
67
|
+
pagamento.numero_documento.must_equal "000000000152106"
|
|
68
|
+
pagamento.data_vencimento.must_equal Date.parse('10/09/2016')
|
|
69
|
+
pagamento.valor_titulo.must_equal 59.0
|
|
70
|
+
pagamento.banco_recebedor.must_equal "104"
|
|
71
|
+
pagamento.agencia_recebedora_com_dv.must_equal "07010"
|
|
72
|
+
pagamento.sacado_documento.must_equal "11111111111111"
|
|
73
|
+
pagamento.valor_tarifa.must_equal 2.29
|
|
74
|
+
pagamento.valor_juros_multa.must_equal 0.0
|
|
75
|
+
pagamento.valor_desconto.must_equal 0.0
|
|
76
|
+
pagamento.valor_abatimento.must_equal 0.0
|
|
77
|
+
pagamento.valor_iof.must_equal 0.0
|
|
78
|
+
pagamento.valor_pago.must_equal 59.0
|
|
79
|
+
pagamento.valor_liquido.must_equal 59.0
|
|
80
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
81
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
82
|
+
pagamento.data_ocorrencia.must_equal Date.parse('05/09/2016')
|
|
83
|
+
pagamento.data_credito.must_equal Date.parse('05/09/2016')
|
|
84
|
+
pagamento.data_ocorrencia_sacado.must_equal Date.parse('05/09/2016')
|
|
85
|
+
pagamento.valor_ocorrencia_sacado.must_equal 59.0
|
|
86
|
+
pagamento.parcela.must_equal '01'
|
|
87
|
+
pagamento.especie_titulo.must_equal '02'
|
|
88
|
+
pagamento.codigo_ocorrencia_sacado.must_be_nil
|
|
89
|
+
pagamento.dv_conta_e_agencia.must_be_nil
|
|
90
|
+
pagamento.identificacao_titulo_empresa.must_be_nil
|
|
91
|
+
pagamento.codigo_moeda.must_be_nil
|
|
92
|
+
pagamento.sacado_tipo_documento.must_be_nil
|
|
93
|
+
pagamento.sacado_nome.must_be_nil
|
|
94
|
+
pagamento.numero_contrato.must_be_nil
|
|
95
|
+
pagamento.motivo_ocorrencia.must_be_nil
|
|
96
|
+
pagamento.complemento_ocorrencia_sacado.must_be_nil
|
|
97
|
+
pagamento.codigo_ocorrencia_banco_correspondente.must_be_nil
|
|
98
|
+
pagamento.nosso_numero_banco_correspondente.must_be_nil
|
|
99
|
+
end
|
|
100
|
+
it "valores para o pagamento 3" do
|
|
101
|
+
pagamento = subject.pagamentos[2]
|
|
102
|
+
pagamento.modalidade.must_equal '03'
|
|
103
|
+
pagamento.agencia_com_dv.must_equal "30690"
|
|
104
|
+
pagamento.agencia_sem_dv.must_equal "3069"
|
|
105
|
+
pagamento.numero_conta_com_dv.must_equal "000567329"
|
|
106
|
+
pagamento.numero_conta_sem_dv.must_equal "00056732"
|
|
107
|
+
pagamento.nosso_numero.must_equal "000000156601"
|
|
108
|
+
pagamento.carteira.must_equal "3"
|
|
109
|
+
pagamento.numero_documento.must_equal "000000000156601"
|
|
110
|
+
pagamento.data_vencimento.must_equal Date.parse('05/09/2016')
|
|
111
|
+
pagamento.valor_titulo.must_equal 250.0
|
|
112
|
+
pagamento.banco_recebedor.must_equal "104"
|
|
113
|
+
pagamento.agencia_recebedora_com_dv.must_equal "05800"
|
|
114
|
+
pagamento.sacado_documento.must_equal "22222222222222"
|
|
115
|
+
pagamento.valor_tarifa.must_equal 2.29
|
|
116
|
+
pagamento.valor_juros_multa.must_equal 0.0
|
|
117
|
+
pagamento.valor_desconto.must_equal 0.0
|
|
118
|
+
pagamento.valor_abatimento.must_equal 0.0
|
|
119
|
+
pagamento.valor_iof.must_equal 0.0
|
|
120
|
+
pagamento.valor_pago.must_equal 250.0
|
|
121
|
+
pagamento.valor_liquido.must_equal 250.0
|
|
122
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
123
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
124
|
+
pagamento.data_ocorrencia.must_equal Date.parse('05/09/2016')
|
|
125
|
+
pagamento.data_credito.must_equal Date.parse('05/09/2016')
|
|
126
|
+
pagamento.data_ocorrencia_sacado.must_equal Date.parse('05/09/2016')
|
|
127
|
+
pagamento.valor_ocorrencia_sacado.must_equal 250.0
|
|
128
|
+
pagamento.parcela.must_equal '01'
|
|
129
|
+
pagamento.especie_titulo.must_equal '03'
|
|
130
|
+
pagamento.codigo_ocorrencia_sacado.must_be_nil
|
|
131
|
+
pagamento.dv_conta_e_agencia.must_be_nil
|
|
132
|
+
pagamento.identificacao_titulo_empresa.must_be_nil
|
|
133
|
+
pagamento.codigo_moeda.must_be_nil
|
|
134
|
+
pagamento.sacado_tipo_documento.must_be_nil
|
|
135
|
+
pagamento.sacado_nome.must_be_nil
|
|
136
|
+
pagamento.numero_contrato.must_be_nil
|
|
137
|
+
pagamento.motivo_ocorrencia.must_be_nil
|
|
138
|
+
pagamento.complemento_ocorrencia_sacado.must_be_nil
|
|
139
|
+
pagamento.codigo_ocorrencia_banco_correspondente.must_be_nil
|
|
140
|
+
pagamento.nosso_numero_banco_correspondente.must_be_nil
|
|
141
|
+
end
|
|
142
|
+
it "valores para o pagamento 4" do
|
|
143
|
+
pagamento = subject.pagamentos[3]
|
|
144
|
+
pagamento.modalidade.must_equal '01'
|
|
145
|
+
pagamento.agencia_com_dv.must_equal "30690"
|
|
146
|
+
pagamento.agencia_sem_dv.must_equal "3069"
|
|
147
|
+
pagamento.numero_conta_com_dv.must_equal "000567329"
|
|
148
|
+
pagamento.numero_conta_sem_dv.must_equal "00056732"
|
|
149
|
+
pagamento.nosso_numero.must_equal "000000157517"
|
|
150
|
+
pagamento.carteira.must_equal "1"
|
|
151
|
+
pagamento.numero_documento.must_equal "000000000157517"
|
|
152
|
+
pagamento.data_vencimento.must_equal Date.parse('10/09/2016')
|
|
153
|
+
pagamento.valor_titulo.must_equal 50.0
|
|
154
|
+
pagamento.banco_recebedor.must_equal "001"
|
|
155
|
+
pagamento.agencia_recebedora_com_dv.must_equal "83480"
|
|
156
|
+
pagamento.sacado_documento.must_equal "33333333333333"
|
|
157
|
+
pagamento.valor_tarifa.must_equal 2.29
|
|
158
|
+
pagamento.valor_juros_multa.must_equal 0.0
|
|
159
|
+
pagamento.valor_desconto.must_equal 0.0
|
|
160
|
+
pagamento.valor_abatimento.must_equal 0.0
|
|
161
|
+
pagamento.valor_iof.must_equal 0.0
|
|
162
|
+
pagamento.valor_pago.must_equal 50.0
|
|
163
|
+
pagamento.valor_liquido.must_equal 50.0
|
|
164
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
165
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
166
|
+
pagamento.data_ocorrencia.must_equal Date.parse('05/09/2016')
|
|
167
|
+
pagamento.data_credito.must_equal Date.parse('05/09/2016')
|
|
168
|
+
pagamento.data_ocorrencia_sacado.must_equal Date.parse('05/09/2016')
|
|
169
|
+
pagamento.valor_ocorrencia_sacado.must_equal 50.0
|
|
170
|
+
pagamento.parcela.must_equal '01'
|
|
171
|
+
pagamento.especie_titulo.must_equal '04'
|
|
172
|
+
pagamento.codigo_ocorrencia_sacado.must_be_nil
|
|
173
|
+
pagamento.dv_conta_e_agencia.must_be_nil
|
|
174
|
+
pagamento.identificacao_titulo_empresa.must_be_nil
|
|
175
|
+
pagamento.codigo_moeda.must_be_nil
|
|
176
|
+
pagamento.sacado_tipo_documento.must_be_nil
|
|
177
|
+
pagamento.sacado_nome.must_be_nil
|
|
178
|
+
pagamento.numero_contrato.must_be_nil
|
|
179
|
+
pagamento.motivo_ocorrencia.must_be_nil
|
|
180
|
+
pagamento.complemento_ocorrencia_sacado.must_be_nil
|
|
181
|
+
pagamento.codigo_ocorrencia_banco_correspondente.must_be_nil
|
|
182
|
+
pagamento.nosso_numero_banco_correspondente.must_be_nil
|
|
183
|
+
end
|
|
184
|
+
it "valores para o pagamento 5" do
|
|
185
|
+
pagamento = subject.pagamentos[4]
|
|
186
|
+
pagamento.modalidade.must_equal '01'
|
|
187
|
+
pagamento.agencia_com_dv.must_equal "30690"
|
|
188
|
+
pagamento.agencia_sem_dv.must_equal "3069"
|
|
189
|
+
pagamento.numero_conta_com_dv.must_equal "000567329"
|
|
190
|
+
pagamento.numero_conta_sem_dv.must_equal "00056732"
|
|
191
|
+
pagamento.nosso_numero.must_equal "000000157610"
|
|
192
|
+
pagamento.carteira.must_equal "1"
|
|
193
|
+
pagamento.numero_documento.must_equal "000000000157610"
|
|
194
|
+
pagamento.data_vencimento.must_equal Date.parse('12/09/2016')
|
|
195
|
+
pagamento.valor_titulo.must_equal 350.0
|
|
196
|
+
pagamento.banco_recebedor.must_equal "756"
|
|
197
|
+
pagamento.agencia_recebedora_com_dv.must_equal "30690"
|
|
198
|
+
pagamento.sacado_documento.must_equal "44444444444444"
|
|
199
|
+
pagamento.valor_tarifa.must_equal 1.89
|
|
200
|
+
pagamento.valor_juros_multa.must_equal 0.0
|
|
201
|
+
pagamento.valor_desconto.must_equal 0.0
|
|
202
|
+
pagamento.valor_abatimento.must_equal 0.0
|
|
203
|
+
pagamento.valor_iof.must_equal 0.0
|
|
204
|
+
pagamento.valor_pago.must_equal 350.0
|
|
205
|
+
pagamento.valor_liquido.must_equal 350.0
|
|
206
|
+
pagamento.valor_outras_despesas.must_equal 0.0
|
|
207
|
+
pagamento.valor_outros_creditos.must_equal 0.0
|
|
208
|
+
pagamento.data_ocorrencia.must_equal Date.parse('05/09/2016')
|
|
209
|
+
pagamento.data_credito.must_equal Date.parse('05/09/2016')
|
|
210
|
+
pagamento.data_ocorrencia_sacado.must_equal Date.parse('05/09/2016')
|
|
211
|
+
pagamento.valor_ocorrencia_sacado.must_equal 350.0
|
|
212
|
+
pagamento.parcela.must_equal '01'
|
|
213
|
+
pagamento.especie_titulo.must_equal '05'
|
|
214
|
+
pagamento.codigo_ocorrencia_sacado.must_be_nil
|
|
215
|
+
pagamento.dv_conta_e_agencia.must_be_nil
|
|
216
|
+
pagamento.identificacao_titulo_empresa.must_be_nil
|
|
217
|
+
pagamento.codigo_moeda.must_be_nil
|
|
218
|
+
pagamento.sacado_tipo_documento.must_be_nil
|
|
219
|
+
pagamento.sacado_nome.must_be_nil
|
|
220
|
+
pagamento.numero_contrato.must_be_nil
|
|
221
|
+
pagamento.motivo_ocorrencia.must_be_nil
|
|
222
|
+
pagamento.complemento_ocorrencia_sacado.must_be_nil
|
|
223
|
+
pagamento.codigo_ocorrencia_banco_correspondente.must_be_nil
|
|
224
|
+
pagamento.nosso_numero_banco_correspondente.must_be_nil
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
end
|
|
@@ -145,20 +145,20 @@ describe BrBoleto::Retorno::Pagamento do
|
|
|
145
145
|
subject.valor_titulo.must_equal 7_745.67
|
|
146
146
|
end
|
|
147
147
|
end
|
|
148
|
-
describe "#
|
|
148
|
+
describe "#valor_outras_despesas" do
|
|
149
149
|
it "deve converter o valor string para float mantendo os 2 ultimos characteres com decimais" do
|
|
150
|
-
subject.
|
|
151
|
-
subject.
|
|
150
|
+
subject.valor_outras_despesas = '00087944'
|
|
151
|
+
subject.valor_outras_despesas.must_equal 879.44
|
|
152
152
|
end
|
|
153
153
|
it "se o valor setado for um numero deve mante-lo" do
|
|
154
154
|
subject.valor_titulo = 7_745.67
|
|
155
155
|
subject.valor_titulo.must_equal 7_745.67
|
|
156
156
|
end
|
|
157
157
|
end
|
|
158
|
-
describe "#
|
|
158
|
+
describe "#valor_outros_creditos" do
|
|
159
159
|
it "deve converter o valor string para float mantendo os 2 ultimos characteres com decimais" do
|
|
160
|
-
subject.
|
|
161
|
-
subject.
|
|
160
|
+
subject.valor_outros_creditos = '00087944'
|
|
161
|
+
subject.valor_outros_creditos.must_equal 879.44
|
|
162
162
|
end
|
|
163
163
|
it "se o valor setado for um numero deve mante-lo" do
|
|
164
164
|
subject.valor_titulo = 7_745.67
|
|
@@ -5,13 +5,15 @@ FactoryGirl.define do
|
|
|
5
5
|
numero_documento '191075'
|
|
6
6
|
valor_documento 101.99
|
|
7
7
|
data_vencimento Date.new(2015, 07, 10)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
|
|
9
|
+
# carteira '175'
|
|
10
|
+
# agencia '0098'
|
|
11
|
+
# conta_corrente '98701'
|
|
12
|
+
# cedente 'Nome da razao social'
|
|
13
|
+
# sacado 'Teste'
|
|
14
|
+
# documento_sacado '725.275.005-10'
|
|
15
|
+
# endereco_sacado 'Rua teste, 23045'
|
|
16
|
+
|
|
15
17
|
instrucoes1 'Lembrar de algo 1'
|
|
16
18
|
instrucoes2 'Lembrar de algo 2'
|
|
17
19
|
instrucoes3 'Lembrar de algo 3'
|
|
@@ -2,19 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :boleto_caixa, class: BrBoleto::Boleto::Caixa do
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
endereco_cedente 'Rua para Testes - Belo Horizonte / MG'
|
|
8
|
-
sacado 'Cleber Machado dos Santos'
|
|
9
|
-
documento_sacado '52166727964'
|
|
10
|
-
endereco_sacado 'Rua Teste do Seu Cliente'
|
|
5
|
+
conta { FactoryGirl.build(:conta_caixa) }
|
|
6
|
+
pagador { FactoryGirl.build(:pagador) }
|
|
11
7
|
numero_documento '458'
|
|
12
8
|
data_vencimento { Date.tomorrow }
|
|
13
9
|
data_documento { Date.current }
|
|
14
|
-
agencia "2391"
|
|
15
|
-
codigo_cedente '4433'
|
|
16
10
|
valor_documento 750.27
|
|
17
|
-
carteira '14'
|
|
18
11
|
instrucoes1 'instrucoes1'
|
|
19
12
|
instrucoes2 'instrucoes2'
|
|
20
13
|
instrucoes3 'instrucoes3'
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :boleto_sicoob, class: BrBoleto::Boleto::Sicoob do
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
conta { FactoryGirl.build(:conta_sicoob) }
|
|
6
|
+
pagador { FactoryGirl.build(:pagador) }
|
|
7
7
|
numero_documento 1101
|
|
8
|
-
carteira 1
|
|
9
8
|
valor_documento 93015.78
|
|
10
9
|
data_vencimento Date.parse('2019-02-17')
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
# agencia 95
|
|
11
|
+
# codigo_cedente 6532
|
|
12
|
+
# carteira 1
|
|
13
|
+
# conta_corrente '98701'
|
|
14
|
+
# cedente 'Nome da razao social'
|
|
15
|
+
# sacado 'Teste'
|
|
16
|
+
# documento_sacado '725.275.005-10'
|
|
17
|
+
# endereco_sacado 'Rua teste, 23045'
|
|
16
18
|
instrucoes1 'Lembrar de algo 1'
|
|
17
19
|
instrucoes2 'Lembrar de algo 2'
|
|
18
20
|
instrucoes3 'Lembrar de algo 3'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
|
|
3
|
+
FactoryGirl.define do
|
|
4
|
+
factory :conta_caixa, class: BrBoleto::Conta::Caixa do
|
|
5
|
+
codigo_cedente '653137'
|
|
6
|
+
conta_corrente '6035'
|
|
7
|
+
conta_corrente_dv '0'
|
|
8
|
+
agencia '0341'
|
|
9
|
+
carteira '1'
|
|
10
|
+
modalidade '14'
|
|
11
|
+
razao_social 'Razao Social emitente'
|
|
12
|
+
cpf_cnpj '98137264000196' # Gerado pelo gerador de cnpj
|
|
13
|
+
endereco 'Rua nome da rua, 9999'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
|
|
3
|
+
FactoryGirl.define do
|
|
4
|
+
factory :conta_sicoob, class: BrBoleto::Conta::Sicoob do
|
|
5
|
+
codigo_beneficiario '253167'
|
|
6
|
+
codigo_beneficiario_dv '4'
|
|
7
|
+
conta_corrente '887469'
|
|
8
|
+
conta_corrente_dv '7'
|
|
9
|
+
agencia '3069'
|
|
10
|
+
carteira '1'
|
|
11
|
+
modalidade '02'
|
|
12
|
+
razao_social 'Razao Social emitente'
|
|
13
|
+
cpf_cnpj '98137264000196' # Gerado pelo gerador de cnpj
|
|
14
|
+
endereco 'Rua nome da rua, 9999'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
|
|
3
|
+
FactoryGirl.define do
|
|
4
|
+
factory :pagador, class: BrBoleto::Pagador do
|
|
5
|
+
nome 'João da Silva'
|
|
6
|
+
cpf_cnpj '33.669.170/0001-12' # Gerado pelo gerador de cnpj
|
|
7
|
+
endereco 'RUA DO PAGADOR'
|
|
8
|
+
bairro 'Bairro do pagador'
|
|
9
|
+
cep '89885-000'
|
|
10
|
+
cidade 'Chapecó'
|
|
11
|
+
uf 'SC'
|
|
12
|
+
nome_avalista 'Maria avalista'
|
|
13
|
+
documento_avalista '840.106.990-43' # Gerado pelo gerador de CPF
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :remessa_base, class: BrBoleto::Remessa::Base do
|
|
5
|
-
lotes { FactoryGirl.build(:remessa_lote) }
|
|
6
|
-
nome_empresa "Nome da empresa"
|
|
7
|
-
agencia "3069"
|
|
8
|
-
conta_corrente "123456"
|
|
9
|
-
digito_conta "5"
|
|
10
|
-
carteira "1"
|
|
11
5
|
sequencial_remessa 1
|
|
12
6
|
end
|
|
13
7
|
end
|
|
@@ -3,16 +3,6 @@
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :remessa_cnab240_base, class: BrBoleto::Remessa::Cnab240::Base do
|
|
5
5
|
lotes { FactoryGirl.build(:remessa_lote) }
|
|
6
|
-
nome_empresa "Nome da empresa"
|
|
7
|
-
agencia "3069"
|
|
8
|
-
conta_corrente "123456"
|
|
9
|
-
digito_conta "5"
|
|
10
|
-
carteira "1"
|
|
11
6
|
sequencial_remessa 1
|
|
12
|
-
documento_cedente '12345678901'
|
|
13
|
-
convenio '1'
|
|
14
|
-
emissao_boleto '1'
|
|
15
|
-
distribuicao_boleto '1'
|
|
16
|
-
especie_titulo '02'
|
|
17
7
|
end
|
|
18
8
|
end
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :remessa_cnab240_caixa, class: BrBoleto::Remessa::Cnab240::Caixa do
|
|
5
5
|
lotes { FactoryGirl.build(:remessa_lote) }
|
|
6
|
-
|
|
7
|
-
agencia "3069"
|
|
8
|
-
carteira '14'
|
|
6
|
+
conta { FactoryGirl.build(:conta_caixa) }
|
|
9
7
|
sequencial_remessa 1
|
|
10
|
-
documento_cedente '93.671.653/0001-83'
|
|
11
|
-
convenio '31400'
|
|
12
|
-
modalidade_carteira '14'
|
|
13
8
|
end
|
|
14
9
|
end
|
|
@@ -3,16 +3,7 @@
|
|
|
3
3
|
FactoryGirl.define do
|
|
4
4
|
factory :remessa_cnab240_sicoob, class: BrBoleto::Remessa::Cnab240::Sicoob do
|
|
5
5
|
lotes { FactoryGirl.build(:remessa_lote) }
|
|
6
|
-
|
|
7
|
-
agencia "3069"
|
|
8
|
-
conta_corrente "5679"
|
|
9
|
-
digito_conta "5"
|
|
10
|
-
carteira "1"
|
|
6
|
+
conta { FactoryGirl.build(:conta_sicoob) }
|
|
11
7
|
sequencial_remessa 1
|
|
12
|
-
documento_cedente '12345678901'
|
|
13
|
-
convenio '1'
|
|
14
|
-
emissao_boleto '1'
|
|
15
|
-
distribuicao_boleto '1'
|
|
16
|
-
especie_titulo '02'
|
|
17
8
|
end
|
|
18
9
|
end
|