br_danfe 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +20 -8
- data/.github/dependabot.yml +19 -0
- data/.rubocop.yml +24 -11
- data/Gemfile.lock +38 -30
- data/Guardfile +3 -1
- data/bin/_guard-core +29 -0
- data/bin/guard +29 -0
- data/br_danfe.gemspec +6 -5
- data/lib/br_danfe/danfe_lib/nfce.rb +10 -8
- data/lib/br_danfe/danfe_lib/nfce_lib/header.rb +1 -2
- data/lib/br_danfe/danfe_lib/nfe.rb +11 -9
- data/lib/br_danfe/danfe_lib/nfe_lib/dup.rb +1 -2
- data/lib/br_danfe/danfe_lib/nfe_lib/emit_header.rb +4 -5
- data/lib/br_danfe/danfe_lib/nfe_lib/infadic.rb +2 -1
- data/lib/br_danfe/helper.rb +1 -1
- data/lib/br_danfe/mdfe.rb +1 -1
- data/lib/br_danfe/mdfe_lib/authorization_protocol.rb +1 -1
- data/lib/br_danfe/mdfe_lib/fisco_control.rb +6 -25
- data/lib/br_danfe/mdfe_lib/header.rb +7 -8
- data/lib/br_danfe/mdfe_lib/mdfe_identification.rb +1 -1
- data/lib/br_danfe/mdfe_lib/notes.rb +1 -1
- data/lib/br_danfe/qr_code.rb +1 -2
- data/lib/br_danfe/version.rb +1 -1
- data/lib/br_danfe.rb +2 -2
- data/spec/br_danfe/danfe_lib/nfce_lib/footer_spec.rb +3 -2
- data/spec/br_danfe/danfe_lib/nfce_lib/header_spec.rb +2 -2
- data/spec/br_danfe/danfe_lib/nfce_lib/helper_spec.rb +2 -2
- data/spec/br_danfe/danfe_lib/nfce_lib/key_spec.rb +2 -2
- data/spec/br_danfe/danfe_lib/nfce_lib/nfce_identification_spec.rb +2 -2
- data/spec/br_danfe/danfe_lib/nfce_lib/recipient_spec.rb +10 -10
- data/spec/br_danfe/danfe_lib/nfce_lib/total_list_spec.rb +12 -12
- data/spec/br_danfe/danfe_lib/nfe_lib/cst_spec.rb +4 -4
- data/spec/br_danfe/danfe_lib/nfe_lib/dest_spec.rb +178 -178
- data/spec/br_danfe/danfe_lib/nfe_lib/det_body_spec.rb +274 -274
- data/spec/br_danfe/danfe_lib/nfe_lib/document_spec.rb +77 -77
- data/spec/br_danfe/danfe_lib/nfe_lib/dup_spec.rb +23 -23
- data/spec/br_danfe/danfe_lib/nfe_lib/emit_header_spec.rb +37 -37
- data/spec/br_danfe/danfe_lib/nfe_lib/helper_spec.rb +34 -34
- data/spec/br_danfe/danfe_lib/nfe_lib/icmstot_spec.rb +19 -19
- data/spec/br_danfe/danfe_lib/nfe_lib/infadic_spec.rb +237 -237
- data/spec/br_danfe/danfe_lib/nfe_lib/infadic_vol_spec.rb +3 -2
- data/spec/br_danfe/danfe_lib/nfe_lib/issqn_spec.rb +16 -16
- data/spec/br_danfe/danfe_lib/nfe_lib/ticket_spec.rb +13 -13
- data/spec/br_danfe/danfe_lib/nfe_lib/transp_spec.rb +76 -76
- data/spec/br_danfe/danfe_lib/nfe_lib/vol_spec.rb +40 -40
- data/spec/br_danfe/danfe_lib/nfe_lib/xprod_spec.rb +118 -118
- data/spec/br_danfe/danfe_spec.rb +2 -2
- data/spec/br_danfe/helper_spec.rb +15 -15
- data/spec/br_danfe/mdfe_lib/document_spec.rb +2 -2
- data/spec/br_danfe/mdfe_lib/fisco_control_spec.rb +21 -7
- data/spec/br_danfe/mdfe_lib/header_spec.rb +27 -18
- data/spec/br_danfe/mdfe_lib/notes_spec.rb +5 -5
- data/spec/br_danfe/mdfe_lib/totalizer_spec.rb +1 -1
- data/spec/br_danfe/mdfe_spec.rb +4 -5
- data/spec/br_danfe/qr_code_spec.rb +4 -13
- data/spec/br_danfe/xml_spec.rb +6 -6
- data/spec/fixtures/mdfe/lib/fisco_control#without-barcode.pdf +0 -0
- data/spec/fixtures/mdfe/lib/header#render-without-qr-code.pdf +0 -0
- data/spec/spec_helper.rb +1 -1
- metadata +35 -14
@@ -19,7 +19,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
19
19
|
|
20
20
|
context 'when there is no information' do
|
21
21
|
let(:xml_as_string) do
|
22
|
-
|
22
|
+
<<~XML
|
23
23
|
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
24
24
|
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
25
25
|
<transp>
|
@@ -56,7 +56,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
56
56
|
</total>
|
57
57
|
</infNFe>
|
58
58
|
</NFe>
|
59
|
-
|
59
|
+
XML
|
60
60
|
end
|
61
61
|
|
62
62
|
it 'renders title with box, subtitle and fisco box on the pdf' do
|
@@ -70,7 +70,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
70
70
|
|
71
71
|
context 'when has difal' do
|
72
72
|
let(:xml_as_string) do
|
73
|
-
|
73
|
+
<<~XML
|
74
74
|
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
75
75
|
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
76
76
|
<transp>
|
@@ -108,7 +108,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
108
108
|
</total>
|
109
109
|
</infNFe>
|
110
110
|
</NFe>
|
111
|
-
|
111
|
+
XML
|
112
112
|
end
|
113
113
|
|
114
114
|
it 'renders title with box, subtitle, fisco box and difal on the pdf' do
|
@@ -122,35 +122,35 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
122
122
|
|
123
123
|
context 'when has too big address' do
|
124
124
|
let(:xml_as_string) do
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
125
|
+
<<~XML
|
126
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
127
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
128
|
+
<ide>
|
129
|
+
<dEmi>2011-10-29</dEmi>
|
130
|
+
<dSaiEnt>2011-10-30</dSaiEnt>
|
131
|
+
<hSaiEnt>15:32:45</hSaiEnt>
|
132
|
+
</ide>
|
133
|
+
<dest>
|
134
|
+
<CNPJ>82743287000880</CNPJ>
|
135
|
+
<xNome>Schneider Electric Brasil Ltda</xNome>
|
136
|
+
<enderDest>
|
137
|
+
<xLgr>Av da Saudade</xLgr>
|
138
|
+
<nro>1125</nro>
|
139
|
+
<xBairro>Frutal</xBairro>
|
140
|
+
<xCpl>Em anexo ao super mercado maior do bairro</xCpl>
|
141
|
+
<cMun>3552403</cMun>
|
142
|
+
<xMun>SUMARE</xMun>
|
143
|
+
<UF>SP</UF>
|
144
|
+
<CEP>13171320</CEP>
|
145
|
+
<cPais>1058</cPais>
|
146
|
+
<xPais>BRASIL</xPais>
|
147
|
+
<fone>1921046300</fone>
|
148
|
+
</enderDest>
|
149
|
+
<IE>671008375110</IE>
|
150
|
+
</dest>
|
151
|
+
</infNFe>
|
152
|
+
</NFe>
|
153
|
+
XML
|
154
154
|
end
|
155
155
|
|
156
156
|
it 'renders title with box, subtitle, fisco box and address on the pdf' do
|
@@ -164,71 +164,71 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
164
164
|
|
165
165
|
context 'when has complementary information' do
|
166
166
|
let(:xml_as_string) do
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
167
|
+
<<~XML
|
168
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
169
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
170
|
+
<ide>
|
171
|
+
<dEmi>2011-10-29</dEmi>
|
172
|
+
<dSaiEnt>2011-10-30</dSaiEnt>
|
173
|
+
<hSaiEnt>15:32:45</hSaiEnt>
|
174
|
+
</ide>
|
175
|
+
<dest>
|
176
|
+
<CNPJ>82743287000880</CNPJ>
|
177
|
+
<xNome>Schneider Electric Brasil Ltda</xNome>
|
178
|
+
<enderDest>
|
179
|
+
<xLgr>Av da Saudade</xLgr>
|
180
|
+
<nro>1125</nro>
|
181
|
+
<xBairro>Frutal</xBairro>
|
182
|
+
<xCpl>Sala 01 e 02</xCpl>
|
183
|
+
<cMun>3552403</cMun>
|
184
|
+
<xMun>SUMARE</xMun>
|
185
|
+
<UF>SP</UF>
|
186
|
+
<CEP>13171320</CEP>
|
187
|
+
<cPais>1058</cPais>
|
188
|
+
<xPais>BRASIL</xPais>
|
189
|
+
<fone>1921046300</fone>
|
190
|
+
</enderDest>
|
191
|
+
<IE>671008375110</IE>
|
192
|
+
</dest>
|
193
|
+
<transp>
|
194
|
+
<vol>
|
195
|
+
<qVol>1</qVol>
|
196
|
+
<esp>VOLUMES 1</esp>
|
197
|
+
<marca>DIVERSOS 1</marca>
|
198
|
+
<nVol>1</nVol>
|
199
|
+
<pesoL>1000.000</pesoL>
|
200
|
+
<pesoB>1100.000</pesoB>
|
201
|
+
</vol>
|
202
|
+
<vol>
|
203
|
+
<qVol>2</qVol>
|
204
|
+
<esp>VOLUMES 2</esp>
|
205
|
+
<marca>DIVERSOS 2</marca>
|
206
|
+
<nVol>2</nVol>
|
207
|
+
<pesoL>2000.000</pesoL>
|
208
|
+
<pesoB>2200.000</pesoB>
|
209
|
+
</vol>
|
210
|
+
<vol>
|
211
|
+
<qVol>3</qVol>
|
212
|
+
<esp>VOLUMES 3</esp>
|
213
|
+
<marca>DIVERSOS 3</marca>
|
214
|
+
<nVol>3</nVol>
|
215
|
+
<pesoL>3000.000</pesoL>
|
216
|
+
<pesoB>3300.000</pesoB>
|
217
|
+
</vol>
|
218
|
+
</transp>
|
219
|
+
<infAdic>
|
220
|
+
<infCpl>Uma observação</infCpl>
|
221
|
+
</infAdic>
|
222
|
+
<total>
|
223
|
+
<ICMSTot>
|
224
|
+
<vFCPUFDest>0.00</vFCPUFDest>
|
225
|
+
<vICMSUFDest>0.00</vICMSUFDest>
|
226
|
+
<vICMSUFRemet>0.00</vICMSUFRemet>
|
227
|
+
</ICMSTot>
|
228
|
+
</total>
|
229
|
+
</infNFe>
|
230
|
+
</NFe>
|
231
|
+
XML
|
232
232
|
end
|
233
233
|
|
234
234
|
it 'renders title with box, subtitle, fisco box and complementary information on the pdf' do
|
@@ -242,7 +242,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
242
242
|
|
243
243
|
context 'when has additional fisco information' do
|
244
244
|
let(:xml_as_string) do
|
245
|
-
|
245
|
+
<<~XML
|
246
246
|
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
247
247
|
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
248
248
|
<infAdic>
|
@@ -250,7 +250,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
250
250
|
</infAdic>
|
251
251
|
</infNFe>
|
252
252
|
</NFe>
|
253
|
-
|
253
|
+
XML
|
254
254
|
end
|
255
255
|
|
256
256
|
it 'renders title with box, subtitle, fisco box and additional information about fisco on the pdf' do
|
@@ -264,73 +264,73 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
264
264
|
|
265
265
|
context 'when has extra volume' do
|
266
266
|
let(:xml_as_string) do
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
267
|
+
<<~XML
|
268
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
269
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
270
|
+
<ide>
|
271
|
+
<dEmi>2011-10-29</dEmi>
|
272
|
+
<dSaiEnt>2011-10-30</dSaiEnt>
|
273
|
+
<hSaiEnt>15:32:45</hSaiEnt>
|
274
|
+
</ide>
|
275
|
+
<dest>
|
276
|
+
<CNPJ>82743287000880</CNPJ>
|
277
|
+
<xNome>Schneider Electric Brasil Ltda</xNome>
|
278
|
+
<enderDest>
|
279
|
+
<xLgr>Av da Saudade</xLgr>
|
280
|
+
<nro>1125</nro>
|
281
|
+
<xBairro>Frutal</xBairro>
|
282
|
+
<xCpl>Sala 01 e 02</xCpl>
|
283
|
+
<cMun>3552403</cMun>
|
284
|
+
<xMun>SUMARE</xMun>
|
285
|
+
<UF>SP</UF>
|
286
|
+
<CEP>13171320</CEP>
|
287
|
+
<cPais>1058</cPais>
|
288
|
+
<xPais>BRASIL</xPais>
|
289
|
+
<fone>1921046300</fone>
|
290
|
+
</enderDest>
|
291
|
+
<IE>671008375110</IE>
|
292
|
+
</dest>
|
293
|
+
<transp>
|
294
|
+
<vol>
|
295
|
+
<qVol>1</qVol>
|
296
|
+
<esp>VOLUMES 1</esp>
|
297
|
+
<marca>DIVERSOS 1</marca>
|
298
|
+
<nVol>1</nVol>
|
299
|
+
<pesoL>1000.000</pesoL>
|
300
|
+
<pesoB>1100.000</pesoB>
|
301
|
+
</vol>
|
302
|
+
<vol>
|
303
|
+
<qVol>2</qVol>
|
304
|
+
<esp>VOLUMES 2</esp>
|
305
|
+
<marca>DIVERSOS 2</marca>
|
306
|
+
<nVol>2</nVol>
|
307
|
+
<pesoL>2000.000</pesoL>
|
308
|
+
<pesoB>2200.000</pesoB>
|
309
|
+
</vol>
|
310
|
+
<vol>
|
311
|
+
<qVol>3</qVol>
|
312
|
+
<esp>VOLUMES 3</esp>
|
313
|
+
<marca>DIVERSOS 3</marca>
|
314
|
+
<nVol>3</nVol>
|
315
|
+
<pesoL>3000.000</pesoL>
|
316
|
+
<pesoB>3300.000</pesoB>
|
317
|
+
</vol>
|
318
|
+
</transp>
|
319
|
+
<total>
|
320
|
+
<ICMSTot>
|
321
|
+
<vFCPUFDest>0.00</vFCPUFDest>
|
322
|
+
<vICMSUFDest>0.00</vICMSUFDest>
|
323
|
+
<vICMSUFRemet>0.00</vICMSUFRemet>
|
324
|
+
</ICMSTot>
|
325
|
+
</total>
|
326
|
+
</infNFe>
|
327
|
+
</NFe>
|
328
|
+
XML
|
329
329
|
end
|
330
330
|
let(:volumes_number) { 2 }
|
331
331
|
|
332
332
|
it 'renders title with box, subtitle, fisco box and extra volumes on the ' \
|
333
|
-
|
333
|
+
'pdf' do
|
334
334
|
expect(File.exist?(output_pdf)).to be_falsey
|
335
335
|
|
336
336
|
pdf.render_file output_pdf
|
@@ -341,7 +341,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
341
341
|
|
342
342
|
context 'when has address shipment' do
|
343
343
|
let(:xml_as_string) do
|
344
|
-
|
344
|
+
<<~XML
|
345
345
|
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
346
346
|
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
347
347
|
<entrega>
|
@@ -357,7 +357,7 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
357
357
|
</entrega>
|
358
358
|
</infNFe>
|
359
359
|
</NFe>
|
360
|
-
|
360
|
+
XML
|
361
361
|
end
|
362
362
|
|
363
363
|
it 'renders title with box, subtitle, fisco box and address shipment information on the pdf' do
|
@@ -371,82 +371,82 @@ describe BrDanfe::DanfeLib::NfeLib::Infadic do
|
|
371
371
|
|
372
372
|
context 'when has all the informations' do
|
373
373
|
let(:xml_as_string) do
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
374
|
+
<<~XML
|
375
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
376
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
377
|
+
<dest>
|
378
|
+
<CNPJ>82743287000880</CNPJ>
|
379
|
+
<xNome>Schneider Electric Brasil Ltda</xNome>
|
380
|
+
<enderDest>
|
381
|
+
<xLgr>Av da Saudade</xLgr>
|
382
|
+
<nro>1125</nro>
|
383
|
+
<xBairro>Frutal</xBairro>
|
384
|
+
<xCpl>Em anexo ao super mercado maior do bairro</xCpl>
|
385
|
+
<cMun>3552403</cMun>
|
386
|
+
<xMun>SUMARE</xMun>
|
387
|
+
<UF>SP</UF>
|
388
|
+
<CEP>13171320</CEP>
|
389
|
+
<cPais>1058</cPais>
|
390
|
+
<xPais>BRASIL</xPais>
|
391
|
+
<fone>1921046300</fone>
|
392
|
+
</enderDest>
|
393
|
+
<IE>671008375110</IE>
|
394
|
+
</dest>
|
395
|
+
<transp>
|
396
|
+
<vol>
|
397
|
+
<qVol>1</qVol>
|
398
|
+
<esp>VOLUMES 1</esp>
|
399
|
+
<marca>DIVERSOS 1</marca>
|
400
|
+
<nVol>1</nVol>
|
401
|
+
<pesoL>1000.000</pesoL>
|
402
|
+
<pesoB>1100.000</pesoB>
|
403
|
+
</vol>
|
404
|
+
<vol>
|
405
|
+
<qVol>2</qVol>
|
406
|
+
<esp>VOLUMES 2</esp>
|
407
|
+
<marca>DIVERSOS 2</marca>
|
408
|
+
<nVol>2</nVol>
|
409
|
+
<pesoL>2000.000</pesoL>
|
410
|
+
<pesoB>2200.000</pesoB>
|
411
|
+
</vol>
|
412
|
+
<vol>
|
413
|
+
<qVol>3</qVol>
|
414
|
+
<esp>VOLUMES 3</esp>
|
415
|
+
<marca>DIVERSOS 3</marca>
|
416
|
+
<nVol>3</nVol>
|
417
|
+
<pesoL>3000.000</pesoL>
|
418
|
+
<pesoB>3300.000</pesoB>
|
419
|
+
</vol>
|
420
|
+
</transp>
|
421
|
+
<entrega>
|
422
|
+
<CNPJ>32301321907894</CNPJ>
|
423
|
+
<CPF></CPF>
|
424
|
+
<xLgr>Rua dos bobos</xLgr>
|
425
|
+
<nro>0</nro>
|
426
|
+
<xCpl>Na casa não tem parede</xCpl>
|
427
|
+
<xBairro>Centro</xBairro>
|
428
|
+
<cMun>4218004</cMun>
|
429
|
+
<xMun>TIJUCAS</xMun>
|
430
|
+
<UF>SC</UF>
|
431
|
+
</entrega>
|
432
|
+
<infAdic>
|
433
|
+
<infCpl>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec congue in dolor sed sagittis.</infCpl>
|
434
|
+
<infAdFisco>Total de FCP-ST: 348,96</infAdFisco>
|
435
|
+
</infAdic>
|
436
|
+
<ICMSTot>
|
437
|
+
<vFCPST>348.96</vFCPST>
|
438
|
+
<vFCPUFDest>4892.78</vFCPUFDest>
|
439
|
+
<vICMSUFDest>2915.78</vICMSUFDest>
|
440
|
+
<vICMSUFRemet>75394.78</vICMSUFRemet>
|
441
|
+
</ICMSTot>
|
442
|
+
</infNFe>
|
443
|
+
</NFe>
|
444
|
+
XML
|
445
445
|
end
|
446
446
|
let(:volumes_number) { 3 }
|
447
447
|
|
448
448
|
it 'renders title with box, subtitle, fisco box, extra volumes, ' \
|
449
|
-
|
449
|
+
'complementary information, address and difal on the pdf' do
|
450
450
|
expect(File.exist?(output_pdf)).to be_falsey
|
451
451
|
|
452
452
|
pdf.render_file output_pdf
|
@@ -5,11 +5,12 @@ describe BrDanfe::DanfeLib::NfeLib::InfadicVol do
|
|
5
5
|
let(:output_pdf) { "#{base_dir}output.pdf" }
|
6
6
|
let(:pdf) { BrDanfe::DanfeLib::NfeLib::Document.new }
|
7
7
|
let(:xml) { BrDanfe::XML.new(xml_as_string) }
|
8
|
+
|
8
9
|
subject { described_class.new(xml, pdf) }
|
9
10
|
|
10
11
|
describe '#render' do
|
11
12
|
let(:xml_as_string) do
|
12
|
-
|
13
|
+
<<~XML
|
13
14
|
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
14
15
|
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
15
16
|
<dest>
|
@@ -74,7 +75,7 @@ describe BrDanfe::DanfeLib::NfeLib::InfadicVol do
|
|
74
75
|
</ICMSTot>
|
75
76
|
</infNFe>
|
76
77
|
</NFe>
|
77
|
-
|
78
|
+
XML
|
78
79
|
end
|
79
80
|
|
80
81
|
before do
|
@@ -11,28 +11,28 @@ describe BrDanfe::DanfeLib::NfeLib::Issqn do
|
|
11
11
|
|
12
12
|
describe '#render' do
|
13
13
|
let(:xml_as_string) do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
14
|
+
<<~XML
|
15
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
16
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
17
|
+
<emit>
|
18
|
+
<IM>2345</IM>
|
19
|
+
</emit>
|
20
|
+
<total>
|
21
|
+
<ISSQNtot>
|
22
|
+
#{issqn}
|
23
|
+
</ISSQNtot>
|
24
|
+
</total>
|
25
|
+
</infNFe>
|
26
|
+
</NFe>
|
27
|
+
XML
|
28
28
|
end
|
29
29
|
|
30
30
|
let(:issqn) do
|
31
|
-
|
31
|
+
<<~XML
|
32
32
|
<vServ>1.43</vServ>
|
33
33
|
<vBC>2.34</vBC>
|
34
34
|
<vISS>3.45</vISS>
|
35
|
-
|
35
|
+
XML
|
36
36
|
end
|
37
37
|
|
38
38
|
before do
|