Skip to content

Commit

Permalink
Merge pull request #2 from JJConsulting/aviso-cancelamento
Browse files Browse the repository at this point in the history
Aviso Nfe Cancelada
  • Loading branch information
LucioPelinson committed Mar 25, 2024
2 parents 35b8798 + 67f993e commit dff4f6a
Show file tree
Hide file tree
Showing 6 changed files with 365 additions and 6 deletions.
55 changes: 50 additions & 5 deletions DanfeNet.Tests/DanfeNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,63 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1"/>
<PackageReference Include="MSTest.TestFramework" Version="3.1.1"/>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting"/>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DanfeNet\DanfeNet.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="Logos\JPG\Horizontal.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Logos\JPG\Quadrado.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Logos\JPG\Vertical.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Logos\PDF\Horizontal.pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Logos\PDF\Quadrado.pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Logos\PDF\Vertical.pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v1.00\v1.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v2.00\v2_Retrato.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v3.10\v3.10_Retrato.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v4.00\v4_Cancelada.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v4.00\v4_ComLocalEntrega.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v4.00\v4_ComLocalRetirada.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v4.00\v4_Default.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Xml\NFe\v4.00\v4_SKUSize.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
3 changes: 3 additions & 0 deletions DanfeNet.Tests/DanfeXmlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ public void TestXml(string xmlPath)

[TestMethod]
public void v4_SKUSize() => TestXml("v4.00/v4_SKUSize.xml");

