br_danfe 0.17.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -8,48 +8,48 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
8
8
|
let(:xml) { BrDanfe::XML.new(xml_as_string) }
|
9
9
|
|
10
10
|
let(:xml_as_string) do
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
<<~XML
|
12
|
+
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
|
13
|
+
<infNFe Id="NFe25111012345678901234550020000134151000134151" versao="2.00">
|
14
|
+
#{products}
|
15
|
+
</infNFe>
|
16
|
+
</NFe>
|
17
|
+
XML
|
18
18
|
end
|
19
19
|
|
20
20
|
let(:product_1) do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
21
|
+
<<~XML
|
22
|
+
<det nItem="1">
|
23
|
+
<prod>
|
24
|
+
<cProd>1</cProd>
|
25
|
+
<xProd>Product 1</xProd>
|
26
|
+
<NCM>45678901</NCM>
|
27
|
+
<CFOP>5401</CFOP>
|
28
|
+
<uCom>UN</uCom>
|
29
|
+
<qCom>6.4545</qCom>
|
30
|
+
<vUnCom>1.03</vUnCom>
|
31
|
+
<vProd>6.65</vProd>
|
32
|
+
</prod>
|
33
|
+
</det>
|
34
|
+
XML
|
35
35
|
end
|
36
36
|
|
37
37
|
let(:product_2) do
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
38
|
+
<<~XML
|
39
|
+
<det nItem="2">
|
40
|
+
<prod>
|
41
|
+
<cProd>2</cProd>
|
42
|
+
<xProd>Product 2</xProd>
|
43
|
+
<NCM>45678901</NCM>
|
44
|
+
<CFOP>5401</CFOP>
|
45
|
+
<uCom>UN</uCom>
|
46
|
+
<qCom>6.4545</qCom>
|
47
|
+
<vUnCom>1.03</vUnCom>
|
48
|
+
<vProd>6.65</vProd>
|
49
|
+
<infAdProd>Additional information 1 - Additional information 2 - Additional information 3</infAdProd>
|
50
|
+
</prod>
|
51
|
+
</det>
|
52
|
+
XML
|
53
53
|
end
|
54
54
|
|
55
55
|
let(:has_issqn) { false }
|
@@ -64,95 +64,95 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
64
64
|
|
65
65
|
context 'with CSOSN' do
|
66
66
|
let(:products) do
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
67
|
+
<<~XML
|
68
|
+
<det nItem="1">
|
69
|
+
<prod>
|
70
|
+
<cProd>1</cProd>
|
71
|
+
<xProd>Produto com CSOSN 101 - Nacional</xProd>
|
72
|
+
<NCM>12345678</NCM>
|
73
|
+
<CFOP>5101</CFOP>
|
74
|
+
<uCom>UN</uCom>
|
75
|
+
<qCom>2.00</qCom>
|
76
|
+
<vUnCom>1.01</vUnCom>
|
77
|
+
<vProd>2.02</vProd>
|
78
|
+
</prod>
|
79
|
+
<imposto>
|
80
|
+
<ICMS>
|
81
|
+
<ICMSSN101>
|
82
|
+
<orig>0</orig>
|
83
|
+
<CSOSN>101</CSOSN>
|
84
|
+
</ICMSSN101>
|
85
|
+
</ICMS>
|
86
|
+
</imposto>
|
87
|
+
</det>
|
88
|
+
<det nItem="2">
|
89
|
+
<prod>
|
90
|
+
<cProd>2</cProd>
|
91
|
+
<xProd>Produto com CSOSN 102 - Estrangeiro</xProd>
|
92
|
+
<NCM>23456789</NCM>
|
93
|
+
<CFOP>5101</CFOP>
|
94
|
+
<uCom>UN</uCom>
|
95
|
+
<qCom>4.00</qCom>
|
96
|
+
<vUnCom>1.02</vUnCom>
|
97
|
+
<vProd>4.08</vProd>
|
98
|
+
</prod>
|
99
|
+
<imposto>
|
100
|
+
<ICMS>
|
101
|
+
<ICMSSN102>
|
102
|
+
<orig>1</orig>
|
103
|
+
<CSOSN>102</CSOSN>
|
104
|
+
</ICMSSN102>
|
105
|
+
</ICMS>
|
106
|
+
</imposto>
|
107
|
+
</det>
|
108
|
+
<det nItem="3">
|
109
|
+
<prod>
|
110
|
+
<cProd>3</cProd>
|
111
|
+
<xProd>Produto Com Csosn 201</xProd>
|
112
|
+
<NCM>45678901</NCM>
|
113
|
+
<CFOP>5401</CFOP>
|
114
|
+
<uCom>UN</uCom>
|
115
|
+
<qCom>6.00</qCom>
|
116
|
+
<vUnCom>1.03</vUnCom>
|
117
|
+
<vProd>6.18</vProd>
|
118
|
+
</prod>
|
119
|
+
<imposto>
|
80
120
|
<ICMS>
|
81
|
-
<
|
82
|
-
<orig>0</orig>
|
83
|
-
<CSOSN>101</CSOSN>
|
84
|
-
</ICMSSN101>
|
85
|
-
</ICMS>
|
86
|
-
</imposto>
|
87
|
-
</det>
|
88
|
-
<det nItem="2">
|
89
|
-
<prod>
|
90
|
-
<cProd>2</cProd>
|
91
|
-
<xProd>Produto com CSOSN 102 - Estrangeiro</xProd>
|
92
|
-
<NCM>23456789</NCM>
|
93
|
-
<CFOP>5101</CFOP>
|
94
|
-
<uCom>UN</uCom>
|
95
|
-
<qCom>4.00</qCom>
|
96
|
-
<vUnCom>1.02</vUnCom>
|
97
|
-
<vProd>4.08</vProd>
|
98
|
-
</prod>
|
99
|
-
<imposto>
|
100
|
-
<ICMS>
|
101
|
-
<ICMSSN102>
|
102
|
-
<orig>1</orig>
|
103
|
-
<CSOSN>102</CSOSN>
|
104
|
-
</ICMSSN102>
|
105
|
-
</ICMS>
|
106
|
-
</imposto>
|
107
|
-
</det>
|
108
|
-
<det nItem="3">
|
109
|
-
<prod>
|
110
|
-
<cProd>3</cProd>
|
111
|
-
<xProd>Produto Com Csosn 201</xProd>
|
112
|
-
<NCM>45678901</NCM>
|
113
|
-
<CFOP>5401</CFOP>
|
114
|
-
<uCom>UN</uCom>
|
115
|
-
<qCom>6.00</qCom>
|
116
|
-
<vUnCom>1.03</vUnCom>
|
117
|
-
<vProd>6.18</vProd>
|
118
|
-
</prod>
|
119
|
-
<imposto>
|
120
|
-
<ICMS>
|
121
|
-
<ICMSSN201>
|
122
|
-
<orig>0</orig>
|
123
|
-
<CSOSN>201</CSOSN>
|
124
|
-
<pMVAST>24.00</pMVAST>
|
125
|
-
<vBCST>7.66</vBCST>
|
126
|
-
<pICMSST>17.00</pICMSST>
|
127
|
-
<vICMSST>0.25</vICMSST>
|
128
|
-
</ICMSSN201>
|
129
|
-
</ICMS>
|
130
|
-
</imposto>
|
131
|
-
</det>
|
132
|
-
<det nItem="4">
|
133
|
-
<prod>
|
134
|
-
<cProd>8</cProd>
|
135
|
-
<xProd>Produto com CSOSN 900 - Com ICMS</xProd>
|
136
|
-
<NCM>34567890</NCM>
|
137
|
-
<CFOP>5201</CFOP>
|
138
|
-
<uCom>UN</uCom>
|
139
|
-
<qCom>16.00</qCom>
|
140
|
-
<vUnCom>1.08</vUnCom>
|
141
|
-
<vProd>17.28</vProd>
|
142
|
-
</prod>
|
143
|
-
<imposto>
|
144
|
-
<ICMS>
|
145
|
-
<ICMSSN900>
|
121
|
+
<ICMSSN201>
|
146
122
|
<orig>0</orig>
|
147
|
-
<CSOSN>
|
148
|
-
<
|
149
|
-
<
|
150
|
-
<
|
151
|
-
|
123
|
+
<CSOSN>201</CSOSN>
|
124
|
+
<pMVAST>24.00</pMVAST>
|
125
|
+
<vBCST>7.66</vBCST>
|
126
|
+
<pICMSST>17.00</pICMSST>
|
127
|
+
<vICMSST>0.25</vICMSST>
|
128
|
+
</ICMSSN201>
|
152
129
|
</ICMS>
|
153
|
-
|
154
|
-
|
155
|
-
|
130
|
+
</imposto>
|
131
|
+
</det>
|
132
|
+
<det nItem="4">
|
133
|
+
<prod>
|
134
|
+
<cProd>8</cProd>
|
135
|
+
<xProd>Produto com CSOSN 900 - Com ICMS</xProd>
|
136
|
+
<NCM>34567890</NCM>
|
137
|
+
<CFOP>5201</CFOP>
|
138
|
+
<uCom>UN</uCom>
|
139
|
+
<qCom>16.00</qCom>
|
140
|
+
<vUnCom>1.08</vUnCom>
|
141
|
+
<vProd>17.28</vProd>
|
142
|
+
</prod>
|
143
|
+
<imposto>
|
144
|
+
<ICMS>
|
145
|
+
<ICMSSN900>
|
146
|
+
<orig>0</orig>
|
147
|
+
<CSOSN>900</CSOSN>
|
148
|
+
<vBC>9.87</vBC>
|
149
|
+
<pICMS>8.76</pICMS>
|
150
|
+
<vICMS>7.65</vICMS>
|
151
|
+
</ICMSSN900>
|
152
|
+
</ICMS>
|
153
|
+
</imposto>
|
154
|
+
</det>
|
155
|
+
XML
|
156
156
|
end
|
157
157
|
|
158
158
|
it 'renders xml to the pdf' do
|
@@ -166,80 +166,80 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
166
166
|
|
167
167
|
context 'with CST' do
|
168
168
|
let(:products) do
|
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
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
169
|
+
<<~XML
|
170
|
+
<det nItem="1">
|
171
|
+
<prod>
|
172
|
+
<cProd>REF 04</cProd>
|
173
|
+
<xProd>Produto com CST 00 - Nacional - ICMS - IPI</xProd>
|
174
|
+
<NCM>90303329</NCM>
|
175
|
+
<EXTIPI>00</EXTIPI>
|
176
|
+
<CFOP>5101</CFOP>
|
177
|
+
<uCom>PC</uCom>
|
178
|
+
<qCom>1.00</qCom>
|
179
|
+
<vUnCom>49.23</vUnCom>
|
180
|
+
<vProd>49.23</vProd>
|
181
|
+
<xPed>98001921</xPed>
|
182
|
+
<nItemPed>10</nItemPed>
|
183
|
+
</prod>
|
184
|
+
<imposto>
|
185
|
+
<ICMS>
|
186
|
+
<ICMS00>
|
187
|
+
<orig>0</orig>
|
188
|
+
<CST>00</CST>
|
189
|
+
<modBC>3</modBC>
|
190
|
+
<vBC>49.23</vBC>
|
191
|
+
<pICMS>12.00</pICMS>
|
192
|
+
<vICMS>5.90</vICMS>
|
193
|
+
</ICMS00>
|
194
|
+
</ICMS>
|
195
|
+
<IPI>
|
196
|
+
<cEnq>999</cEnq>
|
197
|
+
<IPITrib>
|
198
|
+
<CST>50</CST>
|
199
|
+
<vBC>49.23</vBC>
|
200
|
+
<pIPI>5.00</pIPI>
|
201
|
+
<vIPI>2.46</vIPI>
|
202
|
+
</IPITrib>
|
203
|
+
</IPI>
|
204
|
+
</imposto>
|
205
|
+
</det>
|
206
|
+
<det nItem="2">
|
207
|
+
<prod>
|
208
|
+
<cProd>REF 05</cProd>
|
209
|
+
<xProd>Produto com CST 00 - Estrangeiro - ICMS - IPI</xProd>
|
210
|
+
<NCM>90303329</NCM>
|
211
|
+
<EXTIPI>00</EXTIPI>
|
212
|
+
<CFOP>5101</CFOP>
|
213
|
+
<uCom>PC</uCom>
|
214
|
+
<qCom>1.00</qCom>
|
215
|
+
<vUnCom>49.23</vUnCom>
|
216
|
+
<vProd>49.23</vProd>
|
217
|
+
<xPed>98001921</xPed>
|
218
|
+
<nItemPed>10</nItemPed>
|
219
|
+
</prod>
|
220
|
+
<imposto>
|
221
|
+
<ICMS>
|
222
|
+
<ICMS00>
|
223
|
+
<orig>1</orig>
|
224
|
+
<CST>00</CST>
|
225
|
+
<modBC>3</modBC>
|
226
|
+
<vBC>49.23</vBC>
|
227
|
+
<pICMS>12.00</pICMS>
|
228
|
+
<vICMS>5.90</vICMS>
|
229
|
+
</ICMS00>
|
230
|
+
</ICMS>
|
231
|
+
<IPI>
|
232
|
+
<cEnq>999</cEnq>
|
233
|
+
<IPITrib>
|
234
|
+
<CST>50</CST>
|
235
|
+
<vBC>49.23</vBC>
|
236
|
+
<pIPI>5.00</pIPI>
|
237
|
+
<vIPI>2.46</vIPI>
|
238
|
+
</IPITrib>
|
239
|
+
</IPI>
|
240
|
+
</imposto>
|
241
|
+
</det>
|
242
|
+
XML
|
243
243
|
end
|
244
244
|
|
245
245
|
it 'renders xml to the pdf' do
|
@@ -253,30 +253,30 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
253
253
|
|
254
254
|
context 'with FCI' do
|
255
255
|
let(:products) do
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
256
|
+
<<~XML
|
257
|
+
<det nItem="1">
|
258
|
+
<prod>
|
259
|
+
<cProd>REF 06</cProd>
|
260
|
+
<xProd>Produto com FCI</xProd>
|
261
|
+
<NCM>90303329</NCM>
|
262
|
+
<EXTIPI>00</EXTIPI>
|
263
|
+
<CFOP>5101</CFOP>
|
264
|
+
<uCom>PC</uCom>
|
265
|
+
<qCom>1.00</qCom>
|
266
|
+
<vUnCom>49.23</vUnCom>
|
267
|
+
<vProd>49.23</vProd>
|
268
|
+
<nFCI>12232531-74B2-4FDD-87A6-CF0AD3E55386</nFCI>
|
269
|
+
</prod>
|
270
|
+
<imposto>
|
271
|
+
<ICMS>
|
272
|
+
<ICMS00>
|
273
|
+
<orig>0</orig>
|
274
|
+
<CST>00</CST>
|
275
|
+
</ICMS00>
|
276
|
+
</ICMS>
|
277
|
+
</imposto>
|
278
|
+
</det>
|
279
|
+
XML
|
280
280
|
end
|
281
281
|
|
282
282
|
it 'renders xml to the pdf' do
|
@@ -290,32 +290,32 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
290
290
|
|
291
291
|
context 'with ICMS ST' do
|
292
292
|
let(:products) do
|
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
|
-
|
293
|
+
<<~XML
|
294
|
+
<det nItem="1">
|
295
|
+
<prod>
|
296
|
+
<cProd>3</cProd>
|
297
|
+
<xProd>Produto Com Csosn 201 - ICMS ST</xProd>
|
298
|
+
<NCM>45678901</NCM>
|
299
|
+
<CFOP>5401</CFOP>
|
300
|
+
<uCom>UN</uCom>
|
301
|
+
<qCom>6.00</qCom>
|
302
|
+
<vUnCom>1.03</vUnCom>
|
303
|
+
<vProd>6.18</vProd>
|
304
|
+
</prod>
|
305
|
+
<imposto>
|
306
|
+
<ICMS>
|
307
|
+
<ICMSSN201>
|
308
|
+
<orig>0</orig>
|
309
|
+
<CSOSN>201</CSOSN>
|
310
|
+
<pMVAST>24.00</pMVAST>
|
311
|
+
<vBCST>7.66</vBCST>
|
312
|
+
<pICMSST>17.00</pICMSST>
|
313
|
+
<vICMSST>0.25</vICMSST>
|
314
|
+
</ICMSSN201>
|
315
|
+
</ICMS>
|
316
|
+
</imposto>
|
317
|
+
</det>
|
318
|
+
XML
|
319
319
|
end
|
320
320
|
|
321
321
|
it 'renders xml to the pdf' do
|
@@ -329,20 +329,20 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
329
329
|
|
330
330
|
context 'when the unit price of the product has a custom precision' do
|
331
331
|
let(:products) do
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
332
|
+
<<~XML
|
333
|
+
<det nItem="1">
|
334
|
+
<prod>
|
335
|
+
<cProd>3</cProd>
|
336
|
+
<xProd>Produto Com Csosn 201 - ICMS ST</xProd>
|
337
|
+
<NCM>45678901</NCM>
|
338
|
+
<CFOP>5401</CFOP>
|
339
|
+
<uCom>UN</uCom>
|
340
|
+
<qCom>6.00</qCom>
|
341
|
+
<vUnCom>1.1312</vUnCom>
|
342
|
+
<vProd>6.79</vProd>
|
343
|
+
</prod>
|
344
|
+
</det>
|
345
|
+
XML
|
346
346
|
end
|
347
347
|
|
348
348
|
it 'renders xml to the pdf' do
|
@@ -356,20 +356,20 @@ describe BrDanfe::DanfeLib::NfeLib::DetBody do
|
|
356
356
|
|
357
357
|
context 'when the quantity of the product has a custom precision' do
|
358
358
|
let(:products) do
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
359
|
+
<<~XML
|
360
|
+
<det nItem="1">
|
361
|
+
<prod>
|
362
|
+
<cProd>3</cProd>
|
363
|
+
<xProd>Produto Com Csosn 201 - ICMS ST</xProd>
|
364
|
+
<NCM>45678901</NCM>
|
365
|
+
<CFOP>5401</CFOP>
|
366
|
+
<uCom>UN</uCom>
|
367
|
+
<qCom>6.4545</qCom>
|
368
|
+
<vUnCom>1.03</vUnCom>
|
369
|
+
<vProd>6.65</vProd>
|
370
|
+
</prod>
|
371
|
+
</det>
|
372
|
+
XML
|
373
373
|
end
|
374
374
|
|
375
375
|
it 'renders xml to the pdf' do
|