Doubts about XML manipulation by PHP

Asked

Viewed 94 times

0

Good afternoon, you guys.

I have an Electronic Invoice XML where there are several Tags and Subtags related to products.

I created a "Foreach" to scan all products where tag <CEST> is empty.

In the old days, the empty tag was generated as <CEST></CEST>.

The command below could validate this without problem:

if($xml->infNFe->det[$num_item]->prod->CEST == ''){
 ...
}

The problem is that now the empty TAG is generated as <CEST/>, instead of <CEST></ CEST>.

Any suggestions on how to locate items with this tag <CEST/>?

Thank you!

2 answers

1

Welcome to our community!


As you did not inform the XML I proposed that when the tag is not empty, it is string so I wrote one for test and I arrived at the following code.

$xml = json_encode($xml);
$xml = json_decode($xml, true);
if(!is_array($xml['infNFe']['det'][$num_item]['prod']['CEST'])) {
 ...
}

In case the tag type is not string and yes array.

$xml = json_encode($xml);
$xml = json_decode($xml, true);
if(is_array($xml['infNFe']['det'][$num_item]['prod']['CEST']) && count($xml['infNFe']['det'][$num_item]['prod']['CEST']) >= 1) {
 ...
}

0

Good morning.

Thanks for the return!

I tried the codes indicated, however, I was not successful.

Follow the files:

PHP:

<?php
$arquivo_xml = "XML_Teste.xml";

$xml = simplexml_load_file($arquivo_xml);

$num_item = 0;

$num_item_sem_cest = 0;

if(strval($xml->infNFe['versao']) != '1'){
    foreach ($xml->infNFe->det as $produto) {
        $numero_item = $num_item + 1;

        if(

        // ICMS CSOSN 201
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMSSN201->CSOSN) == 201 ||

        // ICMS CSOSN 202
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMSSN202->CSOSN) == 202 ||

        // ICMS CSOSN 203
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMSSN202->CSOSN) == 203 ||

        // ICMS CSOSN 500
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMSSN500->CSOSN) == 500 ||

        // ICMS CSOSN 900
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMSSN900->CSOSN) == 900 ||

        // ICMS CST 10
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMS10->CST) == 10 ||

        // ICMS CST 30
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMS30->CST) == 30 ||

        // ICMS CST 60
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMS60->CST) == 60 ||

        // ICMS CST 70
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMS70->CST) == 70 ||

        // ICMS CST 90
        ($xml->infNFe->det[$num_item]->imposto->ICMS->ICMS90->CST) == 90){

            /*
            O problema da validação está aqui, preciso mostrar apenas os produtos com a tag "</CEST>" 
            */
            if($xml->infNFe->det[$num_item]->prod->CEST == '' || $xml->infNFe->det[$num_item]->prod->CEST == ' ' )
                echo "<strong>Item:&nbsp;&nbsp;&nbsp;</strong> ".$numero_item;
                echo "<br>";
                echo "<strong>Código do produto:&nbsp;&nbsp;&nbsp;</strong> ".strval($xml->infNFe->det[$num_item]->prod->cProd);
                echo "<br>";
                echo "<strong>Nome do produto:&nbsp;&nbsp;&nbsp;</strong> ".strval($xml->infNFe->det[$num_item]->prod->xProd);
                echo "<br>";
                echo "<strong>Item sem CEST";
                echo "<br><br><br>";
                $num_item_sem_cest++;   
            }
        }
        $num_item++;    
    } 
    if($num_item_sem_cest == 0){
        echo "<div style='height:300px;'>";
        echo "<br><br><br>";
        echo "<h4>Todos os produtos desse XML tem o CEST preenchido.</h4>";
        echo "</div>";
    }
} 

?>

XML:

