br_danfe 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/Gemfile.lock +1 -1
  4. data/Guardfile +1 -1
  5. data/config/locales/pt-BR.yml +40 -0
  6. data/lib/br_danfe/danfe_lib/nfe.rb +5 -2
  7. data/lib/br_danfe/danfe_lib/nfe_lib/det_body.rb +22 -63
  8. data/lib/br_danfe/danfe_lib/nfe_lib/det_row.rb +63 -0
  9. data/lib/br_danfe/danfe_lib/nfe_lib/emit_header.rb +19 -3
  10. data/lib/br_danfe/danfe_lib/nfe_lib/ibscbstot.rb +58 -0
  11. data/lib/br_danfe/danfe_lib/nfe_lib/icmstot.rb +39 -0
  12. data/lib/br_danfe/danfe_lib/nfe_lib/issqn.rb +20 -11
  13. data/lib/br_danfe/danfe_lib/nfe_lib/rtc_det_row.rb +145 -0
  14. data/lib/br_danfe/danfe_lib/nfe_lib/rtc_layout.rb +26 -0
  15. data/lib/br_danfe/danfe_lib/nfe_lib/transp.rb +1 -0
  16. data/lib/br_danfe/danfe_lib/nfe_lib/vol.rb +1 -0
  17. data/lib/br_danfe/qr_code.rb +1 -1
  18. data/lib/br_danfe/version.rb +1 -1
  19. data/spec/br_danfe/danfe_lib/nfe_lib/emit_header_spec.rb +42 -0
  20. data/spec/br_danfe/danfe_lib/nfe_lib/ibscbstot_spec.rb +125 -0
  21. data/spec/br_danfe/danfe_lib/nfe_lib/icmstot_spec.rb +60 -0
  22. data/spec/br_danfe/danfe_lib/nfe_lib/issqn_spec.rb +69 -0
  23. data/spec/br_danfe/danfe_lib/nfe_lib/rtc_det_row_spec.rb +121 -0
  24. data/spec/br_danfe/danfe_lib/nfe_lib/rtc_layout_spec.rb +113 -0
  25. data/spec/br_danfe/danfe_lib/nfe_spec.rb +115 -0
  26. data/spec/br_danfe/uf_spec.rb +3 -3
  27. data/spec/fixtures/nfe/lib/issqn#render-with_entrega.pdf +0 -0
  28. data/spec/fixtures/nfe/v4.00/rtc_regime_normal.xml +92 -0
  29. data/spec/fixtures/nfe/v4.00/rtc_regime_normal.xml.fixture.pdf +4283 -2
  30. data/spec/fixtures/nfe/v4.00/rtc_regime_normal_with_entrega_and_issqn.xml +105 -0
  31. data/spec/fixtures/nfe/v4.00/rtc_regime_normal_with_entrega_and_issqn.xml.fixture.pdf +5744 -2
  32. data/spec/fixtures/nfe/v4.00/rtc_regime_normal_with_fcp_difal_and_monophasic.xml +103 -0
  33. data/spec/fixtures/nfe/v4.00/rtc_regime_normal_with_fcp_difal_and_monophasic.xml.fixture.pdf +4786 -2
  34. data/spec/fixtures/nfe/v4.00/rtc_regime_normal_with_many_items.xml +709 -0
  35. data/spec/fixtures/nfe/v4.00/rtc_regime_normal_with_many_items.xml.fixture.pdf +27509 -2
  36. data/spec/fixtures/nfe/v4.00/rtc_simples_nacional.xml +65 -0
  37. data/spec/fixtures/nfe/v4.00/rtc_simples_nacional.xml.fixture.pdf +3526 -2
  38. data/spec/fixtures/nfe/v4.00/rtc_simples_nacional_before_start_date.xml +65 -0
  39. data/spec/fixtures/nfe/v4.00/rtc_simples_nacional_before_start_date.xml.fixture.pdf +3998 -2
  40. metadata +21 -2
