br_danfe 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +25 -25
  3. data/lib/br_danfe/danfe.rb +52 -25
  4. data/lib/br_danfe/danfe_lib/det_body.rb +105 -46
  5. data/lib/br_danfe/danfe_lib/document.rb +3 -7
  6. data/lib/br_danfe/danfe_lib/emit_header.rb +36 -20
  7. data/lib/br_danfe/danfe_lib/infadic.rb +12 -12
  8. data/lib/br_danfe/danfe_lib/issqn.rb +19 -8
  9. data/lib/br_danfe/version.rb +1 -1
  10. data/spec/features/danfe_spec.rb +45 -0
  11. data/spec/fixtures/nfe/lib/det_body#render-csosn.pdf +1932 -332
  12. data/spec/fixtures/nfe/lib/det_body#render-cst.pdf +1182 -138
  13. data/spec/fixtures/nfe/lib/det_body#render-fci.pdf +809 -43
  14. data/spec/fixtures/nfe/lib/det_body#render-icms_st.pdf +809 -43
  15. data/spec/fixtures/nfe/lib/det_body#render-quantity_with_custom_precision.pdf +807 -41
  16. data/spec/fixtures/nfe/lib/det_body#render-three_pages.pdf +22414 -0
  17. data/spec/fixtures/nfe/lib/det_body#render-two_pages.pdf +21442 -0
  18. data/spec/fixtures/nfe/lib/det_body#render-unit_price_with_custom_precision.pdf +807 -41
  19. data/spec/fixtures/nfe/lib/det_body#render-with_infadprod.pdf +1012 -0
  20. data/spec/fixtures/nfe/lib/det_body#render-with_issqn.pdf +10124 -0
  21. data/spec/fixtures/nfe/lib/det_body#render-without_issqn.pdf +10124 -0
  22. data/spec/fixtures/nfe/lib/emit_header#render-second_page.pdf +792 -0
  23. data/spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf +88 -8
  24. data/spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf +85 -5
  25. data/spec/fixtures/nfe/lib/infadic#render-footer_information.pdf +111 -0
  26. data/spec/fixtures/nfe/lib/{issqn#render.pdf → issqn#render-with_issqn.pdf} +0 -0
  27. data/spec/fixtures/nfe/lib/issqn#render-with_one_issqn_value.pdf +129 -0
  28. data/spec/fixtures/nfe/lib/issqn#render-without_issqn.pdf +54 -0
  29. data/spec/fixtures/nfe/v2.00/custom_options.fixture.pdf +2190 -1067
  30. data/spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml.fixture.pdf +2183 -1059
  31. data/spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml.fixture.pdf +8803 -3208
  32. data/spec/fixtures/nfe/v2.00/nfe_with_fci.xml.fixture.pdf +1825 -1258
  33. data/spec/fixtures/nfe/v2.00/nfe_with_ns.xml.fixture.pdf +8609 -3014
  34. data/spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf +2664 -1541
  35. data/spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf +4701 -1909
  36. data/spec/fixtures/nfe/v3.10/with_footer.fixture.pdf +8660 -0
  37. data/spec/fixtures/nfe/v3.10/with_footer.xml +621 -0
  38. data/spec/fixtures/nfe/v3.10/with_issqn.fixture.pdf +8646 -0
  39. data/spec/fixtures/nfe/v3.10/with_issqn.xml +621 -0
  40. data/spec/fixtures/nfe/v3.10/with_three_pages.fixture.pdf +25420 -0
  41. data/spec/fixtures/nfe/v3.10/with_three_pages.xml +1281 -0
  42. data/spec/fixtures/nfe/v3.10/withot_issqn.fixture.pdf +10338 -0
  43. data/spec/fixtures/nfe/v3.10/withot_issqn.xml +688 -0
  44. data/spec/lib/danfe_lib/det_body_spec.rb +350 -264
  45. data/spec/lib/danfe_lib/emit_header_spec.rb +42 -18
  46. data/spec/lib/danfe_lib/issqn_spec.rb +39 -7
  47. metadata +38 -14
  48. data/lib/br_danfe/danfe_lib/det_header.rb +0 -40
  49. data/lib/br_danfe/danfe_lib/emit.rb +0 -23
  50. data/spec/fixtures/nfe/lib/det_header#render.pdf +0 -207
  51. data/spec/fixtures/nfe/lib/emit#render.pdf +0 -143
  52. data/spec/lib/danfe_lib/det_header_spec.rb +0 -26
  53. data/spec/lib/danfe_lib/emit_spec.rb +0 -60
@@ -6,6 +6,9 @@ describe BrDanfe::DanfeLib::EmitHeader do
6
6
 
7
7
  let(:pdf) { BrDanfe::DanfeLib::Document.new }
8
8
  let(:xml) { BrDanfe::DanfeLib::XML.new(xml_as_string) }
9
+ let(:logo) { "spec/fixtures/logo.png" }
10
+
11
+ subject { described_class.new(pdf, xml, logo, { width: 100, height: 100 }) }
9
12
 
10
13
  describe "#render" do
11
14
  let(:xml_as_string) do
@@ -17,9 +20,13 @@ describe BrDanfe::DanfeLib::EmitHeader do
17
20
  <tpNF>1</tpNF>
18
21
  <nNF>1</nNF>
19
22
  <serie>1</serie>
23
+ <natOp>Vendas de producao do estabelecimento</natOp>
20
24
  </ide>
21
25
  <emit>
22
26
  <xNome>Nome do Remetente Ltda</xNome>
27
+ <CNPJ>62013294000143</CNPJ>
28
+ <IE>526926313553</IE>
29
+ <IEST>611724092039</IEST>
23
30
  <enderEmit>
24
31
  <xLgr>Rua do Remetente, Casa</xLgr>
25
32
  <nro>123</nro>
@@ -36,40 +43,57 @@ describe BrDanfe::DanfeLib::EmitHeader do
36
43
  <protNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
37
44
  <infProt Id="ID325110012866320">
38
45
  <chNFe>25111012345678901234550020000134151000134151</chNFe>
46
+ <dhRecbto>2011-10-29T14:37:09</dhRecbto>
47
+ <nProt>325110012866320</nProt>
39
48
  </infProt>
40
49
  </protNFe>
41
50
  </nfeProc>
42
51
  eos
43
52
  end
44
53
 
45
- before do
46
- subject.render
47
- File.delete(output_pdf) if File.exist?(output_pdf)
48
- end
54
+ context "render emitter on first page" do
55
+ before do
56
+ subject.render 1, 3.96
57
+ File.delete(output_pdf) if File.exist?(output_pdf)
58
+ end
49
59
 
50
- context "without logo" do
51
- subject { described_class.new(pdf, xml, "", { width: 100, height: 100 }) }
60
+ context "with logo" do
61
+ it "renders xml to the pdf" do
62
+ expect(File.exist?(output_pdf)).to be_falsey
52
63
 
53
- it "renders xml to the pdf" do
54
- expect(File.exist?(output_pdf)).to be_falsey
64
+ pdf.render_file output_pdf
65
+
66
+ expect("#{base_dir}emit_header#render-with_logo.pdf").to have_same_content_of file: output_pdf
67
+ end
68
+ end
55
69
 
56
- pdf.render_file output_pdf
70
+ context "without logo" do
71
+ let(:logo) { "" }
57
72
 
58
- expect("#{base_dir}emit_header#render-without_logo.pdf").to have_same_content_of file: output_pdf
73
+ it "renders xml to the pdf" do
74
+ expect(File.exist?(output_pdf)).to be_falsey
75
+
76
+ pdf.render_file output_pdf
77
+
78
+ expect("#{base_dir}emit_header#render-without_logo.pdf").to have_same_content_of file: output_pdf
79
+ end
59
80
  end
60
81
  end
61
82
 
62
- context "with logo" do
63
- let(:logo) { "spec/fixtures/logo.png" }
64
-
65
- subject { described_class.new(pdf, xml, logo, { width: 100, height: 100 }) }
83
+ context "render emitter on second page" do
84
+ before do
85
+ subject.render 2, 1.85
86
+ File.delete(output_pdf) if File.exist?(output_pdf)
87
+ end
66
88
 
67
- it "renders xml to the pdf" do
68
- expect(File.exist?(output_pdf)).to be_falsey
89
+ context "with logo" do
90
+ it "renders xml to the pdf" do
91
+ expect(File.exist?(output_pdf)).to be_falsey
69
92
 
70
- pdf.render_file output_pdf
93
+ pdf.render_file output_pdf
71
94
 
72
- expect("#{base_dir}emit_header#render-with_logo.pdf").to have_same_content_of file: output_pdf
95
+ expect("#{base_dir}emit_header#render-second_page.pdf").to have_same_content_of file: output_pdf
96
+ end
73
97
  end
74
98
  end
75
99
  end
@@ -19,9 +19,7 @@ describe BrDanfe::DanfeLib::Issqn do
19
19
  </emit>
20
20
  <total>
21
21
  <ISSQNtot>
22
- <vServ>1.43</vServ>
23
- <vBC>2.34</vBC>
24
- <vISS>3.45</vISS>
22
+ #{issqn}
25
23
  </ISSQNtot>
26
24
  </total>
27
25
  </infNFe>
@@ -29,17 +27,51 @@ describe BrDanfe::DanfeLib::Issqn do
29
27
  eos
30
28
  end
31
29
 
30
+ let(:issqn) do
31
+ <<-eos
32
+ <vServ>1.43</vServ>
33
+ <vBC>2.34</vBC>
34
+ <vISS>3.45</vISS>
35
+ eos
36
+ end
37
+
32
38
  before do
33
39
  subject.render
34
40
  File.delete(output_pdf) if File.exist?(output_pdf)
35
41
  end
36
42
 
37
- it "renders xml to the pdf" do
38
- expect(File.exist?(output_pdf)).to be_falsey
43
+ context "with ISSQN" do
44
+ it "renders xml to the pdf" do
45
+ expect(File.exist?(output_pdf)).to be_falsey
46
+
47
+ pdf.render_file output_pdf
48
+
49
+ expect("#{base_dir}issqn#render-with_issqn.pdf").to have_same_content_of file: output_pdf
50
+ end
51
+
52
+ context "when there is only one issqn value" do
53
+ let(:issqn) { "<vServ>1.43</vServ>" }
54
+
55
+ it "renders xml to the pdf" do
56
+ expect(File.exist?(output_pdf)).to be_falsey
57
+
58
+ pdf.render_file output_pdf
59
+
60
+ expect("#{base_dir}issqn#render-with_one_issqn_value.pdf").to have_same_content_of file: output_pdf
61
+ end
62
+ end
63
+ end
64
+
65
+ context "without ISSQN" do
66
+ let(:issqn) { "" }
67
+
68
+ it "renders xml to the pdf" do
69
+ expect(File.exist?(output_pdf)).to be_falsey
39
70
 
40
- pdf.render_file output_pdf
71
+ pdf.render_file output_pdf
41
72
 
42
- expect("#{base_dir}issqn#render.pdf").to have_same_content_of file: output_pdf
73
+ expect("#{base_dir}issqn#render-without_issqn.pdf").to have_same_content_of file: output_pdf
74
+ end
43
75
  end
44
76
  end
45
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_danfe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ASSEINFO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -183,10 +183,8 @@ files:
183
183
  - lib/br_danfe/danfe_lib/cst.rb
184
184
  - lib/br_danfe/danfe_lib/dest.rb
185
185
  - lib/br_danfe/danfe_lib/det_body.rb
186
- - lib/br_danfe/danfe_lib/det_header.rb
187
186
  - lib/br_danfe/danfe_lib/document.rb
188
187
  - lib/br_danfe/danfe_lib/dup.rb
189
- - lib/br_danfe/danfe_lib/emit.rb
190
188
  - lib/br_danfe/danfe_lib/emit_header.rb
191
189
  - lib/br_danfe/danfe_lib/helper.rb
192
190
  - lib/br_danfe/danfe_lib/icmstot.rb
@@ -230,8 +228,12 @@ files:
230
228
  - spec/fixtures/nfe/lib/det_body#render-fci.pdf
231
229
  - spec/fixtures/nfe/lib/det_body#render-icms_st.pdf
232
230
  - spec/fixtures/nfe/lib/det_body#render-quantity_with_custom_precision.pdf
231
+ - spec/fixtures/nfe/lib/det_body#render-three_pages.pdf
232
+ - spec/fixtures/nfe/lib/det_body#render-two_pages.pdf
233
233
  - spec/fixtures/nfe/lib/det_body#render-unit_price_with_custom_precision.pdf
234
- - spec/fixtures/nfe/lib/det_header#render.pdf
234
+ - spec/fixtures/nfe/lib/det_body#render-with_infadprod.pdf
235
+ - spec/fixtures/nfe/lib/det_body#render-with_issqn.pdf
236
+ - spec/fixtures/nfe/lib/det_body#render-without_issqn.pdf
235
237
  - spec/fixtures/nfe/lib/document#lcnpj-blank.pdf
236
238
  - spec/fixtures/nfe/lib/document#lcnpj-invalid.pdf
237
239
  - spec/fixtures/nfe/lib/document#lcnpj-valid.pdf
@@ -239,15 +241,18 @@ files:
239
241
  - spec/fixtures/nfe/lib/document#lie-invalid.pdf
240
242
  - spec/fixtures/nfe/lib/document#lie-valid.pdf
241
243
  - spec/fixtures/nfe/lib/dup#render.pdf
242
- - spec/fixtures/nfe/lib/emit#render.pdf
244
+ - spec/fixtures/nfe/lib/emit_header#render-second_page.pdf
243
245
  - spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf
244
246
  - spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf
245
247
  - spec/fixtures/nfe/lib/icmstot#render.pdf
246
248
  - spec/fixtures/nfe/lib/infadic#render-difal.pdf
247
249
  - spec/fixtures/nfe/lib/infadic#render-extra_volume.pdf
248
250
  - spec/fixtures/nfe/lib/infadic#render-extra_volume_difal.pdf
251
+ - spec/fixtures/nfe/lib/infadic#render-footer_information.pdf
249
252
  - spec/fixtures/nfe/lib/infadic#render.pdf
250
- - spec/fixtures/nfe/lib/issqn#render.pdf
253
+ - spec/fixtures/nfe/lib/issqn#render-with_issqn.pdf
254
+ - spec/fixtures/nfe/lib/issqn#render-with_one_issqn_value.pdf
255
+ - spec/fixtures/nfe/lib/issqn#render-without_issqn.pdf
251
256
  - spec/fixtures/nfe/lib/ticket#render.pdf
252
257
  - spec/fixtures/nfe/lib/transp#render-modfrete_0.pdf
253
258
  - spec/fixtures/nfe/lib/transp#render-modfrete_1.pdf
@@ -271,6 +276,14 @@ files:
271
276
  - spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf
272
277
  - spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml
273
278
  - spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf
279
+ - spec/fixtures/nfe/v3.10/with_footer.fixture.pdf
280
+ - spec/fixtures/nfe/v3.10/with_footer.xml
281
+ - spec/fixtures/nfe/v3.10/with_issqn.fixture.pdf
282
+ - spec/fixtures/nfe/v3.10/with_issqn.xml
283
+ - spec/fixtures/nfe/v3.10/with_three_pages.fixture.pdf
284
+ - spec/fixtures/nfe/v3.10/with_three_pages.xml
285
+ - spec/fixtures/nfe/v3.10/withot_issqn.fixture.pdf
286
+ - spec/fixtures/nfe/v3.10/withot_issqn.xml
274
287
  - spec/lib/cce_lib/barcode_spec.rb
275
288
  - spec/lib/cce_lib/correction_spec.rb
276
289
  - spec/lib/cce_lib/document_spec.rb
@@ -282,11 +295,9 @@ files:
282
295
  - spec/lib/danfe_lib/cst_spec.rb
283
296
  - spec/lib/danfe_lib/dest_spec.rb
284
297
  - spec/lib/danfe_lib/det_body_spec.rb
285
- - spec/lib/danfe_lib/det_header_spec.rb
286
298
  - spec/lib/danfe_lib/document_spec.rb
287
299
  - spec/lib/danfe_lib/dup_spec.rb
288
300
  - spec/lib/danfe_lib/emit_header_spec.rb
289
- - spec/lib/danfe_lib/emit_spec.rb
290
301
  - spec/lib/danfe_lib/helper_spec.rb
291
302
  - spec/lib/danfe_lib/icmstot_spec.rb
292
303
  - spec/lib/danfe_lib/infadic_spec.rb
@@ -355,8 +366,12 @@ test_files:
355
366
  - spec/fixtures/nfe/lib/det_body#render-fci.pdf
356
367
  - spec/fixtures/nfe/lib/det_body#render-icms_st.pdf
357
368
  - spec/fixtures/nfe/lib/det_body#render-quantity_with_custom_precision.pdf
369
+ - spec/fixtures/nfe/lib/det_body#render-three_pages.pdf
370
+ - spec/fixtures/nfe/lib/det_body#render-two_pages.pdf
358
371
  - spec/fixtures/nfe/lib/det_body#render-unit_price_with_custom_precision.pdf
359
- - spec/fixtures/nfe/lib/det_header#render.pdf
372
+ - spec/fixtures/nfe/lib/det_body#render-with_infadprod.pdf
373
+ - spec/fixtures/nfe/lib/det_body#render-with_issqn.pdf
374
+ - spec/fixtures/nfe/lib/det_body#render-without_issqn.pdf
360
375
  - spec/fixtures/nfe/lib/document#lcnpj-blank.pdf
361
376
  - spec/fixtures/nfe/lib/document#lcnpj-invalid.pdf
362
377
  - spec/fixtures/nfe/lib/document#lcnpj-valid.pdf
@@ -364,15 +379,18 @@ test_files:
364
379
  - spec/fixtures/nfe/lib/document#lie-invalid.pdf
365
380
  - spec/fixtures/nfe/lib/document#lie-valid.pdf
366
381
  - spec/fixtures/nfe/lib/dup#render.pdf
367
- - spec/fixtures/nfe/lib/emit#render.pdf
382
+ - spec/fixtures/nfe/lib/emit_header#render-second_page.pdf
368
383
  - spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf
369
384
  - spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf
370
385
  - spec/fixtures/nfe/lib/icmstot#render.pdf
371
386
  - spec/fixtures/nfe/lib/infadic#render-difal.pdf
372
387
  - spec/fixtures/nfe/lib/infadic#render-extra_volume.pdf
373
388
  - spec/fixtures/nfe/lib/infadic#render-extra_volume_difal.pdf
389
+ - spec/fixtures/nfe/lib/infadic#render-footer_information.pdf
374
390
  - spec/fixtures/nfe/lib/infadic#render.pdf
375
- - spec/fixtures/nfe/lib/issqn#render.pdf
391
+ - spec/fixtures/nfe/lib/issqn#render-with_issqn.pdf
392
+ - spec/fixtures/nfe/lib/issqn#render-with_one_issqn_value.pdf
393
+ - spec/fixtures/nfe/lib/issqn#render-without_issqn.pdf
376
394
  - spec/fixtures/nfe/lib/ticket#render.pdf
377
395
  - spec/fixtures/nfe/lib/transp#render-modfrete_0.pdf
378
396
  - spec/fixtures/nfe/lib/transp#render-modfrete_1.pdf
@@ -396,6 +414,14 @@ test_files:
396
414
  - spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf
397
415
  - spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml
398
416
  - spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf
417
+ - spec/fixtures/nfe/v3.10/with_footer.fixture.pdf
418
+ - spec/fixtures/nfe/v3.10/with_footer.xml
419
+ - spec/fixtures/nfe/v3.10/with_issqn.fixture.pdf
420
+ - spec/fixtures/nfe/v3.10/with_issqn.xml
421
+ - spec/fixtures/nfe/v3.10/with_three_pages.fixture.pdf
422
+ - spec/fixtures/nfe/v3.10/with_three_pages.xml
423
+ - spec/fixtures/nfe/v3.10/withot_issqn.fixture.pdf
424
+ - spec/fixtures/nfe/v3.10/withot_issqn.xml
399
425
  - spec/lib/cce_lib/barcode_spec.rb
400
426
  - spec/lib/cce_lib/correction_spec.rb
401
427
  - spec/lib/cce_lib/document_spec.rb
@@ -407,11 +433,9 @@ test_files:
407
433
  - spec/lib/danfe_lib/cst_spec.rb
408
434
  - spec/lib/danfe_lib/dest_spec.rb
409
435
  - spec/lib/danfe_lib/det_body_spec.rb
410
- - spec/lib/danfe_lib/det_header_spec.rb
411
436
  - spec/lib/danfe_lib/document_spec.rb
412
437
  - spec/lib/danfe_lib/dup_spec.rb
413
438
  - spec/lib/danfe_lib/emit_header_spec.rb
414
- - spec/lib/danfe_lib/emit_spec.rb
415
439
  - spec/lib/danfe_lib/helper_spec.rb
416
440
  - spec/lib/danfe_lib/icmstot_spec.rb
417
441
  - spec/lib/danfe_lib/infadic_spec.rb
@@ -1,40 +0,0 @@
1
- module BrDanfe
2
- module DanfeLib
3
- Y = 18.81 + SPACE_BETWEEN_GROUPS
4
-
5
- class DetHeader
6
- def initialize(pdf)
7
- @pdf = pdf
8
-
9
- @ltitle = Y - 0.42
10
- @l1 = Y
11
- end
12
-
13
- def render
14
- @pdf.ititle 0.42, 10.00, 0.75, @ltitle, "det.title"
15
-
16
- column(1.60, 0.75, "prod.cProd")
17
- column(6.10, 2.35, "prod.xProd")
18
- column(1.05, 8.45, "prod.NCM")
19
- column(0.60, 9.50, "ICMS.CST")
20
- column(0.70, 10.10, "prod.CFOP")
21
- column(1.05, 10.80, "prod.uCom")
22
- column(1.20, 11.85, "prod.qCom")
23
- column(1.20, 13.05, "prod.vUnCom")
24
- column(1.20, 14.25, "prod.vProd")
25
- column(1.20, 15.45, "ICMS.vBC")
26
- column(1.00, 16.65, "ICMS.vICMS")
27
- column(1.00, 17.65, "IPI.vIPI")
28
- column(0.90, 18.65, "ICMS.pICMS")
29
- column(0.76, 19.55, "IPI.pIPI")
30
-
31
- @pdf.horizontal_line 0.75.cm, 20.31.cm, at: Helper.invert(19.59.cm)
32
- end
33
-
34
- private
35
- def column(w, x, title)
36
- @pdf.ibox 6.40, w, x, @l1, I18n.t("danfe.det.#{title}")
37
- end
38
- end
39
- end
40
- end
@@ -1,23 +0,0 @@
1
- module BrDanfe
2
- module DanfeLib
3
- class Emit
4
- Y = 7.88
5
-
6
- def initialize(pdf, xml)
7
- @pdf = pdf
8
- @xml = xml
9
-
10
- @l1 = Y
11
- @l2 = Y + LINE_HEIGHT
12
- end
13
-
14
- def render
15
- @pdf.lbox LINE_HEIGHT, 10.04, 0.75, @l1, @xml, "ide/natOp"
16
- @pdf.ibox LINE_HEIGHT, 9.52, 10.79, @l1, I18n.t("danfe.infProt"), @xml["infProt/nProt"] + " " + Helper.format_datetime(@xml["infProt/dhRecbto"]), { align: :center }
17
- @pdf.lie LINE_HEIGHT, 6.36, 0.75, @l2, @xml, "enderEmit/UF", "emit/IE"
18
- @pdf.lie LINE_HEIGHT, 6.86, 7.11, @l2, @xml, "enderDest/UF", "emit/IEST"
19
- @pdf.lcnpj LINE_HEIGHT, 6.34, 13.97, @l2, @xml, "emit/CNPJ"
20
- end
21
- end
22
- end
23
- end
@@ -1,207 +0,0 @@
1
- %PDF-1.3
2
- %����
3
- 1 0 obj
4
- << /Creator <feff0050007200610077006e>
5
- /Producer <feff0050007200610077006e>
6
- >>
7
- endobj
8
- 2 0 obj
9
- << /Type /Catalog
10
- /Pages 3 0 R
11
- >>
12
- endobj
13
- 3 0 obj
14
- << /Type /Pages
15
- /Count 1
16
- /Kids [5 0 R]
17
- >>
18
- endobj
19
- 4 0 obj
20
- << /Length 1593
21
- >>
22
- stream
23
- q
24
- 0.3 w
25
-
26
- BT
27
- 21.2598 332.3943 Td
28
- /F2.0 8 Tf
29
- [<44> 35 <41444f5320444f205052> 30 <4f445554> 18 <4f202f20534552> 55 <5649c74f>] TJ
30
- ET
31
-
32
- 21.2598 148.5354 45.3543 181.4173 re
33
- S
34
-
35
- BT
36
- 23.2598 323.8548 Td
37
- /F1.0 6 Tf
38
- [<43d34449474f>] TJ
39
- ET
40
-
41
- 66.6142 148.5354 172.9134 181.4173 re
42
- S
43
-
44
- BT
45
- 68.6142 323.8548 Td
46
- /F1.0 6 Tf
47
- [<444553435249c7c3> 55 <4f>] TJ
48
- ET
49
-
50
- 239.5276 148.5354 29.7638 181.4173 re
51
- S
52
-
53
- BT
54
- 241.5276 323.8548 Td
55
- /F1.0 6 Tf
56
- [<4e434d>] TJ
57
- ET
58
-
59
- 269.2913 148.5354 17.0079 181.4173 re
60
- S
61
-
62
- BT
63
- 271.2913 323.8548 Td
64
- /F1.0 6 Tf
65
- [<435354>] TJ
66
- ET
67
-
68
- 286.2992 148.5354 19.8425 181.4173 re
69
- S
70
-
71
- BT
72
- 288.2992 323.8548 Td
73
- /F1.0 6 Tf
74
- [<43464f50>] TJ
75
- ET
76
-
77
- 306.1417 148.5354 29.7638 181.4173 re
78
- S
79
-
80
- BT
81
- 308.1417 323.8548 Td
82
- /F1.0 6 Tf
83
- [<554e4944>] TJ
84
- ET
85
-
86
- 335.9055 148.5354 34.0157 181.4173 re
87
- S
88
-
89
- BT
90
- 337.9055 323.8548 Td
91
- /F1.0 6 Tf
92
- [<51> 10 <55> 40 <414e54>] TJ
93
- ET
94
-
95
- 369.9213 148.5354 34.0157 181.4173 re
96
- S
97
-
98
- BT
99
- 371.9213 323.8548 Td
100
- /F1.0 6 Tf
101
- [<564c20554e4954>] TJ
102
- ET
103
-
104
- 403.937 148.5354 34.0157 181.4173 re
105
- S
106
-
107
- BT
108
- 405.937 323.8548 Td
109
- /F1.0 6 Tf
110
- [<564c2054> 18 <4f> 40 <54> 93 <414c>] TJ
111
- ET
112
-
113
- 437.9528 148.5354 34.0157 181.4173 re
114
- S
115
-
116
- BT
117
- 439.9528 323.8548 Td
118
- /F1.0 6 Tf
119
- [<42432049434d53>] TJ
120
- ET
121
-
122
- 471.9685 148.5354 28.3465 181.4173 re
123
- S
124
-
125
- BT
126
- 473.9685 323.8548 Td
127
- /F1.0 6 Tf
128
- [<564c2049434d53>] TJ
129
- ET
130
-
131
- 500.315 148.5354 28.3465 181.4173 re
132
- S
133
-
134
- BT
135
- 502.315 323.8548 Td
136
- /F1.0 6 Tf
137
- [<564c20495049>] TJ
138
- ET
139
-
140
- 528.6614 148.5354 25.5118 181.4173 re
141
- S
142
-
143
- BT
144
- 530.6614 323.8548 Td
145
- /F1.0 6 Tf
146
- [<252049434d53>] TJ
147
- ET
148
-
149
- 554.1732 148.5354 21.5433 181.4173 re
150
- S
151
-
152
- BT
153
- 556.1732 323.8548 Td
154
- /F1.0 6 Tf
155
- [<2520495049>] TJ
156
- ET
157
-
158
- 21.2598 322.5827 m
159
- 575.7165 322.5827 l
160
- Q
161
-
162
- endstream
163
- endobj
164
- 5 0 obj
165
- << /Type /Page
166
- /Parent 3 0 R
167
- /MediaBox [0 0 595.28 841.89]
168
- /Contents 4 0 R
169
- /Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
170
- /Font << /F2.0 6 0 R
171
- /F1.0 7 0 R
172
- >>
173
- >>
174
- >>
175
- endobj
176
- 6 0 obj
177
- << /Type /Font
178
- /Subtype /Type1
179
- /BaseFont /Times-Bold
180
- /Encoding /WinAnsiEncoding
181
- >>
182
- endobj
183
- 7 0 obj
184
- << /Type /Font
185
- /Subtype /Type1
186
- /BaseFont /Times-Roman
187
- /Encoding /WinAnsiEncoding
188
- >>
189
- endobj
190
- xref
191
- 0 8
192
- 0000000000 65535 f
193
- 0000000015 00000 n
194
- 0000000109 00000 n
195
- 0000000158 00000 n
196
- 0000000215 00000 n
197
- 0000001860 00000 n
198
- 0000002052 00000 n
199
- 0000002150 00000 n
200
- trailer
201
- << /Size 8
202
- /Root 2 0 R
203
- /Info 1 0 R
204
- >>
205
- startxref
206
- 2249
207
- %%EOF