<?xml version="1.0" encoding="utf-8"?><NFe xmlns="http://www.portalfiscal.inf.br/nfe"><infNFe versao="4.00" Id="NFe"><ide><cUF>15</cUF><cNF>00000186</cNF><natOp>Venda Consumidor Final</natOp><mod>55</mod><serie>1</serie><nNF>20</nNF><dhEmi>2018-09-01T08:51:49-03:00</dhEmi><dhSaiEnt>2018-09-01T08:51:49-03:00</dhSaiEnt><tpNF>1</tpNF><idDest>1</idDest><cMunFG>1506807</cMunFG><tpImp>1</tpImp><tpEmis>1</tpEmis><cDV>4</cDV><tpAmb>1</tpAmb><finNFe>1</finNFe><indFinal>1</indFinal><indPres>1</indPres><procEmi>0</procEmi><verProc>9.3.19.0</verProc></ide><emit><CNPJ>99999999000199</CNPJ><xNome>Empresa Teste</xNome><xFant>Empresa Teste</xFant><enderEmit><xLgr>AVENIDA TESTE</xLgr><nro>99</nro><xCpl>SALA 1</xCpl><xBairro>JUTAI</xBairro><cMun>1506807</cMun><xMun>Santarem</xMun><UF>PA</UF><CEP>68045000</CEP><cPais>1058</cPais><xPais>Brasil</xPais><fone>9999999999</fone></enderEmit><IE>999999999</IE><CRT>1</CRT></emit><dest><CNPJ>99999999000199</CNPJ><xNome>Empresa Teste 2</xNome><enderDest><xLgr>RUA TESTE</xLgr><nro>SN</nro><xCpl>ROD SANTAREM CU</xCpl><xBairro>URUMARI</xBairro><cMun>1506807</cMun><xMun>SANTAREM</xMun><UF>PA</UF><CEP>68045000</CEP><cPais>1058</cPais><xPais>BRASIL</xPais><fone>93991548631</fone></enderDest><indIEDest>1</indIEDest><IE>152303065</IE></dest><det nItem="1"><prod><cProd>15408</cProd><cEAN>SEM GTIN</cEAN><xProd>CARRO DE MAO MET C RASA 50L *AZUL* TRAMONTINA</xProd><NCM>87168000</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>2.0000</qCom><vUnCom>140.0000</vUnCom><vProd>280.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>2.0000</qTrib><vUnTrib>140.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>41.41</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="2"><prod><cProd>15373</cProd><cEAN>SEM GTIN</cEAN><xProd>CONSTRUFLEX CONDUITE LARANJA EXTRA ANTICH 3/4</xProd><NCM>85444900</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>50.0000</qCom><vUnCom>1.9500</vUnCom><vProd>97.50</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>50.0000</qTrib><vUnTrib>1.9500</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>29.69</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="3"><prod><cProd>15423</cProd><cEAN>SEM GTIN</cEAN><xProd>COLUNA 7X14 6M GSP</xProd><NCM>73142000</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>12.0000</qCom><vUnCom>48.0000</vUnCom><vProd>576.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>12.0000</qTrib><vUnTrib>48.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>196.59</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="4"><prod><cProd>1176</cProd><cEAN>SEM GTIN</cEAN><xProd>CURVA ESG. CURTA 100MMX90 KRONA</xProd><NCM>39174090</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>5.0000</qCom><vUnCom>14.5000</vUnCom><vProd>72.50</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>5.0000</qTrib><vUnTrib>14.5000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>15.36</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="5"><prod><cProd>15371</cProd><cEAN>SEM GTIN</cEAN><xProd>CONSTRUFLEX CONDUITE AMARELO ANTICHAMA 3/4 50MT</xProd><NCM>85444900</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>100.0000</qCom><vUnCom>1.7500</vUnCom><vProd>175.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>100.0000</qTrib><vUnTrib>1.7500</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>53.29</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="6"><prod><cProd>1244</cProd><cEAN>SEM GTIN</cEAN><xProd>DOBRAD.ZINC.850X3&amp;amp;quot; CART.C/3(SILVANA)</xProd><NCM>83021000</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>20.0000</qCom><vUnCom>8.9000</vUnCom><vProd>178.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>20.0000</qTrib><vUnTrib>8.9000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>54.20</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="7"><prod><cProd>15447</cProd><cEAN>SEM GTIN</cEAN><xProd>PEDRA MARMORE SINTETICO  1.06 CINZA</xProd><NCM>68109900</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>1.0000</qCom><vUnCom>130.0000</vUnCom><vProd>130.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>1.0000</qTrib><vUnTrib>130.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>39.58</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="8"><prod><cProd>15443</cProd><cEAN>SEM GTIN</cEAN><xProd>PEDRA MARMORE SINTETICO 1.26 PRETO</xProd><NCM>68109900</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>2.0000</qCom><vUnCom>149.0000</vUnCom><vProd>298.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>2.0000</qTrib><vUnTrib>149.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>90.74</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="9"><prod><cProd>15419</cProd><cEAN>SEM GTIN</cEAN><xProd>INTERRUP. 1 TEC+TOM 2P+T 4X2PRETO(PLUZIE)(N.P)C/25</xProd><NCM>85365090</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>20.0000</qCom><vUnCom>6.8000</vUnCom><vProd>136.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>20.0000</qTrib><vUnTrib>6.8000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>33.84</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="10"><prod><cProd>1190</cProd><cEAN>7898495988908</cEAN><xProd>LONA POLIET AZUL 3X2M BRASFORT</xProd><NCM>39263000</NCM><CEST>0100500</CEST><CFOP>5102</CFOP><uCom>M</uCom><qCom>5.0000</qCom><vUnCom>38.0000</vUnCom><vProd>190.00</vProd><cEANTrib>7898495988908</cEANTrib><uTrib>M</uTrib><qTrib>5.0000</qTrib><vUnTrib>38.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>42.83</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="11"><prod><cProd>15409</cProd><cEAN>SEM GTIN</cEAN><xProd>CAVADEIRA ARTICULADA C/CB LIGHT(TRAMONT</xProd><NCM>82019000</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>1.0000</qCom><vUnCom>85.0000</vUnCom><vProd>85.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>1.0000</qTrib><vUnTrib>85.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>16.19</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="12"><prod><cProd>15402</cProd><cEAN>SEM GTIN</cEAN><xProd>Piso 33x57 57150 VG - Extra</xProd><NCM>69072200</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>70.0000</qCom><vUnCom>23.0000</vUnCom><vProd>1610.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>70.0000</qTrib><vUnTrib>23.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>490.24</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="13"><prod><cProd>15395</cProd><cEAN>SEM GTIN</cEAN><xProd>Piso 62x62 HD 62106 VG - Extra</xProd><NCM>69072200</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>50.0000</qCom><vUnCom>23.0000</vUnCom><vProd>1150.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>50.0000</qTrib><vUnTrib>23.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>350.18</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="14"><prod><cProd>15394</cProd><cEAN>SEM GTIN</cEAN><xProd>Piso 62x62 62100 VG - Extra</xProd><NCM>69072200</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>38.0000</qCom><vUnCom>23.0000</vUnCom><vProd>874.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>38.0000</qTrib><vUnTrib>23.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>266.13</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="15"><prod><cProd>15401</cProd><cEAN>SEM GTIN</cEAN><xProd>Piso 33x57 HD 57322 VG - Extra</xProd><NCM>69072200</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>80.0000</qCom><vUnCom>23.0000</vUnCom><vProd>1840.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>80.0000</qTrib><vUnTrib>23.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>560.28</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="16"><prod><cProd>15403</cProd><cEAN>SEM GTIN</cEAN><xProd>Piso 33x57 57143 VG - Extra</xProd><NCM>69072200</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>40.0000</qCom><vUnCom>23.0000</vUnCom><vProd>920.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>40.0000</qTrib><vUnTrib>23.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>280.14</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="17"><prod><cProd>15388</cProd><cEAN>SEM GTIN</cEAN><xProd>PIA ACO INOX 304 BA 180X55 2CC PERF</xProd><NCM>73241000</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>1.0000</qCom><vUnCom>720.0000</vUnCom><vProd>720.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>1.0000</qTrib><vUnTrib>720.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>219.24</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="18"><prod><cProd>15433</cProd><cEAN>SEM GTIN</cEAN><xProd>TANQUE TRIPLO 1.40 PRETO</xProd><NCM>68109900</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>1.0000</qCom><vUnCom>165.0000</vUnCom><vProd>165.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>1.0000</qTrib><vUnTrib>165.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>50.24</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="19"><prod><cProd>15433</cProd><cEAN>SEM GTIN</cEAN><xProd>TANQUE TRIPLO 1.40 PRETO</xProd><NCM>68109900</NCM><CEST /><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>1.0000</qCom><vUnCom>345.0000</vUnCom><vProd>345.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>1.0000</qTrib><vUnTrib>345.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>105.05</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="20"><prod><cProd>15404</cProd><cEAN>SEM GTIN</cEAN><xProd>PORCELANATO B 120011</xProd><NCM>69072100</NCM><CEST /><CFOP>5102</CFOP><uCom>M</uCom><qCom>40.0000</qCom><vUnCom>62.0000</vUnCom><vProd>2480.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>M</uTrib><qTrib>40.0000</qTrib><vUnTrib>62.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>755.16</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="21"><prod><cProd>1094</cProd><cEAN>SEM GTIN</cEAN><xProd>CIMENTO TODAS OBRAS - POTY</xProd><NCM>25232910</NCM><CEST>0500100</CEST><CFOP>5405</CFOP><uCom>UNID</uCom><qCom>150.0000</qCom><vUnCom>27.0000</vUnCom><vProd>4050.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>150.0000</qTrib><vUnTrib>27.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>170.10</vTotTrib><ICMS><ICMSSN500><orig>0</orig><CSOSN>500</CSOSN><vBCSTRet>4050.00</vBCSTRet><pST>0.00</pST><vICMSSTRet>0.00</vICMSSTRet></ICMSSN500></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><det nItem="22"><prod><cProd>1202</cProd><cEAN>SEM GTIN</cEAN><xProd>ARGAMASSA AC3 15 KG</xProd><NCM>38245000</NCM><CEST>1000200</CEST><CFOP>5102</CFOP><uCom>UNID</uCom><qCom>20.0000</qCom><vUnCom>31.0000</vUnCom><vProd>620.00</vProd><cEANTrib>SEM GTIN</cEANTrib><uTrib>UNID</uTrib><qTrib>20.0000</qTrib><vUnTrib>31.0000</vUnTrib><indTot>1</indTot></prod><imposto><vTotTrib>83.39</vTotTrib><ICMS><ICMSSN102><orig>0</orig><CSOSN>102</CSOSN></ICMSSN102></ICMS><PIS><PISOutr><CST>49</CST><vBC>0.00</vBC><pPIS>0.00</pPIS><vPIS>0.00</vPIS></PISOutr></PIS><COFINS><COFINSOutr><CST>49</CST><vBC>0.00</vBC><pCOFINS>0.00</pCOFINS><vCOFINS>0.00</vCOFINS></COFINSOutr></COFINS></imposto><infAdProd>Fonte da Carga Tributaria: IBPT</infAdProd></det><total><ICMSTot><vBC>0.00</vBC><vICMS>0.00</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>16992.00</vProd><vFrete>0.00</vFrete><vSeg>0.00</vSeg><vDesc>0.00</vDesc><vII>0.00</vII><vIPI>0.00</vIPI><vIPIDevol>0.00</vIPIDevol><vPIS>0.00</vPIS><vCOFINS>0.00</vCOFINS><vOutro>0.00</vOutro><vNF>16992.00</vNF><vTotTrib>3943.87</vTotTrib></ICMSTot></total><transp><modFrete>9</modFrete></transp><pag><detPag><indPag>0</indPag><tPag>01</tPag><vPag>16992.00</vPag></detPag></pag></infNFe><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI="#NFe15180930589588000121550010000000201000001864"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>/Tn1IhxXCcPq7MjysIaBS0J23Kg=</DigestValue></Reference></SignedInfo><SignatureValue>cQDqsIJbvjUYEqpEm+OJtt1maeUXb3PgtS5+nEpLMJLY8rd79fF57/yQ7Ac2FFu9KmbtpATyIKmDmx5kjsQR615Mn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VR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMIG7BggrBgEFBQcBAQSBrjCBqzBmBggrBgEFBQcwAoZaaHR0cDovL2ljcC1icmFzaWwuYWNmZW5hY29uLmNvbS5ici9yZXBvc2l0b3Jpby9jZXJ0aWZpY2Fkb3MvQUNfSW5zdGl0dXRvX0ZlbmFjb25fUkZCRzMucDdjMEEGCCsGAQUFBzABhjVodHRwOi8vb2NzcC1hYy1pbnN0aXR1dG8tZmVuYWNvbi1yZmIuY2VydGlzaWduLmNvbS5icjANBgkqhkiG9w0BAQsFAAOCAgEAm9DZNpPs1j4zc/nN4pKaUb6qLszSmCaGAT5tbSYNrQfSq295Pi1OoRzcDFKDweDlbpQTuO6GGnofwtK5utxPlsiF8CSDlKH70yCfQzaXRAEkPEMxm7AQLuXZnW5ml7kOneAV2r6o9XUEWsQRktifwhjY0xSDj63/Vm/0Um82XwxLRS+pLZovhFtOyPzeL4bRnOWd9jQoMOfxa/cD65ByvVTzciOitFIFE+yuNT/HmI2vAAE5tGYIjons12a2h+Yhc3SYm94OccwF4+5bEmCk2QCr7lOhnoKSKK/o4fBkhFzrrchQT4aaoEyG2PdhsmoFkdbQ4RCFdqIurM/qmmvjmGrij4xFy1IEvGDoVBMe4/l+57OFGnn0k5fYv92H4DNsymnSKO68ok9FtNz8pGXeXQJ/DkEFdumAOYjXQgct3B9HN9kyxNbN2dJRGKMoa2ByuuVysSypZgyevSionHlCiFaZgzgYB9dNpKoeP85bdP+to+kRA8Yqu2JDj1Pp+Vp61f/TuSeiRBEEg4jzlTEkk2yiA9N5ZtCJv67YfMfeWvHU9Nm159zzQMCnWcJRSrScF2pHtlN9Uobg/jbvJ4xFxTq16YrRDab9rJ8xk24D6KfXcdkXjJV4/XSvpXmJvY6qH/nyvyxCHoby0tBeaXP0gMTpz8foEMCmOGzEBlvtw7s=</X509Certificate></X509Data></KeyInfo></Signature></NFe>

Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.