@@ -0,0 +1,113 @@
1
+ require 'spec_helper'
2
+
3
+ describe BrDanfe::DanfeLib::NfeLib::RtcLayout do
4
+ let(:xml) { BrDanfe::XML.new(xml_as_string) }
5
+
6
+ describe '.applies?' do
7
+ subject { described_class.applies?(xml) }
8
+
9
+ context 'when the NF-e has the IBS/CBS totals' do
10
+ let(:xml_as_string) do
11
+ <<~XML
12
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
13
+ <infNFe versao="4.00">
14
+ <ide><dhEmi>2026-11-10T10:00:00-03:00</dhEmi></ide>
15
+ <total><IBSCBSTot><vBCIBSCBS>100.00</vBCIBSCBS></IBSCBSTot></total>
16
+ </infNFe>
17
+ </NFe>
18
+ XML
19
+ end
20
+
21
+ it { is_expected.to be true }
22
+ end
23
+
24
+ context 'when the NF-e was issued on the start date' do
25
+ let(:xml_as_string) do
26
+ <<~XML
27
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
28
+ <infNFe versao="4.00"><ide><dhEmi>2026-12-01T00:00:00-03:00</dhEmi></ide></infNFe>
29
+ </NFe>
30
+ XML
31
+ end
32
+
33
+ it { is_expected.to be true }
34
+ end
35
+
36
+ context 'when the NF-e was issued before the start date in its own time zone' do
37
+ let(:xml_as_string) do
38
+ <<~XML
39
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
40
+ <infNFe versao="4.00"><ide><dhEmi>2026-11-30T23:59:00-03:00</dhEmi></ide></infNFe>
41
+ </NFe>
42
+ XML
43
+ end
44
+
45
+ it { is_expected.to be false }
46
+ end
47
+
48
+ context 'when an NF-e 2.00 was issued from the start date' do
49
+ let(:xml_as_string) do
50
+ <<~XML
51
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
52
+ <infNFe versao="2.00"><ide><dEmi>2026-12-05</dEmi></ide></infNFe>
53
+ </NFe>
54
+ XML
55
+ end
56
+
57
+ it { is_expected.to be true }
58
+ end
59
+
60
+ context 'when an NF-e 2.00 was issued before the start date' do
61
+ let(:xml_as_string) do
62
+ <<~XML
63
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
64
+ <infNFe versao="2.00"><ide><dEmi>2015-01-14</dEmi></ide></infNFe>
65
+ </NFe>
66
+ XML
67
+ end
68
+
69
+ it { is_expected.to be false }
70
+ end
71
+
72
+ context 'when the NF-e has no issue date' do
73
+ let(:xml_as_string) do
74
+ <<~XML
75
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe"><infNFe versao="4.00"><ide/></infNFe></NFe>
76
+ XML
77
+ end
78
+
79
+ it { is_expected.to be false }
80
+ end
81
+ end
82
+
83
+ describe '.offset' do
84
+ subject { described_class.offset(xml) }
85
+
86
+ let(:line_height) { 0.8 }
87
+ let(:space_between_blocks) { 0.52 }
88
+
89
+ let(:issued_at) { '2026-12-02T10:00:00-03:00' }
90
+ let(:xml_as_string) do
91
+ <<~XML
92
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
93
+ <infNFe versao="4.00">
94
+ <ide><dhEmi>#{issued_at}</dhEmi></ide>
95
+ <total><ICMSTot><vFCP>24.00</vFCP></ICMSTot></total>
96
+ </infNFe>
97
+ </NFe>
98
+ XML
99
+ end
100
+
101
+ context 'when the NF-e uses the new layout' do
102
+ it 'is the FCP line plus the IBS/CBS/IS block and the space after it' do
103
+ expect(subject).to eql line_height + line_height + space_between_blocks
104
+ end
105
+ end
106
+
107
+ context 'when the NF-e uses the current layout' do
108
+ let(:issued_at) { '2026-11-20T10:00:00-03:00' }
109
+
110
+ it('adds nothing') { is_expected.to eql 0.0 }
111
+ end
112
+ end
113
+ end
@@ -15,6 +15,98 @@ describe BrDanfe::DanfeLib::Nfe do
15
15
  expected = File.binread("#{base_dir}nfe_simples_nacional.xml.fixture.pdf")
