br_danfe 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/pt-BR.yml +1 -1
- data/lib/br_danfe/danfe_lib/infadic.rb +48 -4
- data/lib/br_danfe/danfe_lib/xprod.rb +0 -17
- data/lib/br_danfe/version.rb +1 -1
- data/spec/fixtures/nfe/lib/infadic#render-difal.pdf +118 -0
- data/spec/fixtures/nfe/lib/infadic#render-extra_volume_difal.pdf +302 -0
- data/spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml +3 -0
- data/spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf +55 -76
- data/spec/lib/danfe_lib/det_body_spec.rb +0 -43
- data/spec/lib/danfe_lib/infadic_spec.rb +116 -1
- metadata +4 -3
- data/spec/fixtures/nfe/lib/det_body#render-difal.pdf +0 -274
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05cab7a4efb232814a9b3e383138ec33d602396d
|
4
|
+
data.tar.gz: 7248e4f8ba9e0d6fa5bfc8b362c876e328696fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f15f37cc5a5db53db83d62ebdbd1ddc3160a17020620cb7e8ec7c92b489b1c5cc8647734f1d93205720c38ec916a0fa4d1ec5c02dd4f35fc8f77e7600b399c2e
|
7
|
+
data.tar.gz: ab74ed5d6f1eaeaa05f60dc6d7de595c6cb377821f43d4a90358e151417bb1c8b60ebe905844fe3e20af59df01d9c776b0af5ace7098b314801f8508a3074f90
|
data/config/locales/pt-BR.yml
CHANGED
@@ -105,7 +105,6 @@ pt-BR:
|
|
105
105
|
vProd: "VALOR TOT"
|
106
106
|
xProdST: "ST: MVA: %{pMVAST}% * Alíq: %{pICMSST}% * BC: %{vBCST} * Vlr: %{vICMSST}"
|
107
107
|
xProdFCI: "FCI: %{nFCI}"
|
108
|
-
xProdDIFAL: "DIFAL: Vlr BC: %{vBCUFDest} * Vlr ICMS Remet: %{vICMSUFRemet} * Vlr ICMS Dest: %{vICMSUFDest} * Vlr FCP: %{vFCPUFDest} * FCP: %{pFCPUFDest}% * ICMS: %{pICMSUFDest}% * ICMS Inter: %{pICMSInter}% * ICMS Inter Part: %{pICMSInterPart}%"
|
109
108
|
ICMS:
|
110
109
|
CST: "CST"
|
111
110
|
vBC: "BASE CÁLC"
|
@@ -126,6 +125,7 @@ pt-BR:
|
|
126
125
|
infCpl: "INFORMAÇÕES COMPLEMENTARES"
|
127
126
|
reserved: "RESERVADO AO FISCO"
|
128
127
|
others: "OUTRAS INFORMAÇÕES"
|
128
|
+
difal: "Valores totais do ICMS Interestadual: DIFAL da UF destino R$%{vICMSUFDest} + FCP R$%{vFCPUFDest}; DIFAL da UF Origem R$%{vICMSUFRemet}."
|
129
129
|
vol:
|
130
130
|
title: "CONTINUAÇÃO TRANSPORTADOR/VOLUMES TRANSPORTADOS"
|
131
131
|
qVol: "QUANT.:"
|
@@ -16,6 +16,8 @@ module BrDanfe
|
|
16
16
|
|
17
17
|
if nVol > 1
|
18
18
|
render_extra_volumes
|
19
|
+
elsif difal?
|
20
|
+
render_difal
|
19
21
|
else
|
20
22
|
@pdf.ibox 2.65, 12.45, 0.75, @l1, I18n.t("danfe.infAdic.infCpl"), @xml["infAdic/infCpl"], { size: 6, valign: :top }
|
21
23
|
end
|
@@ -24,12 +26,24 @@ module BrDanfe
|
|
24
26
|
end
|
25
27
|
|
26
28
|
private
|
29
|
+
|
27
30
|
def render_extra_volumes
|
28
31
|
@pdf.ibox 2.65, 12.45, 0.75, @l1, I18n.t("danfe.infAdic.infCpl"), "", { size: 8, valign: :top }
|
29
|
-
|
32
|
+
|
33
|
+
y = Y + 0.20
|
34
|
+
|
35
|
+
if difal?
|
36
|
+
@pdf.ibox 1.65, 12.45, 0.75, y, "", difal_content, { size: 5, valign: :top, border: 0 }
|
37
|
+
y += 0.27
|
38
|
+
else
|
39
|
+
y += 0.07
|
40
|
+
end
|
41
|
+
|
42
|
+
@pdf.ibox 2.65, 12.45, 0.75, y, "", I18n.t("danfe.infAdic.vol.title"), { size: 5, valign: :top, border: 0 }
|
30
43
|
|
31
44
|
volumes = 0
|
32
|
-
y
|
45
|
+
y += 0.07
|
46
|
+
|
33
47
|
@xml.collect("xmlns", "vol") do |det|
|
34
48
|
volumes += 1
|
35
49
|
if volumes > 1
|
@@ -38,8 +52,22 @@ module BrDanfe
|
|
38
52
|
end
|
39
53
|
end
|
40
54
|
|
41
|
-
|
42
|
-
|
55
|
+
render_info_cpl_with_others y
|
56
|
+
end
|
57
|
+
|
58
|
+
def difal?
|
59
|
+
!@xml["ICMSTot/vICMSUFDest"].to_f.zero?
|
60
|
+
end
|
61
|
+
|
62
|
+
def difal_content
|
63
|
+
I18n.t("danfe.infAdic.difal",
|
64
|
+
vICMSUFDest: numerify(@xml["ICMSTot/vICMSUFDest"]),
|
65
|
+
vFCPUFDest: numerify(@xml["ICMSTot/vFCPUFDest"]),
|
66
|
+
vICMSUFRemet: numerify(@xml["ICMSTot/vICMSUFRemet"]))
|
67
|
+
end
|
68
|
+
|
69
|
+
def numerify(value)
|
70
|
+
Helper.numerify(value, 2) if value != ""
|
43
71
|
end
|
44
72
|
|
45
73
|
def render_extra_volume(det, y)
|
@@ -75,6 +103,22 @@ module BrDanfe
|
|
75
103
|
def style_decimal
|
76
104
|
style_italic.merge({ decimals: 3 })
|
77
105
|
end
|
106
|
+
|
107
|
+
def render_info_cpl_with_others(y)
|
108
|
+
@pdf.ibox 1.65, 12.45, 0.75, y + 0.30, "", I18n.t("danfe.infAdic.others"), { size: 6, valign: :top, border: 0 }
|
109
|
+
@pdf.ibox 1.65, 12.45, 0.75, y + 0.50, "", @xml["infAdic/infCpl"], { size: 5, valign: :top, border: 0 }
|
110
|
+
end
|
111
|
+
|
112
|
+
def render_difal
|
113
|
+
@pdf.ibox 2.65, 12.45, 0.75, @l1, I18n.t("danfe.infAdic.infCpl"), "", { size: 8, valign: :top }
|
114
|
+
|
115
|
+
y = Y + 0.20
|
116
|
+
@pdf.ibox 1.65, 12.45, 0.75, y, "", difal_content, { size: 5, valign: :top, border: 0 }
|
117
|
+
|
118
|
+
y += 0.10
|
119
|
+
|
120
|
+
render_info_cpl_with_others y
|
121
|
+
end
|
78
122
|
end
|
79
123
|
end
|
80
124
|
end
|
@@ -11,7 +11,6 @@ module BrDanfe
|
|
11
11
|
xprod += infAdProd if has_infAdProd?
|
12
12
|
xprod += fci if has_fci?
|
13
13
|
xprod += st if has_st?
|
14
|
-
xprod += difal if has_difal?
|
15
14
|
|
16
15
|
xprod
|
17
16
|
end
|
@@ -29,10 +28,6 @@ module BrDanfe
|
|
29
28
|
@det.css("ICMS/*/vBCST").text.to_i > 0
|
30
29
|
end
|
31
30
|
|
32
|
-
def has_difal?
|
33
|
-
@det.css("ICMSUFDest").present?
|
34
|
-
end
|
35
|
-
|
36
31
|
def infAdProd
|
37
32
|
"\n" + @det.css("infAdProd").text
|
38
33
|
end
|
@@ -48,18 +43,6 @@ module BrDanfe
|
|
48
43
|
vBCST: Helper.numerify(@det.css('ICMS/*/vBCST').text, 2),
|
49
44
|
vICMSST: Helper.numerify(@det.css('ICMS/*/vICMSST').text, 2))
|
50
45
|
end
|
51
|
-
|
52
|
-
def difal
|
53
|
-
"\n" + I18n.t("danfe.det.prod.xProdDIFAL",
|
54
|
-
vBCUFDest: Helper.numerify(@det.css('ICMSUFDest/vBCUFDest').text, 2),
|
55
|
-
pFCPUFDest: Helper.numerify(@det.css('ICMSUFDest/pFCPUFDest').text, 2),
|
56
|
-
pICMSUFDest: Helper.numerify(@det.css('ICMSUFDest/pICMSUFDest').text, 2),
|
57
|
-
pICMSInter: Helper.numerify(@det.css('ICMSUFDest/pICMSInter').text, 2),
|
58
|
-
pICMSInterPart: @det.css('ICMSUFDest/pICMSInterPart').text,
|
59
|
-
vFCPUFDest: Helper.numerify(@det.css('ICMSUFDest/vFCPUFDest').text, 2),
|
60
|
-
vICMSUFDest: Helper.numerify(@det.css('ICMSUFDest/vICMSUFDest').text, 2),
|
61
|
-
vICMSUFRemet: Helper.numerify(@det.css('ICMSUFDest/vICMSUFRemet').text, 2))
|
62
|
-
end
|
63
46
|
end
|
64
47
|
end
|
65
48
|
end
|
data/lib/br_danfe/version.rb
CHANGED
@@ -0,0 +1,118 @@
|
|
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 969
|
21
|
+
>>
|
22
|
+
stream
|
23
|
+
q
|
24
|
+
0.3 w
|
25
|
+
|
26
|
+
BT
|
27
|
+
21.25984251968504 98.81946456692918 Td
|
28
|
+
/F2.0 8 Tf
|
29
|
+
[<44> 35 <41444f532041444943494f4e> 20 <414953>] TJ
|
30
|
+
ET
|
31
|
+
|
32
|
+
21.260 21.543 352.913 75.118 re
|
33
|
+
S
|
34
|
+
|
35
|
+
BT
|
36
|
+
23.25984251968504 90.56341732283484 Td
|
37
|
+
/F1.0 6 Tf
|
38
|
+
[<494e464f524d41> 40 <c7d5455320434f4d504c454d454e54> 93 <41524553>] TJ
|
39
|
+
ET
|
40
|
+
|
41
|
+
|
42
|
+
BT
|
43
|
+
23.25984251968504 83.57712598425209 Td
|
44
|
+
/F1.0 5 Tf
|
45
|
+
[<56> 111 <616c6f72657320746f7461697320646f2049434d5320496e746572657374616475616c3a20444946> 74 <414c2064612055462064657374696e6f205224322e3931352c3738202b20464350205224342e3839322c37383b20444946> 74 <414c206461205546204f726967656d20522437352e3339342c37382e>] TJ
|
46
|
+
ET
|
47
|
+
|
48
|
+
|
49
|
+
BT
|
50
|
+
23.25984251968504 71.55554330708658 Td
|
51
|
+
/F1.0 6 Tf
|
52
|
+
[<4f555452415320494e464f524d41> 40 <c7d54553>] TJ
|
53
|
+
ET
|
54
|
+
|
55
|
+
|
56
|
+
BT
|
57
|
+
23.25984251968504 66.56925196850395 Td
|
58
|
+
/F1.0 5 Tf
|
59
|
+
[<556d61206f6273657276> 25 <61e7e36f>] TJ
|
60
|
+
ET
|
61
|
+
|
62
|
+
374.173 21.543 202.677 75.118 re
|
63
|
+
S
|
64
|
+
|
65
|
+
BT
|
66
|
+
376.1732283464567 90.56341732283484 Td
|
67
|
+
/F1.0 6 Tf
|
68
|
+
[<5245534552> 80 <56> 135 <41444f2041> 55 <4f20464953434f>] TJ
|
69
|
+
ET
|
70
|
+
|
71
|
+
Q
|
72
|
+
|
73
|
+
endstream
|
74
|
+
endobj
|
75
|
+
5 0 obj
|
76
|
+
<< /Type /Page
|
77
|
+
/Parent 3 0 R
|
78
|
+
/MediaBox [0 0 595.28 841.89]
|
79
|
+
/Contents 4 0 R
|
80
|
+
/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
|
81
|
+
/Font << /F2.0 6 0 R
|
82
|
+
/F1.0 7 0 R
|
83
|
+
>>
|
84
|
+
>>
|
85
|
+
>>
|
86
|
+
endobj
|
87
|
+
6 0 obj
|
88
|
+
<< /Type /Font
|
89
|
+
/Subtype /Type1
|
90
|
+
/BaseFont /Times-Bold
|
91
|
+
/Encoding /WinAnsiEncoding
|
92
|
+
>>
|
93
|
+
endobj
|
94
|
+
7 0 obj
|
95
|
+
<< /Type /Font
|
96
|
+
/Subtype /Type1
|
97
|
+
/BaseFont /Times-Roman
|
98
|
+
/Encoding /WinAnsiEncoding
|
99
|
+
>>
|
100
|
+
endobj
|
101
|
+
xref
|
102
|
+
0 8
|
103
|
+
0000000000 65535 f
|
104
|
+
0000000015 00000 n
|
105
|
+
0000000109 00000 n
|
106
|
+
0000000158 00000 n
|
107
|
+
0000000215 00000 n
|
108
|
+
0000001235 00000 n
|
109
|
+
0000001427 00000 n
|
110
|
+
0000001525 00000 n
|
111
|
+
trailer
|
112
|
+
<< /Size 8
|
113
|
+
/Root 2 0 R
|
114
|
+
/Info 1 0 R
|
115
|
+
>>
|
116
|
+
startxref
|
117
|
+
1624
|
118
|
+
%%EOF
|
@@ -0,0 +1,302 @@
|
|
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 3156
|
21
|
+
>>
|
22
|
+
stream
|
23
|
+
q
|
24
|
+
0.3 w
|
25
|
+
|
26
|
+
BT
|
27
|
+
21.25984251968504 98.81946456692918 Td
|
28
|
+
/F2.0 8 Tf
|
29
|
+
[<44> 35 <41444f532041444943494f4e> 20 <414953>] TJ
|
30
|
+
ET
|
31
|
+
|
32
|
+
21.260 21.543 352.913 75.118 re
|
33
|
+
S
|
34
|
+
|
35
|
+
BT
|
36
|
+
23.25984251968504 90.56341732283484 Td
|
37
|
+
/F1.0 6 Tf
|
38
|
+
[<494e464f524d41> 40 <c7d5455320434f4d504c454d454e54> 93 <41524553>] TJ
|
39
|
+
ET
|
40
|
+
|
41
|
+
|
42
|
+
BT
|
43
|
+
23.25984251968504 83.57712598425209 Td
|
44
|
+
/F1.0 5 Tf
|
45
|
+
[<56> 111 <616c6f72657320746f7461697320646f2049434d5320496e746572657374616475616c3a20444946> 74 <414c2064612055462064657374696e6f205224322e3931352c3738202b20464350205224342e3839322c37383b20444946> 74 <414c206461205546204f726967656d20522437352e3339342c37382e>] TJ
|
46
|
+
ET
|
47
|
+
|
48
|
+
|
49
|
+
BT
|
50
|
+
23.25984251968504 75.92358267716551 Td
|
51
|
+
/F1.0 5 Tf
|
52
|
+
[<434f4e54494e55> 40 <41> 40 <c7c3> 55 <4f205452414e53504f52> 60 <54> 93 <41444f522f56> 40 <4f4c554d4553205452414e53504f52> 60 <54> 93 <41444f53>] TJ
|
53
|
+
ET
|
54
|
+
|
55
|
+
|
56
|
+
BT
|
57
|
+
23.25984251968504 71.78768503937019 Td
|
58
|
+
/F1.0 4 Tf
|
59
|
+
[<51> 10 <55> 40 <414e54> 74 <2e3a>] TJ
|
60
|
+
ET
|
61
|
+
|
62
|
+
|
63
|
+
BT
|
64
|
+
31.480314960629926 71.78768503937019 Td
|
65
|
+
/F3.0 4 Tf
|
66
|
+
[<32>] TJ
|
67
|
+
ET
|
68
|
+
|
69
|
+
|
70
|
+
BT
|
71
|
+
40.267716535433074 71.78768503937019 Td
|
72
|
+
/F1.0 4 Tf
|
73
|
+
[<455350> 111 <2e3a>] TJ
|
74
|
+
ET
|
75
|
+
|
76
|
+
|
77
|
+
BT
|
78
|
+
51.60629921259843 71.78768503937019 Td
|
79
|
+
/F3.0 4 Tf
|
80
|
+
[<56> 30 <4f4c554d45532032>] TJ
|
81
|
+
ET
|
82
|
+
|
83
|
+
|
84
|
+
BT
|
85
|
+
119.63779527559056 71.78768503937019 Td
|
86
|
+
/F1.0 4 Tf
|
87
|
+
[<4d415243413a>] TJ
|
88
|
+
ET
|
89
|
+
|
90
|
+
|
91
|
+
BT
|
92
|
+
136.6456692913386 71.78768503937019 Td
|
93
|
+
/F3.0 4 Tf
|
94
|
+
[<4449564552534f532032>] TJ
|
95
|
+
ET
|
96
|
+
|
97
|
+
|
98
|
+
BT
|
99
|
+
174.91338582677167 71.78768503937019 Td
|
100
|
+
/F1.0 4 Tf
|
101
|
+
[<4e554d2e3a>] TJ
|
102
|
+
ET
|
103
|
+
|
104
|
+
|
105
|
+
BT
|
106
|
+
191.9212598425197 71.78768503937019 Td
|
107
|
+
/F3.0 4 Tf
|
108
|
+
[<32>] TJ
|
109
|
+
ET
|
110
|
+
|
111
|
+
|
112
|
+
BT
|
113
|
+
200.42519685039372 71.78768503937019 Td
|
114
|
+
/F1.0 4 Tf
|
115
|
+
[<5045534f20422e3a>] TJ
|
116
|
+
ET
|
117
|
+
|
118
|
+
|
119
|
+
BT
|
120
|
+
217.27559055118112 71.78768503937019 Td
|
121
|
+
/F3.0 4 Tf
|
122
|
+
[<322e3230302c303030>] TJ
|
123
|
+
ET
|
124
|
+
|
125
|
+
|
126
|
+
BT
|
127
|
+
242.9448818897638 71.78768503937019 Td
|
128
|
+
/F1.0 4 Tf
|
129
|
+
[<5045534f204ccd512e3a>] TJ
|
130
|
+
ET
|
131
|
+
|
132
|
+
|
133
|
+
BT
|
134
|
+
265.46456692913387 71.78768503937019 Td
|
135
|
+
/F3.0 4 Tf
|
136
|
+
[<322e3030302c303030>] TJ
|
137
|
+
ET
|
138
|
+
|
139
|
+
|
140
|
+
BT
|
141
|
+
23.25984251968504 67.53571653543312 Td
|
142
|
+
/F1.0 4 Tf
|
143
|
+
[<51> 10 <55> 40 <414e54> 74 <2e3a>] TJ
|
144
|
+
ET
|
145
|
+
|
146
|
+
|
147
|
+
BT
|
148
|
+
31.480314960629926 67.53571653543312 Td
|
149
|
+
/F3.0 4 Tf
|
150
|
+
[<33>] TJ
|
151
|
+
ET
|
152
|
+
|
153
|
+
|
154
|
+
BT
|
155
|
+
40.267716535433074 67.53571653543312 Td
|
156
|
+
/F1.0 4 Tf
|
157
|
+
[<455350> 111 <2e3a>] TJ
|
158
|
+
ET
|
159
|
+
|
160
|
+
|
161
|
+
BT
|
162
|
+
51.60629921259843 67.53571653543312 Td
|
163
|
+
/F3.0 4 Tf
|
164
|
+
[<56> 30 <4f4c554d45532033>] TJ
|
165
|
+
ET
|
166
|
+
|
167
|
+
|
168
|
+
BT
|
169
|
+
119.63779527559056 67.53571653543312 Td
|
170
|
+
/F1.0 4 Tf
|
171
|
+
[<4d415243413a>] TJ
|
172
|
+
ET
|
173
|
+
|
174
|
+
|
175
|
+
BT
|
176
|
+
136.6456692913386 67.53571653543312 Td
|
177
|
+
/F3.0 4 Tf
|
178
|
+
[<4449564552534f532033>] TJ
|
179
|
+
ET
|
180
|
+
|
181
|
+
|
182
|
+
BT
|
183
|
+
174.91338582677167 67.53571653543312 Td
|
184
|
+
/F1.0 4 Tf
|
185
|
+
[<4e554d2e3a>] TJ
|
186
|
+
ET
|
187
|
+
|
188
|
+
|
189
|
+
BT
|
190
|
+
191.9212598425197 67.53571653543312 Td
|
191
|
+
/F3.0 4 Tf
|
192
|
+
[<33>] TJ
|
193
|
+
ET
|
194
|
+
|
195
|
+
|
196
|
+
BT
|
197
|
+
200.42519685039372 67.53571653543312 Td
|
198
|
+
/F1.0 4 Tf
|
199
|
+
[<5045534f20422e3a>] TJ
|
200
|
+
ET
|
201
|
+
|
202
|
+
|
203
|
+
BT
|
204
|
+
217.27559055118112 67.53571653543312 Td
|
205
|
+
/F3.0 4 Tf
|
206
|
+
[<332e3330302c303030>] TJ
|
207
|
+
ET
|
208
|
+
|
209
|
+
|
210
|
+
BT
|
211
|
+
242.9448818897638 67.53571653543312 Td
|
212
|
+
/F1.0 4 Tf
|
213
|
+
[<5045534f204ccd512e3a>] TJ
|
214
|
+
ET
|
215
|
+
|
216
|
+
|
217
|
+
BT
|
218
|
+
265.46456692913387 67.53571653543312 Td
|
219
|
+
/F3.0 4 Tf
|
220
|
+
[<332e3030302c303030>] TJ
|
221
|
+
ET
|
222
|
+
|
223
|
+
|
224
|
+
BT
|
225
|
+
23.25984251968504 56.24845669291365 Td
|
226
|
+
/F1.0 6 Tf
|
227
|
+
[<4f555452415320494e464f524d41> 40 <c7d54553>] TJ
|
228
|
+
ET
|
229
|
+
|
230
|
+
|
231
|
+
BT
|
232
|
+
23.25984251968504 51.2621653543309 Td
|
233
|
+
/F1.0 5 Tf
|
234
|
+
[<556d61206f6273657276> 25 <61e7e36f>] TJ
|
235
|
+
ET
|
236
|
+
|
237
|
+
374.173 21.543 202.677 75.118 re
|
238
|
+
S
|
239
|
+
|
240
|
+
BT
|
241
|
+
376.1732283464567 90.56341732283484 Td
|
242
|
+
/F1.0 6 Tf
|
243
|
+
[<5245534552> 80 <56> 135 <41444f2041> 55 <4f20464953434f>] TJ
|
244
|
+
ET
|
245
|
+
|
246
|
+
Q
|
247
|
+
|
248
|
+
endstream
|
249
|
+
endobj
|
250
|
+
5 0 obj
|
251
|
+
<< /Type /Page
|
252
|
+
/Parent 3 0 R
|
253
|
+
/MediaBox [0 0 595.28 841.89]
|
254
|
+
/Contents 4 0 R
|
255
|
+
/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
|
256
|
+
/Font << /F2.0 6 0 R
|
257
|
+
/F1.0 7 0 R
|
258
|
+
/F3.0 8 0 R
|
259
|
+
>>
|
260
|
+
>>
|
261
|
+
>>
|
262
|
+
endobj
|
263
|
+
6 0 obj
|
264
|
+
<< /Type /Font
|
265
|
+
/Subtype /Type1
|
266
|
+
/BaseFont /Times-Bold
|
267
|
+
/Encoding /WinAnsiEncoding
|
268
|
+
>>
|
269
|
+
endobj
|
270
|
+
7 0 obj
|
271
|
+
<< /Type /Font
|
272
|
+
/Subtype /Type1
|
273
|
+
/BaseFont /Times-Roman
|
274
|
+
/Encoding /WinAnsiEncoding
|
275
|
+
>>
|
276
|
+
endobj
|
277
|
+
8 0 obj
|
278
|
+
<< /Type /Font
|
279
|
+
/Subtype /Type1
|
280
|
+
/BaseFont /Times-Italic
|
281
|
+
/Encoding /WinAnsiEncoding
|
282
|
+
>>
|
283
|
+
endobj
|
284
|
+
xref
|
285
|
+
0 9
|
286
|
+
0000000000 65535 f
|
287
|
+
0000000015 00000 n
|
288
|
+
0000000109 00000 n
|
289
|
+
0000000158 00000 n
|
290
|
+
0000000215 00000 n
|
291
|
+
0000003423 00000 n
|
292
|
+
0000003627 00000 n
|
293
|
+
0000003725 00000 n
|
294
|
+
0000003824 00000 n
|
295
|
+
trailer
|
296
|
+
<< /Size 9
|
297
|
+
/Root 2 0 R
|
298
|
+
/Info 1 0 R
|
299
|
+
>>
|
300
|
+
startxref
|
301
|
+
3924
|
302
|
+
%%EOF
|
@@ -479,6 +479,9 @@
|
|
479
479
|
<vBC>17.28</vBC>
|
480
480
|
<vICMS>0.00</vICMS>
|
481
481
|
<vICMSDeson>0.00</vICMSDeson>
|
482
|
+
<vFCPUFDest>4892.78</vFCPUFDest>
|
483
|
+
<vICMSUFDest>2915.78</vICMSUFDest>
|
484
|
+
<vICMSUFRemet>75394.78</vICMSUFRemet>
|
482
485
|
<vBCST>17.98</vBCST>
|
483
486
|
<vST>0.59</vST>
|
484
487
|
<vProd>76.08</vProd>
|
@@ -17,7 +17,7 @@ endobj
|
|
17
17
|
>>
|
18
18
|
endobj
|
19
19
|
4 0 obj
|
20
|
-
<< /Length
|
20
|
+
<< /Length 21281
|
21
21
|
>>
|
22
22
|
stream
|
23
23
|
q
|
@@ -1532,8 +1532,8 @@ S
|
|
1532
1532
|
[0.3 0.6] 0 d
|
1533
1533
|
0.3 w
|
1534
1534
|
0.000 0.000 0.000 SCN
|
1535
|
-
21.260
|
1536
|
-
63.780
|
1535
|
+
21.260 199.535 m
|
1536
|
+
63.780 199.535 l
|
1537
1537
|
S
|
1538
1538
|
[ ] 0 d
|
1539
1539
|
0.3 w
|
@@ -1548,8 +1548,8 @@ ET
|
|
1548
1548
|
[0.3 0.6] 0 d
|
1549
1549
|
0.3 w
|
1550
1550
|
0.000 0.000 0.000 SCN
|
1551
|
-
63.780
|
1552
|
-
188.504
|
1551
|
+
63.780 199.535 m
|
1552
|
+
188.504 199.535 l
|
1553
1553
|
S
|
1554
1554
|
[ ] 0 d
|
1555
1555
|
0.3 w
|
@@ -1561,39 +1561,11 @@ BT
|
|
1561
1561
|
[<50726f6475746f20436f6d20444946> 74 <414c>] TJ
|
1562
1562
|
ET
|
1563
1563
|
|
1564
|
-
|
1565
|
-
BT
|
1566
|
-
65.77952755905513 196.1376771653544 Td
|
1567
|
-
/F1.0 6 Tf
|
1568
|
-
[<444946> 74 <414c3a20566c722042433a2031322e3030302c3533202a20566c722049434d532052656d65743a>] TJ
|
1569
|
-
ET
|
1570
|
-
|
1571
|
-
|
1572
|
-
BT
|
1573
|
-
65.77952755905513 189.4416771653544 Td
|
1574
|
-
/F1.0 6 Tf
|
1575
|
-
[<31322e3334342c3536202a20566c722049434d5320446573743a2031392e3238322c3437202a20566c72204643503a>] TJ
|
1576
|
-
ET
|
1577
|
-
|
1578
|
-
|
1579
|
-
BT
|
1580
|
-
65.77952755905513 182.7456771653544 Td
|
1581
|
-
/F1.0 6 Tf
|
1582
|
-
[<31312e3030322c3335202a204643503a2031372c393025202a2049434d533a2032312c353125202a>] TJ
|
1583
|
-
ET
|
1584
|
-
|
1585
|
-
|
1586
|
-
BT
|
1587
|
-
65.77952755905513 176.0496771653544 Td
|
1588
|
-
/F1.0 6 Tf
|
1589
|
-
[<49434d5320496e7465723a2031322c343525202a2049434d5320496e7465722050> 15 <6172743a20343025>] TJ
|
1590
|
-
ET
|
1591
|
-
|
1592
1564
|
[0.3 0.6] 0 d
|
1593
1565
|
0.3 w
|
1594
1566
|
0.000 0.000 0.000 SCN
|
1595
|
-
188.504
|
1596
|
-
225.354
|
1567
|
+
188.504 199.535 m
|
1568
|
+
225.354 199.535 l
|
1597
1569
|
S
|
1598
1570
|
[ ] 0 d
|
1599
1571
|
0.3 w
|
@@ -1601,8 +1573,8 @@ S
|
|
1601
1573
|
[0.3 0.6] 0 d
|
1602
1574
|
0.3 w
|
1603
1575
|
0.000 0.000 0.000 SCN
|
1604
|
-
225.354
|
1605
|
-
248.031
|
1576
|
+
225.354 199.535 m
|
1577
|
+
248.031 199.535 l
|
1606
1578
|
S
|
1607
1579
|
[ ] 0 d
|
1608
1580
|
0.3 w
|
@@ -1617,8 +1589,8 @@ ET
|
|
1617
1589
|
[0.3 0.6] 0 d
|
1618
1590
|
0.3 w
|
1619
1591
|
0.000 0.000 0.000 SCN
|
1620
|
-
248.031
|
1621
|
-
276.378
|
1592
|
+
248.031 199.535 m
|
1593
|
+
276.378 199.535 l
|
1622
1594
|
S
|
1623
1595
|
[ ] 0 d
|
1624
1596
|
0.3 w
|
@@ -1633,8 +1605,8 @@ ET
|
|
1633
1605
|
[0.3 0.6] 0 d
|
1634
1606
|
0.3 w
|
1635
1607
|
0.000 0.000 0.000 SCN
|
1636
|
-
276.378
|
1637
|
-
304.724
|
1608
|
+
276.378 199.535 m
|
1609
|
+
304.724 199.535 l
|
1638
1610
|
S
|
1639
1611
|
[ ] 0 d
|
1640
1612
|
0.3 w
|
@@ -1649,8 +1621,8 @@ ET
|
|
1649
1621
|
[0.3 0.6] 0 d
|
1650
1622
|
0.3 w
|
1651
1623
|
0.000 0.000 0.000 SCN
|
1652
|
-
304.724
|
1653
|
-
341.575
|
1624
|
+
304.724 199.535 m
|
1625
|
+
341.575 199.535 l
|
1654
1626
|
S
|
1655
1627
|
[ ] 0 d
|
1656
1628
|
0.3 w
|
@@ -1665,8 +1637,8 @@ ET
|
|
1665
1637
|
[0.3 0.6] 0 d
|
1666
1638
|
0.3 w
|
1667
1639
|
0.000 0.000 0.000 SCN
|
1668
|
-
341.575
|
1669
|
-
384.094
|
1640
|
+
341.575 199.535 m
|
1641
|
+
384.094 199.535 l
|
1670
1642
|
S
|
1671
1643
|
[ ] 0 d
|
1672
1644
|
0.3 w
|
@@ -1681,8 +1653,8 @@ ET
|
|
1681
1653
|
[0.3 0.6] 0 d
|
1682
1654
|
0.3 w
|
1683
1655
|
0.000 0.000 0.000 SCN
|
1684
|
-
384.094
|
1685
|
-
426.614
|
1656
|
+
384.094 199.535 m
|
1657
|
+
426.614 199.535 l
|
1686
1658
|
S
|
1687
1659
|
[ ] 0 d
|
1688
1660
|
0.3 w
|
@@ -1697,8 +1669,8 @@ ET
|
|
1697
1669
|
[0.3 0.6] 0 d
|
1698
1670
|
0.3 w
|
1699
1671
|
0.000 0.000 0.000 SCN
|
1700
|
-
426.614
|
1701
|
-
469.134
|
1672
|
+
426.614 199.535 m
|
1673
|
+
469.134 199.535 l
|
1702
1674
|
S
|
1703
1675
|
[ ] 0 d
|
1704
1676
|
0.3 w
|
@@ -1713,8 +1685,8 @@ ET
|
|
1713
1685
|
[0.3 0.6] 0 d
|
1714
1686
|
0.3 w
|
1715
1687
|
0.000 0.000 0.000 SCN
|
1716
|
-
469.134
|
1717
|
-
497.480
|
1688
|
+
469.134 199.535 m
|
1689
|
+
497.480 199.535 l
|
1718
1690
|
S
|
1719
1691
|
[ ] 0 d
|
1720
1692
|
0.3 w
|
@@ -1729,8 +1701,8 @@ ET
|
|
1729
1701
|
[0.3 0.6] 0 d
|
1730
1702
|
0.3 w
|
1731
1703
|
0.000 0.000 0.000 SCN
|
1732
|
-
497.480
|
1733
|
-
525.827
|
1704
|
+
497.480 199.535 m
|
1705
|
+
525.827 199.535 l
|
1734
1706
|
S
|
1735
1707
|
[ ] 0 d
|
1736
1708
|
0.3 w
|
@@ -1738,8 +1710,8 @@ S
|
|
1738
1710
|
[0.3 0.6] 0 d
|
1739
1711
|
0.3 w
|
1740
1712
|
0.000 0.000 0.000 SCN
|
1741
|
-
525.827
|
1742
|
-
551.339
|
1713
|
+
525.827 199.535 m
|
1714
|
+
551.339 199.535 l
|
1743
1715
|
S
|
1744
1716
|
[ ] 0 d
|
1745
1717
|
0.3 w
|
@@ -1754,8 +1726,8 @@ ET
|
|
1754
1726
|
[0.3 0.6] 0 d
|
1755
1727
|
0.3 w
|
1756
1728
|
0.000 0.000 0.000 SCN
|
1757
|
-
551.339
|
1758
|
-
575.717
|
1729
|
+
551.339 199.535 m
|
1730
|
+
575.717 199.535 l
|
1759
1731
|
S
|
1760
1732
|
[ ] 0 d
|
1761
1733
|
0.3 w
|
@@ -1841,7 +1813,7 @@ endobj
|
|
1841
1813
|
/F3.0 10 0 R
|
1842
1814
|
>>
|
1843
1815
|
>>
|
1844
|
-
/Length
|
1816
|
+
/Length 18039
|
1845
1817
|
>>
|
1846
1818
|
stream
|
1847
1819
|
q
|
@@ -2962,30 +2934,37 @@ ET
|
|
2962
2934
|
|
2963
2935
|
|
2964
2936
|
BT
|
2965
|
-
23.25984251968504
|
2966
|
-
/F1.0
|
2967
|
-
[<
|
2937
|
+
23.25984251968504 83.57712598425209 Td
|
2938
|
+
/F1.0 5 Tf
|
2939
|
+
[<56> 111 <616c6f72657320746f7461697320646f2049434d5320496e746572657374616475616c3a20444946> 74 <414c2064612055462064657374696e6f205224322e3931352c3738202b20464350205224342e3839322c37383b20444946> 74 <414c206461205546204f726967656d20522437352e3339342c37382e>] TJ
|
2968
2940
|
ET
|
2969
2941
|
|
2970
2942
|
|
2971
2943
|
BT
|
2972
|
-
23.25984251968504
|
2944
|
+
23.25984251968504 71.55554330708658 Td
|
2973
2945
|
/F1.0 6 Tf
|
2974
|
-
[<
|
2946
|
+
[<4f555452415320494e464f524d41> 40 <c7d54553>] TJ
|
2975
2947
|
ET
|
2976
2948
|
|
2977
2949
|
|
2978
2950
|
BT
|
2979
|
-
23.25984251968504 66.
|
2980
|
-
/F1.0
|
2981
|
-
[<
|
2951
|
+
23.25984251968504 66.56925196850395 Td
|
2952
|
+
/F1.0 5 Tf
|
2953
|
+
[<54> 70 <6573746520436f6d204f6273657276> 25 <6163616f202a205045524d495445204f20415052> 40 <4f> 50 <56454954> 93 <414d454e54> 18 <4f20444f20435245444954> 18 <4f2044452049434d53204e4f2056> 135 <414c4f5220444520522420302c30303b20434f52524553504f4e44454e5445204120414c4951> 10 <554f> 40 <54> 93 <4120444520302c3030253b204e4f53>] TJ
|
2982
2954
|
ET
|
2983
2955
|
|
2984
2956
|
|
2985
2957
|
BT
|
2986
|
-
23.25984251968504
|
2987
|
-
/F1.0
|
2988
|
-
[<
|
2958
|
+
23.25984251968504 60.989251968503936 Td
|
2959
|
+
/F1.0 5 Tf
|
2960
|
+
[<5445524d4f5320444f204152> 60 <5449474f2032332044> 40 <41204c43203132332f32303036202a204f50455241> 40 <4341> 55 <4f2053554a454954> 93 <412041205355425354495455494341> 55 <4f2054524942> 10 <5554> 93 <4152494120434f4e464f524d4520414e45584f203320444f205249434d532f5343202a20444f43554d454e54> 18 <4f>] TJ
|
2961
|
+
ET
|
2962
|
+
|
2963
|
+
|
2964
|
+
BT
|
2965
|
+
23.25984251968504 55.40925196850394 Td
|
2966
|
+
/F1.0 5 Tf
|
2967
|
+
[<454d495449444f20504f52204d45204f5520455050204f5054> 93 <414e54452050454c4f2053494d504c4553204e> 35 <41> 40 <43494f4e> 35 <414c202a204e> 35 <41> 55 <4f204745524120444952454954> 18 <4f204120435245444954> 18 <4f2046495343414c20444520495049>] TJ
|
2989
2968
|
ET
|
2990
2969
|
|
2991
2970
|
374.173 21.543 202.677 75.118 re
|
@@ -3022,17 +3001,17 @@ xref
|
|
3022
3001
|
0000000109 00000 n
|
3023
3002
|
0000000158 00000 n
|
3024
3003
|
0000000215 00000 n
|
3025
|
-
|
3026
|
-
|
3027
|
-
|
3028
|
-
|
3029
|
-
|
3030
|
-
|
3004
|
+
0000021549 00000 n
|
3005
|
+
0000021784 00000 n
|
3006
|
+
0000022302 00000 n
|
3007
|
+
0000022401 00000 n
|
3008
|
+
0000040615 00000 n
|
3009
|
+
0000040713 00000 n
|
3031
3010
|
trailer
|
3032
3011
|
<< /Size 11
|
3033
3012
|
/Root 2 0 R
|
3034
3013
|
/Info 1 0 R
|
3035
3014
|
>>
|
3036
3015
|
startxref
|
3037
|
-
|
3016
|
+
40814
|
3038
3017
|
%%EOF
|
@@ -308,49 +308,6 @@ describe BrDanfe::DanfeLib::DetBody do
|
|
308
308
|
end
|
309
309
|
end
|
310
310
|
|
311
|
-
context "with DIFAL" do
|
312
|
-
let(:xml_as_string) do
|
313
|
-
<<-eos
|
314
|
-
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
315
|
-
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
316
|
-
<det nItem="1">
|
317
|
-
<prod>
|
318
|
-
<cProd>3</cProd>
|
319
|
-
<xProd>Produto Com DIFAL</xProd>
|
320
|
-
<NCM>45678901</NCM>
|
321
|
-
<CFOP>5401</CFOP>
|
322
|
-
<uCom>UN</uCom>
|
323
|
-
<qCom>6.0000</qCom>
|
324
|
-
<vUnCom>1.1312000000</vUnCom>
|
325
|
-
<vProd>6.79</vProd>
|
326
|
-
</prod>
|
327
|
-
<imposto>
|
328
|
-
<ICMSUFDest>
|
329
|
-
<vBCUFDest>12000.53</vBCUFDest>
|
330
|
-
<pFCPUFDest>17.90</pFCPUFDest>
|
331
|
-
<pICMSUFDest>21.51</pICMSUFDest>
|
332
|
-
<pICMSInter>12.45</pICMSInter>
|
333
|
-
<pICMSInterPart>40</pICMSInterPart>
|
334
|
-
<vFCPUFDest>11002.35</vFCPUFDest>
|
335
|
-
<vICMSUFDest>19282.47</vICMSUFDest>
|
336
|
-
<vICMSUFRemet>12344.56</vICMSUFRemet>
|
337
|
-
</ICMSUFDest>
|
338
|
-
</imposto>
|
339
|
-
</det>
|
340
|
-
</infNFe>
|
341
|
-
</NFe>
|
342
|
-
eos
|
343
|
-
end
|
344
|
-
|
345
|
-
it "renders xml to the pdf" do
|
346
|
-
expect(File.exist?(output_pdf)).to be_falsey
|
347
|
-
|
348
|
-
pdf.render_file output_pdf
|
349
|
-
|
350
|
-
expect("#{base_dir}det_body#render-difal.pdf").to have_same_content_of file: output_pdf
|
351
|
-
end
|
352
|
-
end
|
353
|
-
|
354
311
|
context "when the unit price of the product has a custom precision" do
|
355
312
|
subject { described_class.new(pdf, xml, options_custom_unit_price_precision) }
|
356
313
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe BrDanfe::DanfeLib::Infadic do
|
4
|
-
let(:base_dir) { "./spec/fixtures/nfe/lib/"}
|
4
|
+
let(:base_dir) { "./spec/fixtures/nfe/lib/" }
|
5
5
|
let(:output_pdf) { "#{base_dir}output.pdf" }
|
6
6
|
|
7
7
|
let(:pdf) { BrDanfe::DanfeLib::Document.new }
|
@@ -43,6 +43,13 @@ describe BrDanfe::DanfeLib::Infadic do
|
|
43
43
|
<infAdic>
|
44
44
|
<infCpl>Uma observação</infCpl>
|
45
45
|
</infAdic>
|
46
|
+
<total>
|
47
|
+
<ICMSTot>
|
48
|
+
<vFCPUFDest>0.00</vFCPUFDest>
|
49
|
+
<vICMSUFDest>0.00</vICMSUFDest>
|
50
|
+
<vICMSUFRemet>0.00</vICMSUFRemet>
|
51
|
+
</ICMSTot>
|
52
|
+
</total>
|
46
53
|
</infNFe>
|
47
54
|
</NFe>
|
48
55
|
eos
|
@@ -61,6 +68,61 @@ describe BrDanfe::DanfeLib::Infadic do
|
|
61
68
|
|
62
69
|
expect("#{base_dir}infadic#render.pdf").to have_same_content_of file: output_pdf
|
63
70
|
end
|
71
|
+
|
72
|
+
context "with difal" do
|
73
|
+
let(:xml_as_string) do
|
74
|
+
<<-eos
|
75
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
76
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
77
|
+
<transp>
|
78
|
+
<vol>
|
79
|
+
<qVol>1</qVol>
|
80
|
+
<esp>VOLUMES 1</esp>
|
81
|
+
<marca>DIVERSOS 1</marca>
|
82
|
+
<nVol>1</nVol>
|
83
|
+
<pesoL>1000.000</pesoL>
|
84
|
+
<pesoB>1100.000</pesoB>
|
85
|
+
</vol>
|
86
|
+
<vol>
|
87
|
+
<qVol>2</qVol>
|
88
|
+
<esp>VOLUMES 2</esp>
|
89
|
+
<marca>DIVERSOS 2</marca>
|
90
|
+
<nVol>2</nVol>
|
91
|
+
<pesoL>2000.000</pesoL>
|
92
|
+
<pesoB>2200.000</pesoB>
|
93
|
+
</vol>
|
94
|
+
<vol>
|
95
|
+
<qVol>3</qVol>
|
96
|
+
<esp>VOLUMES 3</esp>
|
97
|
+
<marca>DIVERSOS 3</marca>
|
98
|
+
<nVol>3</nVol>
|
99
|
+
<pesoL>3000.000</pesoL>
|
100
|
+
<pesoB>3300.000</pesoB>
|
101
|
+
</vol>
|
102
|
+
</transp>
|
103
|
+
<infAdic>
|
104
|
+
<infCpl>Uma observação</infCpl>
|
105
|
+
</infAdic>
|
106
|
+
<total>
|
107
|
+
<ICMSTot>
|
108
|
+
<vFCPUFDest>4892.78</vFCPUFDest>
|
109
|
+
<vICMSUFDest>2915.78</vICMSUFDest>
|
110
|
+
<vICMSUFRemet>75394.78</vICMSUFRemet>
|
111
|
+
</ICMSTot>
|
112
|
+
</total>
|
113
|
+
</infNFe>
|
114
|
+
</NFe>
|
115
|
+
eos
|
116
|
+
end
|
117
|
+
|
118
|
+
it "renders xml to the pdf" do
|
119
|
+
expect(File.exist?(output_pdf)).to be_falsey
|
120
|
+
|
121
|
+
pdf.render_file output_pdf
|
122
|
+
|
123
|
+
expect("#{base_dir}infadic#render-difal.pdf").to have_same_content_of file: output_pdf
|
124
|
+
end
|
125
|
+
end
|
64
126
|
end
|
65
127
|
|
66
128
|
context "with extra volume" do
|
@@ -76,6 +138,59 @@ describe BrDanfe::DanfeLib::Infadic do
|
|
76
138
|
|
77
139
|
expect("#{base_dir}infadic#render-extra_volume.pdf").to have_same_content_of file: output_pdf
|
78
140
|
end
|
141
|
+
|
142
|
+
context "with difal" do
|
143
|
+
let(:xml_as_string) do
|
144
|
+
<<-eos
|
145
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
146
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
147
|
+
<transp>
|
148
|
+
<vol>
|
149
|
+
<qVol>1</qVol>
|
150
|
+
<esp>VOLUMES 1</esp>
|
151
|
+
<marca>DIVERSOS 1</marca>
|
152
|
+
<nVol>1</nVol>
|
153
|
+
<pesoL>1000.000</pesoL>
|
154
|
+
<pesoB>1100.000</pesoB>
|
155
|
+
</vol>
|
156
|
+
<vol>
|
157
|
+
<qVol>2</qVol>
|
158
|
+
<esp>VOLUMES 2</esp>
|
159
|
+
<marca>DIVERSOS 2</marca>
|
160
|
+
<nVol>2</nVol>
|
161
|
+
<pesoL>2000.000</pesoL>
|
162
|
+
<pesoB>2200.000</pesoB>
|
163
|
+
</vol>
|
164
|
+
<vol>
|
165
|
+
<qVol>3</qVol>
|
166
|
+
<esp>VOLUMES 3</esp>
|
167
|
+
<marca>DIVERSOS 3</marca>
|
168
|
+
<nVol>3</nVol>
|
169
|
+
<pesoL>3000.000</pesoL>
|
170
|
+
<pesoB>3300.000</pesoB>
|
171
|
+
</vol>
|
172
|
+
</transp>
|
173
|
+
<infAdic>
|
174
|
+
<infCpl>Uma observação</infCpl>
|
175
|
+
</infAdic>
|
176
|
+
<ICMSTot>
|
177
|
+
<vFCPUFDest>4892.78</vFCPUFDest>
|
178
|
+
<vICMSUFDest>2915.78</vICMSUFDest>
|
179
|
+
<vICMSUFRemet>75394.78</vICMSUFRemet>
|
180
|
+
</ICMSTot>
|
181
|
+
</infNFe>
|
182
|
+
</NFe>
|
183
|
+
eos
|
184
|
+
end
|
185
|
+
|
186
|
+
it "renders xml to the pdf" do
|
187
|
+
expect(File.exist?(output_pdf)).to be_falsey
|
188
|
+
|
189
|
+
pdf.render_file output_pdf
|
190
|
+
|
191
|
+
expect("#{base_dir}infadic#render-extra_volume_difal.pdf").to have_same_content_of file: output_pdf
|
192
|
+
end
|
193
|
+
end
|
79
194
|
end
|
80
195
|
end
|
81
196
|
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.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ASSEINFO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -223,7 +223,6 @@ files:
|
|
223
223
|
- spec/fixtures/nfe/lib/dest#render-with_ie.pdf
|
224
224
|
- spec/fixtures/nfe/lib/det_body#render-csosn.pdf
|
225
225
|
- spec/fixtures/nfe/lib/det_body#render-cst.pdf
|
226
|
-
- spec/fixtures/nfe/lib/det_body#render-difal.pdf
|
227
226
|
- spec/fixtures/nfe/lib/det_body#render-fci.pdf
|
228
227
|
- spec/fixtures/nfe/lib/det_body#render-icms_st.pdf
|
229
228
|
- spec/fixtures/nfe/lib/det_body#render-quantity_with_custom_precision.pdf
|
@@ -240,7 +239,9 @@ files:
|
|
240
239
|
- spec/fixtures/nfe/lib/emit_header#render-with_logo.pdf
|
241
240
|
- spec/fixtures/nfe/lib/emit_header#render-without_logo.pdf
|
242
241
|
- spec/fixtures/nfe/lib/icmstot#render.pdf
|
242
|
+
- spec/fixtures/nfe/lib/infadic#render-difal.pdf
|
243
243
|
- spec/fixtures/nfe/lib/infadic#render-extra_volume.pdf
|
244
|
+
- spec/fixtures/nfe/lib/infadic#render-extra_volume_difal.pdf
|
244
245
|
- spec/fixtures/nfe/lib/infadic#render.pdf
|
245
246
|
- spec/fixtures/nfe/lib/issqn#render.pdf
|
246
247
|
- spec/fixtures/nfe/lib/ticket#render.pdf
|
@@ -1,274 +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 2898
|
21
|
-
>>
|
22
|
-
stream
|
23
|
-
q
|
24
|
-
0.3 w
|
25
|
-
[0.3 0.6] 0 d
|
26
|
-
0.3 w
|
27
|
-
/DeviceRGB CS
|
28
|
-
0.000 0.000 0.000 SCN
|
29
|
-
21.260 285.103 m
|
30
|
-
63.780 285.103 l
|
31
|
-
S
|
32
|
-
[ ] 0 d
|
33
|
-
0.3 w
|
34
|
-
0.000 0.000 0.000 SCN
|
35
|
-
|
36
|
-
BT
|
37
|
-
23.25984251968504 315.18567716535443 Td
|
38
|
-
/F1.0 6 Tf
|
39
|
-
[<33>] TJ
|
40
|
-
ET
|
41
|
-
|
42
|
-
[0.3 0.6] 0 d
|
43
|
-
0.3 w
|
44
|
-
0.000 0.000 0.000 SCN
|
45
|
-
63.780 285.103 m
|
46
|
-
188.504 285.103 l
|
47
|
-
S
|
48
|
-
[ ] 0 d
|
49
|
-
0.3 w
|
50
|
-
0.000 0.000 0.000 SCN
|
51
|
-
|
52
|
-
BT
|
53
|
-
65.77952755905513 315.18567716535443 Td
|
54
|
-
/F1.0 6 Tf
|
55
|
-
[<50726f6475746f20436f6d20444946> 74 <414c>] TJ
|
56
|
-
ET
|
57
|
-
|
58
|
-
|
59
|
-
BT
|
60
|
-
65.77952755905513 308.48967716535446 Td
|
61
|
-
/F1.0 6 Tf
|
62
|
-
[<444946> 74 <414c3a20566c722042433a2031322e3030302c3533202a20566c722049434d532052656d65743a>] TJ
|
63
|
-
ET
|
64
|
-
|
65
|
-
|
66
|
-
BT
|
67
|
-
65.77952755905513 301.79367716535444 Td
|
68
|
-
/F1.0 6 Tf
|
69
|
-
[<31322e3334342c3536202a20566c722049434d5320446573743a2031392e3238322c3437202a20566c72204643503a>] TJ
|
70
|
-
ET
|
71
|
-
|
72
|
-
|
73
|
-
BT
|
74
|
-
65.77952755905513 295.09767716535447 Td
|
75
|
-
/F1.0 6 Tf
|
76
|
-
[<31312e3030322c3335202a204643503a2031372c393025202a2049434d533a2032312c353125202a>] TJ
|
77
|
-
ET
|
78
|
-
|
79
|
-
|
80
|
-
BT
|
81
|
-
65.77952755905513 288.40167716535444 Td
|
82
|
-
/F1.0 6 Tf
|
83
|
-
[<49434d5320496e7465723a2031322c343525202a2049434d5320496e7465722050> 15 <6172743a20343025>] TJ
|
84
|
-
ET
|
85
|
-
|
86
|
-
[0.3 0.6] 0 d
|
87
|
-
0.3 w
|
88
|
-
0.000 0.000 0.000 SCN
|
89
|
-
188.504 285.103 m
|
90
|
-
225.354 285.103 l
|
91
|
-
S
|
92
|
-
[ ] 0 d
|
93
|
-
0.3 w
|
94
|
-
0.000 0.000 0.000 SCN
|
95
|
-
|
96
|
-
BT
|
97
|
-
190.50393700787401 315.18567716535443 Td
|
98
|
-
/F1.0 6 Tf
|
99
|
-
[<3435363738393031>] TJ
|
100
|
-
ET
|
101
|
-
|
102
|
-
[0.3 0.6] 0 d
|
103
|
-
0.3 w
|
104
|
-
0.000 0.000 0.000 SCN
|
105
|
-
225.354 285.103 m
|
106
|
-
248.031 285.103 l
|
107
|
-
S
|
108
|
-
[ ] 0 d
|
109
|
-
0.3 w
|
110
|
-
0.000 0.000 0.000 SCN
|
111
|
-
[0.3 0.6] 0 d
|
112
|
-
0.3 w
|
113
|
-
0.000 0.000 0.000 SCN
|
114
|
-
248.031 285.103 m
|
115
|
-
276.378 285.103 l
|
116
|
-
S
|
117
|
-
[ ] 0 d
|
118
|
-
0.3 w
|
119
|
-
0.000 0.000 0.000 SCN
|
120
|
-
|
121
|
-
BT
|
122
|
-
250.03149606299212 315.18567716535443 Td
|
123
|
-
/F1.0 6 Tf
|
124
|
-
[<35343031>] TJ
|
125
|
-
ET
|
126
|
-
|
127
|
-
[0.3 0.6] 0 d
|
128
|
-
0.3 w
|
129
|
-
0.000 0.000 0.000 SCN
|
130
|
-
276.378 285.103 m
|
131
|
-
304.724 285.103 l
|
132
|
-
S
|
133
|
-
[ ] 0 d
|
134
|
-
0.3 w
|
135
|
-
0.000 0.000 0.000 SCN
|
136
|
-
|
137
|
-
BT
|
138
|
-
278.37795275590554 315.18567716535443 Td
|
139
|
-
/F1.0 6 Tf
|
140
|
-
[<554e>] TJ
|
141
|
-
ET
|
142
|
-
|
143
|
-
[0.3 0.6] 0 d
|
144
|
-
0.3 w
|
145
|
-
0.000 0.000 0.000 SCN
|
146
|
-
304.724 285.103 m
|
147
|
-
341.575 285.103 l
|
148
|
-
S
|
149
|
-
[ ] 0 d
|
150
|
-
0.3 w
|
151
|
-
0.000 0.000 0.000 SCN
|
152
|
-
|
153
|
-
BT
|
154
|
-
330.0748031496063 315.18567716535443 Td
|
155
|
-
/F1.0 6 Tf
|
156
|
-
[<362c3030>] TJ
|
157
|
-
ET
|
158
|
-
|
159
|
-
[0.3 0.6] 0 d
|
160
|
-
0.3 w
|
161
|
-
0.000 0.000 0.000 SCN
|
162
|
-
341.575 285.103 m
|
163
|
-
384.094 285.103 l
|
164
|
-
S
|
165
|
-
[ ] 0 d
|
166
|
-
0.3 w
|
167
|
-
0.000 0.000 0.000 SCN
|
168
|
-
|
169
|
-
BT
|
170
|
-
372.5944881889764 315.18567716535443 Td
|
171
|
-
/F1.0 6 Tf
|
172
|
-
[<312c3133>] TJ
|
173
|
-
ET
|
174
|
-
|
175
|
-
[0.3 0.6] 0 d
|
176
|
-
0.3 w
|
177
|
-
0.000 0.000 0.000 SCN
|
178
|
-
384.094 285.103 m
|
179
|
-
426.614 285.103 l
|
180
|
-
S
|
181
|
-
[ ] 0 d
|
182
|
-
0.3 w
|
183
|
-
0.000 0.000 0.000 SCN
|
184
|
-
|
185
|
-
BT
|
186
|
-
415.1141732283465 315.18567716535443 Td
|
187
|
-
/F1.0 6 Tf
|
188
|
-
[<362c3739>] TJ
|
189
|
-
ET
|
190
|
-
|
191
|
-
[0.3 0.6] 0 d
|
192
|
-
0.3 w
|
193
|
-
0.000 0.000 0.000 SCN
|
194
|
-
426.614 285.103 m
|
195
|
-
469.134 285.103 l
|
196
|
-
S
|
197
|
-
[ ] 0 d
|
198
|
-
0.3 w
|
199
|
-
0.000 0.000 0.000 SCN
|
200
|
-
[0.3 0.6] 0 d
|
201
|
-
0.3 w
|
202
|
-
0.000 0.000 0.000 SCN
|
203
|
-
469.134 285.103 m
|
204
|
-
497.480 285.103 l
|
205
|
-
S
|
206
|
-
[ ] 0 d
|
207
|
-
0.3 w
|
208
|
-
0.000 0.000 0.000 SCN
|
209
|
-
[0.3 0.6] 0 d
|
210
|
-
0.3 w
|
211
|
-
0.000 0.000 0.000 SCN
|
212
|
-
497.480 285.103 m
|
213
|
-
525.827 285.103 l
|
214
|
-
S
|
215
|
-
[ ] 0 d
|
216
|
-
0.3 w
|
217
|
-
0.000 0.000 0.000 SCN
|
218
|
-
[0.3 0.6] 0 d
|
219
|
-
0.3 w
|
220
|
-
0.000 0.000 0.000 SCN
|
221
|
-
525.827 285.103 m
|
222
|
-
551.339 285.103 l
|
223
|
-
S
|
224
|
-
[ ] 0 d
|
225
|
-
0.3 w
|
226
|
-
0.000 0.000 0.000 SCN
|
227
|
-
[0.3 0.6] 0 d
|
228
|
-
0.3 w
|
229
|
-
0.000 0.000 0.000 SCN
|
230
|
-
551.339 285.103 m
|
231
|
-
575.717 285.103 l
|
232
|
-
S
|
233
|
-
[ ] 0 d
|
234
|
-
0.3 w
|
235
|
-
0.000 0.000 0.000 SCN
|
236
|
-
Q
|
237
|
-
|
238
|
-
endstream
|
239
|
-
endobj
|
240
|
-
5 0 obj
|
241
|
-
<< /Type /Page
|
242
|
-
/Parent 3 0 R
|
243
|
-
/MediaBox [0 0 595.28 841.89]
|
244
|
-
/Contents 4 0 R
|
245
|
-
/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
|
246
|
-
/Font << /F1.0 6 0 R
|
247
|
-
>>
|
248
|
-
>>
|
249
|
-
>>
|
250
|
-
endobj
|
251
|
-
6 0 obj
|
252
|
-
<< /Type /Font
|
253
|
-
/Subtype /Type1
|
254
|
-
/BaseFont /Times-Roman
|
255
|
-
/Encoding /WinAnsiEncoding
|
256
|
-
>>
|
257
|
-
endobj
|
258
|
-
xref
|
259
|
-
0 7
|
260
|
-
0000000000 65535 f
|
261
|
-
0000000015 00000 n
|
262
|
-
0000000109 00000 n
|
263
|
-
0000000158 00000 n
|
264
|
-
0000000215 00000 n
|
265
|
-
0000003165 00000 n
|
266
|
-
0000003345 00000 n
|
267
|
-
trailer
|
268
|
-
<< /Size 7
|
269
|
-
/Root 2 0 R
|
270
|
-
/Info 1 0 R
|
271
|
-
>>
|
272
|
-
startxref
|
273
|
-
3444
|
274
|
-
%%EOF
|