[TestMethod]
public void v4_Cancelada() => TestXml("v4.00/v4_Cancelada.xml");

}
288 changes: 288 additions & 0 deletions DanfeNet.Tests/Xml/NFe/v4.00/v4_Cancelada.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
<nfeProc versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe">
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
<infNFe Id="NFe35110264542918000145553392048039911837511733" versao="4.00">
<ide>
<cUF>32</cUF>
<cNF>11105904</cNF>
<natOp>VENDA / LICENCA DE USO /</natOp>
<mod>55</mod>
<serie>339</serie>
<nNF>204803991</nNF>
<dhEmi>2018-09-11T10:59:04-03:00</dhEmi>
<dhSaiEnt>2018-09-11T10:59:04-03:00</dhSaiEnt>
<tpNF>1</tpNF>
<idDest>2</idDest>
<cMunFG>3550308</cMunFG>
<tpImp>1</tpImp>
<tpEmis>1</tpEmis>
<cDV>5</cDV>
<tpAmb>1</tpAmb>
<finNFe>1</finNFe>
<indFinal>1</indFinal>
<indPres>9</indPres>
<procEmi>0</procEmi>
<verProc>1</verProc>
</ide>
<emit>
<CNPJ>64542918000145</CNPJ>
<xNome>Cyberdyne Systems Corp.</xNome>
<xFant>Cyberdyne</xFant>
<enderEmit>
<xLgr>Rua Deputado Carlos Correia</xLgr>
<nro>307</nro>
<xCpl>Glp:2 EUV:Sala:12CIVIT II</xCpl>
<xBairro>Siqueira Campos</xBairro>
<cMun>3550308</cMun>
<xMun>SERRA</xMun>
<UF>ES</UF>
<CEP>49075976</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
<fone>0112345678</fone>
</enderEmit>
<IE>270913586892</IE>
<IEST>270913586892</IEST>
<IM>4.11111-7</IM>
<CNAE>4742300</CNAE>
<CRT>3</CRT>
</emit>
<dest>
<CNPJ>22257735000138</CNPJ>
<xNome>Umbrella Corp</xNome>
<enderDest>
<xLgr>Rua João Augusto Morais</xLgr>
<nro>S/N</nro>
<xBairro>7 DISTRITO</xBairro>
<cMun>3550308</cMun>
<xMun>São Paulo</xMun>
<UF>SP</UF>
<CEP>08010150</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
</enderDest>
<indIEDest>1</indIEDest>
<IE>361499373647</IE>
</dest>
<retirada>
<CNPJ>22257735000138</CNPJ>
<xNome>Oceanic Airlines</xNome>
<xLgr>End Entrega</xLgr>
<nro>N Entrega</nro>
<xBairro>5 DISTRITO</xBairro>
<cMun>3550308</cMun>
<xMun>São Paulo</xMun>
<UF>SP</UF>
<CEP>08010150</CEP>
<fone>1012345678</fone>
<IE>361499373647</IE>
</retirada>
<det nItem="1">
<prod>
<cProd>LC</cProd>
<cEAN>889842132892</cEAN>
<xProd>PN:T5D-02932 -- SOFTWARE A</xProd>
<NCM>49111090</NCM>
<CEST>0000000</CEST>
<indEscala>S</indEscala>
<CFOP>6102</CFOP>
<uCom>un</uCom>
<qCom>1.0000</qCom>
<vUnCom>10.82</vUnCom>
<vProd>10.82</vProd>
<cEANTrib>0889842132892</cEANTrib>
<uTrib>un</uTrib>
<qTrib>1.0000</qTrib>
<vUnTrib>10.82</vUnTrib>
<indTot>1</indTot>
<xPed>10775</xPed>
<nItemPed>0</nItemPed>
</prod>
<imposto>
<ICMS>
<ICMS00>
<orig>4</orig>
<CST>00</CST>
<modBC>3</modBC>
<vBC>10.82</vBC>
<pICMS>12.00</pICMS>
<vICMS>1.30</vICMS>
</ICMS00>
</ICMS>
<PIS>
<PISAliq>
<CST>01</CST>
<vBC>10.82</vBC>
<pPIS>1.65</pPIS>
<vPIS>0.18</vPIS>
</PISAliq>
</PIS>
<COFINS>
<COFINSAliq>
<CST>01</CST>
<vBC>10.82</vBC>
<pCOFINS>7.60</pCOFINS>
<vCOFINS>0.82</vCOFINS>
</COFINSAliq>
</COFINS>
</imposto>
</det>
<det nItem="2">
<prod>
<cProd>LCOM144514B</cProd>
<cEAN>SEM GTIN</cEAN>
<xProd>PN:T5D-02932LIC -- SOFTWARE B</xProd>
<NCM>00</NCM>
<CEST>0000000</CEST>
<indEscala>S</indEscala>
<CFOP>6933</CFOP>
<uCom>un</uCom>
<qCom>1.0000</qCom>
<vUnCom>936.18</vUnCom>
<vProd>936.18</vProd>
<cEANTrib>SEM GTIN</cEANTrib>
<uTrib>un</uTrib>
<qTrib>1.0000</qTrib>
<vUnTrib>936.18</vUnTrib>
<indTot>1</indTot>
<xPed>10775</xPed>
<nItemPed>0</nItemPed>
</prod>
<imposto>
<ISSQN>
<vBC>936.18</vBC>
<vAliq>3.00</vAliq>
<vISSQN>28.09</vISSQN>
<cMunFG>3550308</cMunFG>
<cListServ>01.05</cListServ>
<indISS>1</indISS>
<indIncentivo>2</indIncentivo>
</ISSQN>
<PIS>
<PISAliq>
<CST>01</CST>
<vBC>936.18</vBC>
<pPIS>1.65</pPIS>
<vPIS>15.45</vPIS>
</PISAliq>
</PIS>
<COFINS>
<COFINSAliq>
<CST>01</CST>
<vBC>936.18</vBC>
<pCOFINS>7.60</pCOFINS>
<vCOFINS>71.15</vCOFINS>
</COFINSAliq>
</COFINS>
</imposto>
</det>
<total>
<ICMSTot>
<vBC>3040.82</vBC>
<vICMS>360.05</vICMS>
<vICMSDeson>0.00</vICMSDeson>
<vICMSUFDest>0.00</vICMSUFDest>
<vICMSUFRemet>0.00</vICMSUFRemet>
<vFCP>0</vFCP>
<vBCST>0.00</vBCST>
<vST>0.00</vST>
<vFCPST>0</vFCPST>
<vFCPSTRet>0</vFCPSTRet>
<vProd>3040.82</vProd>
<vFrete>0.00</vFrete>
<vSeg>0.00</vSeg>
<vDesc>0.00</vDesc>
<vII>0.00</vII>
<vIPI>0.00</vIPI>
<vIPIDevol>0</vIPIDevol>
<vPIS>50.17</vPIS>
<vCOFINS>231.10</vCOFINS>
<vOutro>0.00</vOutro>
<vNF>3977.00</vNF>
<vTotTrib>0.00</vTotTrib>
</ICMSTot>
<ISSQNtot>
<vServ>936.18</vServ>
<vBC>936.18</vBC>
<vISS>28.09</vISS>
<vPIS>15.45</vPIS>
<vCOFINS>71.15</vCOFINS>
<dCompet>2018-10-11</dCompet>
</ISSQNtot>
</total>
<transp>
<modFrete>0</modFrete>
<transporta>
<CNPJ>23451995000102</CNPJ>
<xNome>Oceanic Airlines</xNome>
<IE>678084138533</IE>
<xEnder>Estrada do Acampamento, 773</xEnder>
<xMun>São Bernardo do Campo</xMun>
<UF>SP</UF>
</transporta>
<vol>
<qVol>2</qVol>
<pesoL>2.380</pesoL>
<pesoB>3.000</pesoB>
</vol>
</transp>
<cobr>
<fat>
<nFat>800178201</nFat>
<vOrig>3977.00</vOrig>
<vDesc>0.00</vDesc>
<vLiq>3977.00</vLiq>
</fat>
<dup>
<nDup>001</nDup>
<dVenc>2018-10-11</dVenc>
<vDup>3977.00</vDup>
</dup>
</cobr>
<pag>
<detPag>
<tPag>99</tPag>
<vPag>3977.00</vPag>
<card>
<tpIntegra>2</tpIntegra>
</card>
</detPag>
<vTroco>0.00</vTroco>
</pag>
<infAdic>
<infCpl>Praca para Pagamento: Sao Paulo - SP</infCpl>
</infAdic>
</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="#NFe35110264542918000145553392048039911837511733">
<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>RGFuZmVTaGFycA==</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>RGFuZmVTaGFycA==</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>RGFuZmVTaGFycA==</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</NFe>
<protNFe versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe">
<infProt>
<tpAmb>1</tpAmb>
<verAplic>SVRS201809031520</verAplic>
<chNFe>35110264542918000145553392048039911837511733</chNFe>
<dhRecbto>2018-09-11T10:59:21-03:00</dhRecbto>
<nProt>332181142495375</nProt>
<digVal>RGFuZmVTaGFycA==</digVal>
<cStat>101</cStat>
<xMotivo>Cancelada NF-e Teste</xMotivo>
</infProt>
</protNFe>
</nfeProc>
1 change: 0 additions & 1 deletion DanfeNet/DanfeNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<ItemGroup>
<PackageReference Include="PdfClown.NetStandard" Version="0.2.0-beta" />
<PackageReference Include="QRCoder" Version="1.4.3" />
<InternalsVisible Include="DanfeNet.Tests" />
</ItemGroup>

</Project>
Loading

0 comments on commit dff4f6a

Please sign in to comment.