16
16
  expect(subject.render_pdf).to eq expected
17
17
  end
18
+
19
+ context 'when a Simples Nacional NF-e was issued before 01/12/2026' do
20
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
21
+ let(:xml_file) { File.read("#{base_dir}rtc_simples_nacional_before_start_date.xml") }
22
+ let(:pdf_text) { PDF::Inspector::Text.analyze(subject.render_pdf).strings.join("\n") }
23
+
24
+ it 'keeps the current layout' do
25
+ expect(pdf_text).not_to include('CÓDIGO DO REGIME TRIBUTÁRIO', 'TOTAL DO IBS / CBS / IS', 'BASES DE CÁLCULO')
26
+ end
27
+ end
28
+
29
+ context 'when a Simples Nacional NF-e without IBS/CBS was issued from 01/12/2026' do
30
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
31
+ let(:xml_file) { File.read("#{base_dir}rtc_simples_nacional.xml") }
32
+ let(:pdf_text) { PDF::Inspector::Text.analyze(subject.render_pdf).strings.join("\n") }
33
+
34
+ it 'renders the tax regime and the IBS/CBS totals in blank' do
35
+ expect(pdf_text).to include(
36
+ "CÓDIGO DO REGIME TRIBUTÁRIO\n1 - SIMPLES NACIONAL",
37
+ "TOTAL DO IBS / CBS / IS\nVALOR DA CBS\nVALOR DO IBS UF\nVALOR DO IBS MUNICÍPIO\nVALOR DO IMPOSTO SELETIVO\n"
38
+ )
39
+ end
40
+ end
41
+
42
+ context 'when a Regime Normal NF-e has IBS, CBS and IS' do
43
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
44
+ let(:xml_file) { File.read("#{base_dir}rtc_regime_normal.xml") }
45
+ let(:pdf_text) { PDF::Inspector::Text.analyze(subject.render_pdf).strings.join("\n") }
46
+
47
+ it 'renders the tax regime and the IBS/CBS/IS totals' do
48
+ expect(pdf_text).to include(
49
+ "CÓDIGO DO REGIME TRIBUTÁRIO\n3 - REGIME NORMAL",
50
+ "VALOR DA CBS\n19,98\nVALOR DO IBS UF\n2,22\nVALOR DO IBS MUNICÍPIO\n0,00\nVALOR DO IMPOSTO SELETIVO\n18,00"
51
+ )
52
+ end
53
+
54
+ it 'renders the items with the NT 2026.010 columns' do
55
+ expect(pdf_text).to include(
56
+ "BASES DE CÁLCULO\nALÍQUOTAS\nVALOR DOS TRIBUTOS", '[cClassTrib 200003]', "CBS\n0,36%", "IS\n4,00%"
57
+ )
58
+ end
59
+ end
60
+
61
+ context 'when a Regime Normal NF-e has FCP, DIFAL and monophasic taxes' do
62
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
63
+ let(:xml_file) { File.read("#{base_dir}rtc_regime_normal_with_fcp_difal_and_monophasic.xml") }
64
+ let(:pdf_text) { PDF::Inspector::Text.analyze(subject.render_pdf).strings.join("\n") }
65
+
66
+ it 'renders the FCP, DIFAL and monophasic totals' do
67
+ expect(pdf_text).to include(
68
+ "VALOR DO FCP\n24,00", "VALOR DO DIFAL NA UF DE DESTINO\n45,00", "VALOR DO ICMS MONOFÁSICO\n112,00",
69
+ "VALOR DO IBS MONOFÁSICO\n1,00"
70
+ )
71
+ end
72
+
73
+ it 'keeps the DIFAL in the complementary information' do
74
+ expect(pdf_text).to include('Valores totais do ICMS Interestadual')
75
+ end
76
+ end
77
+
78
+ context 'when no item fits on the first page' do
79
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
80
+ let(:xml_file) { File.read("#{base_dir}rtc_regime_normal_with_entrega_and_issqn.xml") }
81
+ let(:pages) { PDF::Reader.new(StringIO.new(subject.render_pdf)).pages.map(&:text) }
82
+
83
+ it 'renders the products from the second page' do
84
+ expect(pages[0]).not_to include('DADOS DO PRODUTO / SERVIÇO', 'TIJOLO CERAMICO')
85
+ expect(pages[1]).to include('DADOS DO PRODUTO / SERVIÇO', 'TIJOLO CERAMICO', 'OLEO DIESEL S10')
86
+ end
87
+ end
88
+
89
+ context 'when the NF-e with ISSQN uses the NT 2026.010 layout' do
90
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
91
+ let(:xml_file) { File.read("#{base_dir}rtc_regime_normal_with_entrega_and_issqn.xml") }
92
+ let(:first_page) { PDF::Reader.new(StringIO.new(subject.render_pdf)).pages.first.text }
93
+
94
+ it 'renders the ISSQN between the IBS/CBS/IS block and the transporter' do
95
+ expect(first_page.index('TOTAL DO IBS / CBS / IS')).to be < first_page.index('CÁLCULO DO ISSQN')
96
+ expect(first_page.index('CÁLCULO DO ISSQN')).to be < first_page.index('TRANSPORTADOR / VOLUMES TRANSPORTADOS')
97
+ end
98
+ end
99
+
100
+ context 'when a Regime Normal NF-e has more items than the first page holds' do
101
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
102
+ let(:xml_file) { File.read("#{base_dir}rtc_regime_normal_with_many_items.xml") }
103
+ let(:pages) { PDF::Reader.new(StringIO.new(subject.render_pdf)).pages.map(&:text) }
104
+
105
+ it 'renders the products from the first page on' do
106
+ expect(pages[0]).to include('DADOS DO PRODUTO / SERVIÇO', 'TIJOLO CERAMICO')
107
+ expect(pages[1]).to include('DADOS DO PRODUTO / SERVIÇO', 'BASES DE CÁLCULO')
108
+ end
109
+ end
18
110
  end
19
111
 
20
112
  describe '#save_pdf' do
@@ -179,5 +271,28 @@ describe BrDanfe::DanfeLib::Nfe do
179
271
  expect("#{base_dir}multiples.xmls.on.the.same.pdf.pdf").to have_same_content_of file: output_pdf
180
272
  end
181
273
  end
274
+
275
+ context 'when the NF-e follows the NT 2026.010 layout' do
276
+ let(:base_dir) { './spec/fixtures/nfe/v4.00/' }
277
+ let(:xml_file) { File.read("#{base_dir}#{fixture}.xml") }
278
+
279
+ before { FileUtils.rm_f(output_pdf) }
280
+
281
+ [
282
+ 'rtc_simples_nacional_before_start_date', 'rtc_simples_nacional', 'rtc_regime_normal',
283
+ 'rtc_regime_normal_with_fcp_difal_and_monophasic', 'rtc_regime_normal_with_entrega_and_issqn',
284
+ 'rtc_regime_normal_with_many_items'
285
+ ].each do |fixture_name|
286
+ context "with #{fixture_name}.xml" do
287
+ let(:fixture) { fixture_name }
288
+
289
+ it 'renders xml to the pdf' do
290
+ subject.save_pdf output_pdf
291
+
292
+ expect("#{base_dir}#{fixture}.xml.fixture.pdf").to have_same_content_of file: output_pdf
293
+ end
294
+ end
295
+ end
296
+ end
182
297
  end
183
298
  end
@@ -3,9 +3,9 @@ require 'spec_helper'
3
3
  describe BrDanfe::Uf do
4
4
  describe '#include?' do
5
5
  ufs =
6
- %w[
7
- AC AL AP AM BA CE DF ES GO MA MT MS MG PA PB PR PE PI RJ
8
- RN RS RO RR SC SP SE TO
6
+ [
7
+ 'AC', 'AL', 'AP', 'AM', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MT', 'MS', 'MG', 'PA', 'PB', 'PR', 'PE', 'PI', 'RJ',
8
+ 'RN', 'RS', 'RO', 'RR', 'SC', 'SP', 'SE', 'TO'
9
9
  ]
10
10
 
11
11
  context 'when uf is symbol' do
@@ -0,0 +1,92 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
3
+ <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
4
+ <infNFe Id="NFe42261112345678000195550010000012341123456780" versao="4.00">
5
+ <ide>
6
+ <cUF>42</cUF><cNF>12345678</cNF><natOp>VENDA DE MERCADORIA</natOp><mod>55</mod><serie>1</serie><nNF>1234</nNF>
7
+ <dhEmi>2026-12-02T10:00:00-03:00</dhEmi><dhSaiEnt>2026-12-02T10:30:00-03:00</dhSaiEnt><tpNF>1</tpNF><idDest>1</idDest>
8
+ <cMunFG>4205407</cMunFG><tpImp>1</tpImp><tpEmis>1</tpEmis><cDV>0</cDV><tpAmb>1</tpAmb><finNFe>1</finNFe><indFinal>0</indFinal>
9
+ <indPres>1</indPres><procEmi>0</procEmi><verProc>Facil123</verProc>
10
+ </ide>
11
+ <emit>
12
+ <CNPJ>12345678000195</CNPJ><xNome>EMPRESA EXEMPLO LTDA</xNome><xFant>EXEMPLO</xFant>
13
+ <enderEmit><xLgr>Rua Exemplo</xLgr><nro>100</nro><xBairro>Centro</xBairro><cMun>4205407</cMun><xMun>Florianopolis</xMun><UF>SC</UF><CEP>88000000</CEP><cPais>1058</cPais><xPais>Brasil</xPais><fone>4830000000</fone></enderEmit>
14
+ <IE>255555555</IE><CRT>3</CRT>
15
+ </emit>
16
+ <dest>
17
+ <CNPJ>98765432000198</CNPJ><xNome>CLIENTE EXEMPLO S/A</xNome>
18
+ <enderDest><xLgr>Av. Cliente</xLgr><nro>200</nro><xBairro>Centro</xBairro><cMun>4205407</cMun><xMun>Florianopolis</xMun><UF>SC</UF><CEP>88010000</CEP><cPais>1058</cPais><xPais>Brasil</xPais><fone>4831111111</fone></enderDest>
19
+ <indIEDest>1</indIEDest><IE>251111111</IE>
20
+ </dest>
21
+ <det nItem="1">
22
+ <prod><cProd>TIJ-001</cProd><cEAN>SEM GTIN</cEAN><xProd>TIJOLO CERAMICO 6 FUROS</xProd><NCM>69041000</NCM><CFOP>5101</CFOP><uCom>UN</uCom><qCom>1000.00</qCom><vUnCom>1.20</vUnCom><vProd>1200.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UN</uTrib><qTrib>1000.00</qTrib><vUnTrib>1.20</vUnTrib><indTot>1</indTot></prod>
23
+ <imposto>
24
+ <ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>1200.00</vBC><pICMS>17.00</pICMS><vICMS>204.00</vICMS></ICMS00></ICMS>
25
+ <IPI><cEnq>999</cEnq><IPITrib><CST>50</CST><vBC>1200.00</vBC><pIPI>5.00</pIPI><vIPI>60.00</vIPI></IPITrib></IPI>
26
+ <PIS><PISAliq><CST>01</CST><vBC>1200.00</vBC><pPIS>1.65</pPIS><vPIS>19.80</vPIS></PISAliq></PIS>
27
+ <COFINS><COFINSAliq><CST>01</CST><vBC>1200.00</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>91.20</vCOFINS></COFINSAliq></COFINS>
28
+ <IBSCBS><CST>000</CST><cClassTrib>000001</cClassTrib>
29
+ <gIBSCBS><vBC>1200.00</vBC>
30
+ <gIBSUF><pIBSUF>0.1000</pIBSUF><vIBSUF>1.20</vIBSUF></gIBSUF>
31
+ <gIBSMun><pIBSMun>0.0000</pIBSMun><vIBSMun>0.00</vIBSMun></gIBSMun>
32
+ <vIBS>1.20</vIBS>
33
+ <gCBS><pCBS>0.9000</pCBS><vCBS>10.80</vCBS></gCBS>
34
+ </gIBSCBS></IBSCBS>
35
+ </imposto>
36
+ <infAdProd>Lote 2026-11</infAdProd>
37
+ </det>
38
+ <det nItem="2">
39
+ <prod><cProd>ARG-020</cProd><cEAN>SEM GTIN</cEAN><xProd>ARGAMASSA COLANTE AC-II 20KG</xProd><NCM>32149000</NCM><CFOP>5102</CFOP><uCom>SC</uCom><qCom>50.00</qCom><vUnCom>28.50</vUnCom><vProd>1425.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>SC</uTrib><qTrib>50.00</qTrib><vUnTrib>28.50</vUnTrib><indTot>1</indTot></prod>
40
+ <imposto>
41
+ <ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>1425.00</vBC><pICMS>17.00</pICMS><vICMS>242.25</vICMS></ICMS00></ICMS>
42
+ <IPI><cEnq>999</cEnq><IPINT><CST>53</CST></IPINT></IPI>
43
+ <PIS><PISAliq><CST>01</CST><vBC>1425.00</vBC><pPIS>1.65</pPIS><vPIS>23.51</vPIS></PISAliq></PIS>
44
+ <COFINS><COFINSAliq><CST>01</CST><vBC>1425.00</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>108.30</vCOFINS></COFINSAliq></COFINS>
45
+ <IBSCBS><CST>200</CST><cClassTrib>200003</cClassTrib>
46
+ <gIBSCBS><vBC>1425.00</vBC>
47
+ <gIBSUF><pIBSUF>0.1000</pIBSUF><gRed><pRedAliq>60.0000</pRedAliq><pAliqEfet>0.0400</pAliqEfet></gRed><vIBSUF>0.57</vIBSUF></gIBSUF>
48
+ <gIBSMun><pIBSMun>0.0000</pIBSMun><gRed><pRedAliq>60.0000</pRedAliq><pAliqEfet>0.0000</pAliqEfet></gRed><vIBSMun>0.00</vIBSMun></gIBSMun>
49
+ <vIBS>0.57</vIBS>
50
+ <gCBS><pCBS>0.9000</pCBS><gRed><pRedAliq>60.0000</pRedAliq><pAliqEfet>0.3600</pAliqEfet></gRed><vCBS>5.13</vCBS></gCBS>
51
+ </gIBSCBS></IBSCBS>
52
+ </imposto>
53
+ </det>
54
+ <det nItem="3">
55
+ <prod><cProd>REF-350</cProd><cEAN>SEM GTIN</cEAN><xProd>REFRIGERANTE COLA LATA 350ML</xProd><NCM>22021000</NCM><CFOP>5102</CFOP><uCom>CX</uCom><qCom>10.00</qCom><vUnCom>45.00</vUnCom><vProd>450.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>CX</uTrib><qTrib>10.00</qTrib><vUnTrib>45.00</vUnTrib><indTot>1</indTot></prod>
56
+ <imposto>
57
+ <ICMS><ICMS00><orig>0</orig><CST>00</CST><modBC>3</modBC><vBC>450.00</vBC><pICMS>17.00</pICMS><vICMS>76.50</vICMS></ICMS00></ICMS>
58
+ <IPI><cEnq>999</cEnq><IPINT><CST>53</CST></IPINT></IPI>
59
+ <PIS><PISAliq><CST>01</CST><vBC>450.00</vBC><pPIS>1.65</pPIS><vPIS>7.43</vPIS></PISAliq></PIS>
60
+ <COFINS><COFINSAliq><CST>01</CST><vBC>450.00</vBC><pCOFINS>7.60</pCOFINS><vCOFINS>34.20</vCOFINS></COFINSAliq></COFINS>
61
+ <IS><CSTIS>000</CSTIS><cClassTribIS>000001</cClassTribIS><vBCIS>450.00</vBCIS><pIS>4.0000</pIS><vIS>18.00</vIS></IS>
62
+ <IBSCBS><CST>000</CST><cClassTrib>000001</cClassTrib>
63
+ <gIBSCBS><vBC>450.00</vBC>
64
+ <gIBSUF><pIBSUF>0.1000</pIBSUF><vIBSUF>0.45</vIBSUF></gIBSUF>
65
+ <gIBSMun><pIBSMun>0.0000</pIBSMun><vIBSMun>0.00</vIBSMun></gIBSMun>
66
+ <vIBS>0.45</vIBS>
67
+ <gCBS><pCBS>0.9000</pCBS><vCBS>4.05</vCBS></gCBS>
68
+ </gIBSCBS></IBSCBS>
69
+ </imposto>
70
+ </det>
71
+ <total>
72
+ <ICMSTot><vBC>3075.00</vBC><vICMS>522.75</vICMS><vICMSDeson>0.00</vICMSDeson><vFCP>0.00</vFCP><vBCST>0.00</vBCST><vST>0.00</vST><vFCPST>0.00</vFCPST><vFCPSTRet>0.00</vFCPSTRet><vProd>3075.00</vProd><vFrete>0.00</vFrete><vSeg>0.00</vSeg><vDesc>0.00</vDesc><vII>0.00</vII><vIPI>60.00</vIPI><vIPIDevol>0.00</vIPIDevol><vPIS>50.74</vPIS><vCOFINS>233.70</vCOFINS><vOutro>0.00</vOutro><vNF>3135.00</vNF></ICMSTot>
73
+ <ISTot><vIS>18.00</vIS></ISTot>
74
+ <IBSCBSTot><vBCIBSCBS>3075.00</vBCIBSCBS>
75
+ <gIBS><gIBSUF><vDif>0.00</vDif><vDevTrib>0.00</vDevTrib><vIBSUF>2.22</vIBSUF></gIBSUF><gIBSMun><vDif>0.00</vDif><vDevTrib>0.00</vDevTrib><vIBSMun>0.00</vIBSMun></gIBSMun><vIBS>2.22</vIBS><vCredPres>0.00</vCredPres><vCredPresCondSus>0.00</vCredPresCondSus></gIBS>
76
+ <gCBS><vDif>0.00</vDif><vDevTrib>0.00</vDevTrib><vCBS>19.98</vCBS><vCredPres>0.00</vCredPres><vCredPresCondSus>0.00</vCredPresCondSus></gCBS>
77
+ </IBSCBSTot>
78
+ </total>
79
+ <transp><modFrete>0</modFrete>
80
+ <transporta><CNPJ>11222333000144</CNPJ><xNome>TRANSPORTADORA EXEMPLO LTDA</xNome><IE>253333333</IE><xEnder>Rod. Exemplo, km 10</xEnder><xMun>Sao Jose</xMun><UF>SC</UF></transporta>
81
+ <vol><qVol>60</qVol><esp>VOLUMES</esp><pesoL>2510.000</pesoL><pesoB>2550.000</pesoB></vol>
82
+ </transp>
83
+ <cobr><fat><nFat>1234</nFat><vOrig>3135.00</vOrig><vDesc>0.00</vDesc><vLiq>3135.00</vLiq></fat>
84
+ <dup><nDup>001</nDup><dVenc>2026-12-23</dVenc><vDup>1567.50</vDup></dup>
85
+ <dup><nDup>002</nDup><dVenc>2027-01-22</dVenc><vDup>1567.50</vDup></dup>
86
+ </cobr>
87
+ <pag><detPag><indPag>1</indPag><tPag>15</tPag><vPag>3135.00</vPag></detPag></pag>
88
+ <infAdic><infCpl>Documento de teste do DANFE da Reforma Tributaria (NT 2026.010).</infCpl></infAdic>
89
+ </infNFe>
90
+ </NFe>
91
+ <protNFe versao="4.00"><infProt><tpAmb>1</tpAmb><verAplic>SVRS202611</verAplic><chNFe>42261112345678000195550010000012341123456780</chNFe><dhRecbto>2026-12-02T10:01:00-03:00</dhRecbto><nProt>342260000012345</nProt><digVal>AAAAAAAAAAAAAAAAAAAAAAAAAAA=</digVal><cStat>100</cStat><xMotivo>Autorizado o uso da NF-e</xMotivo></infProt></protNFe>
92
+ </nfeProc>