Browse Source

Merge branch 'master' into master

pull/268/head
Isabela Morais 6 years ago
committed by GitHub
parent
commit
d7dd538eff
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 118
      README.md
  2. 154
      pytrustnfe/nfe/templates/NfeAutorizacao.xml
  3. 7
      requirements.txt
  4. 7
      setup.py

118
README.md

@ -2,7 +2,6 @@
Biblioteca Python que tem por objetivo enviar NFe, NFCe e NFSe no Brasil Biblioteca Python que tem por objetivo enviar NFe, NFCe e NFSe no Brasil
[![Coverage Status](https://coveralls.io/repos/danimaribeiro/PyTrustNFe/badge.svg?branch=master)](https://coveralls.io/r/danimaribeiro/PyTrustNFe?branch=master) [![Coverage Status](https://coveralls.io/repos/danimaribeiro/PyTrustNFe/badge.svg?branch=master)](https://coveralls.io/r/danimaribeiro/PyTrustNFe?branch=master)
[![Code Health](https://landscape.io/github/danimaribeiro/PyTrustNFe/master/landscape.svg?style=flat)](https://landscape.io/github/danimaribeiro/PyTrustNFe/master)
[![Build Status](https://travis-ci.org/danimaribeiro/PyTrustNFe.svg?branch=master)](https://travis-ci.org/danimaribeiro/PyTrustNFe) [![Build Status](https://travis-ci.org/danimaribeiro/PyTrustNFe.svg?branch=master)](https://travis-ci.org/danimaribeiro/PyTrustNFe)
[![PyPI version](https://badge.fury.io/py/PyTrustNFe.svg)](https://badge.fury.io/py/PyTrustNFe) [![PyPI version](https://badge.fury.io/py/PyTrustNFe.svg)](https://badge.fury.io/py/PyTrustNFe)
@ -10,28 +9,28 @@ Dependências:
* PyXmlSec * PyXmlSec
* lxml * lxml
* signxml * signxml
* suds
* suds_requests
* suds-jurko
* suds-jurko-requests
* reportlab * reportlab
* Jinja2 * Jinja2
NFSe - Cidades atendidas NFSe - Cidades atendidas
--------------
* [Ariss](cidades/ariss.md) - 4 cidades atendidas
-----------------------------
* **Paulistana** - São Paulo/SP
* **Nota Carioca** - Rio de Janeiro/RJ
* **Imperial** - Petrópolis/RH
* [Susesu](cidades/susesu.md) - 3 cidades atendidas
* [Simpliss](cidades/simpliss.md) - 18 cidade atendidas * [Simpliss](cidades/simpliss.md) - 18 cidade atendidas
* [GINFES](cidaes/ginfes.md) - 79 cidades atendidas
* [DSF](cidades/dsf.md) - 7 cidades atendidas
Roadmap Roadmap
-------------- --------------
Teste unitários Teste unitários
Emissão de NFCe
Compatibilidade [python 2 e 3](https://github.com/danimaribeiro/PyTrustNFe/pull/6)
Implementar novos provedores de NFSe Implementar novos provedores de NFSe
* [Betha](cidades/betha.md) - 81 cidades atendidas WIP * [Betha](cidades/betha.md) - 81 cidades atendidas WIP
* [GINFES](cidades/ginfes.md) - 79 cidades atendidas
* [WebISS](cidades/webiss.md) - 51 cidades atendidas * [WebISS](cidades/webiss.md) - 51 cidades atendidas
* [ISSIntel](cidades/issintel.md) - 32 cidades atendidas * [ISSIntel](cidades/issintel.md) - 32 cidades atendidas
* [ISSNET](cidades/issnet.md) - 32 cidades atendidas * [ISSNET](cidades/issnet.md) - 32 cidades atendidas
@ -39,7 +38,7 @@ Implementar novos provedores de NFSe
Exemplos de uso da NFe Exemplos de uso da NFe
---------------
-----------------------------
Consulta Cadastro por CNPJ: Consulta Cadastro por CNPJ:
@ -52,7 +51,102 @@ certificado = Certificado(certificado, 'senha_pfx')
obj = {'cnpj': '12345678901234', 'estado': '42'} obj = {'cnpj': '12345678901234', 'estado': '42'}
resposta = consulta_cadastro(certificado, obj=obj, ambiente=1, estado='42') resposta = consulta_cadastro(certificado, obj=obj, ambiente=1, estado='42')
``` ```
Consulta Distribuição NF-e sem Validação de Esquema:
```python
from pytrustnfe.certificado import Certificado
from pytrustnfe.nfe import consulta_distribuicao_nfe, xml_consulta_distribuicao_nfe
certificado = open("/path/certificado.pfx", "r").read()
certificado = Certificado(certificado, 'senha_pfx')
# Gerando xml e enviado consulta por Ultimo NSU
response1 = consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
modelo='55',
cnpj_cpf='12345678901234',
ultimo_nsu='123456789101213'
)
# Gerando xml e enviado consulta por Chave
response2 = consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
modelo='55',
cnpj_cpf='12345678901234',
chave_nfe='012345678901234567890123456789012345678912'
)
# Gerando xml e enviado consulta por NSU
response3 = consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
modelo='55',
cnpj_cpf='12345678901234',
nsu='123456789101213'
)
```
Consulta Distribuição NF-e com Validação de Esquema:
```python
from pytrustnfe.certificado import Certificado
from pytrustnfe.nfe import consulta_distribuicao_nfe, xml_consulta_distribuicao_nfe
from pytrustnfe.xml.validate import valida_nfe, SCHEMA_DFE
certificado = open("/path/certificado.pfx", "r").read()
certificado = Certificado(certificado, 'senha_pfx')
# Gerando XML para Consulta por Ultimo NSU
xml1 = xml_consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
cnpj_cpf='12345678901234',
ultimo_nsu='123456789101213'
)
# Validando o XML com Esquema
if valida_nfe(xml1, SCHEMA_DFE):
Warning("Erro na validação do esquema")
# Gerando XML para Consulta por Chave
xml2 = xml_consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
cnpj_cpf='12345678901234',
chave_nfe='012345678901234567890123456789012345678912'
)
# Validando o XML com Esquema
if valida_nfe(xml2, SCHEMA_DFE):
Warning("Erro na validação do esquema")
# Gerando XML para Consulta por NSU
xml3 = xml_consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
cnpj_cpf='12345678901234',
nsu='123456789101213'
)
# Validando o XML com Esquema
if valida_nfe(xml3, SCHEMA_DFE):
Warning("Erro na validação do esquema")
# Enviando xml de consulta para sefaz
response = consulta_distribuicao_nfe(
certificado,
ambiente=1,
estado='42',
modelo='55',
xml=xml1
)
```
Exemplo de uso da NFSe Paulistana Exemplo de uso da NFSe Paulistana
--------------------------------- ---------------------------------

154
pytrustnfe/nfe/templates/NfeAutorizacao.xml

@ -116,6 +116,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
<xNome>{{ dest.xNome|normalize|escape }}</xNome> <xNome>{{ dest.xNome|normalize|escape }}</xNome>
{% if dest.enderDest is defined %}
<enderDest> <enderDest>
<xLgr>{{ dest.enderDest.xLgr|normalize|escape }}</xLgr> <xLgr>{{ dest.enderDest.xLgr|normalize|escape }}</xLgr>
<nro>{{ dest.enderDest.nro }}</nro> <nro>{{ dest.enderDest.nro }}</nro>
@ -129,6 +130,7 @@
<xPais>{{ dest.enderDest.xPais }}</xPais> <xPais>{{ dest.enderDest.xPais }}</xPais>
<fone>{{ dest.enderDest.fone }}</fone> <fone>{{ dest.enderDest.fone }}</fone>
</enderDest> </enderDest>
{% endif %}
<indIEDest>{{ dest.indIEDest }}</indIEDest> <indIEDest>{{ dest.indIEDest }}</indIEDest>
{% if dest.IE != '' -%}<IE>{{ dest.IE }}</IE>{% endif %} {% if dest.IE != '' -%}<IE>{{ dest.IE }}</IE>{% endif %}
<ISUF>{{ dest.ISUF }}</ISUF> <ISUF>{{ dest.ISUF }}</ISUF>
@ -141,6 +143,7 @@
<retirada> <retirada>
<CNPJ>{{ NFe.infNFe.retirada.CNPJ }}</CNPJ> <CNPJ>{{ NFe.infNFe.retirada.CNPJ }}</CNPJ>
<CPF>{{ NFe.infNFe.retirada.CPF }}</CPF> <CPF>{{ NFe.infNFe.retirada.CPF }}</CPF>
<xNome>{{ NFe.infNFe.retirada.xNome|normalize|escape }}</xNome>
<xLgr>{{ NFe.infNFe.retirada.xLgr|normalize|escape }}</xLgr> <xLgr>{{ NFe.infNFe.retirada.xLgr|normalize|escape }}</xLgr>
<nro>{{ NFe.infNFe.retirada.nro }}</nro> <nro>{{ NFe.infNFe.retirada.nro }}</nro>
<xCpl>{{ NFe.infNFe.retirada.xCpl|normalize|escape }}</xCpl> <xCpl>{{ NFe.infNFe.retirada.xCpl|normalize|escape }}</xCpl>
@ -148,12 +151,19 @@
<cMun>{{ NFe.infNFe.retirada.cMun }}</cMun> <cMun>{{ NFe.infNFe.retirada.cMun }}</cMun>
<xMun>{{ NFe.infNFe.retirada.xMun|normalize }}</xMun> <xMun>{{ NFe.infNFe.retirada.xMun|normalize }}</xMun>
<UF>{{ NFe.infNFe.retirada.UF }}</UF> <UF>{{ NFe.infNFe.retirada.UF }}</UF>
<CEP>{{ NFe.infNFe.retirada.CEP }}</CEP>
<cPais>{{ NFe.infNFe.retirada.cPais }}</cPais>
<xPais>{{ NFe.infNFe.retirada.xPais|normalize|escape }}</xPais>
<fone>{{ NFe.infNFe.retirada.fone }}</fone>
<email>{{ NFe.infNFe.retirada.email }}</email>
<IE>{{ NFe.infNFe.retirada.IE }}</IE>
</retirada> </retirada>
{% endif %} {% endif %}
{% if NFe.infNFe.entrega is defined %} {% if NFe.infNFe.entrega is defined %}
<entrega> <entrega>
<CNPJ>{{ NFe.infNFe.entrega.CNPJ }}</CNPJ> <CNPJ>{{ NFe.infNFe.entrega.CNPJ }}</CNPJ>
<CPF>{{ NFe.infNFe.entrega.CPF }}</CPF> <CPF>{{ NFe.infNFe.entrega.CPF }}</CPF>
<xNome>{{ NFe.infNFe.entrega.xNome|normalize|escape }}</xNome>
<xLgr>{{ NFe.infNFe.entrega.xLgr|normalize|escape }}</xLgr> <xLgr>{{ NFe.infNFe.entrega.xLgr|normalize|escape }}</xLgr>
<nro>{{ NFe.infNFe.entrega.nro }}</nro> <nro>{{ NFe.infNFe.entrega.nro }}</nro>
<xCpl>{{ NFe.infNFe.entrega.xCpl|normalize|escape }}</xCpl> <xCpl>{{ NFe.infNFe.entrega.xCpl|normalize|escape }}</xCpl>
@ -161,6 +171,12 @@
<cMun>{{ NFe.infNFe.entrega.cMun }}</cMun> <cMun>{{ NFe.infNFe.entrega.cMun }}</cMun>
<xMun>{{ NFe.infNFe.entrega.xMun }}</xMun> <xMun>{{ NFe.infNFe.entrega.xMun }}</xMun>
<UF>{{ NFe.infNFe.entrega.UF }}</UF> <UF>{{ NFe.infNFe.entrega.UF }}</UF>
<CEP>{{ NFe.infNFe.entrega.CEP }}</CEP>
<cPais>{{ NFe.infNFe.entrega.cPais }}</cPais>
<xPais>{{ NFe.infNFe.entrega.xPais|normalize|escape }}</xPais>
<fone>{{ NFe.infNFe.entrega.fone }}</fone>
<email>{{ NFe.infNFe.entrega.email }}</email>
<IE>{{ NFe.infNFe.entrega.IE }}</IE>
</entrega> </entrega>
{% endif %} {% endif %}
{% if NFe.infNFe.autXML %} {% if NFe.infNFe.autXML %}
@ -243,7 +259,9 @@
</detExport> </detExport>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<xPed>{{ prod.xPed }}</xPed>
{% if NFe.infNFe.compra is defined %}
<xPed>{{ NFe.infNFe.compra.xPed }}</xPed>
{% endif %}
<nItemPed>{{ prod.nItemPed }}</nItemPed> <nItemPed>{{ prod.nItemPed }}</nItemPed>
<nFCI>{{ prod.nFCI }}</nFCI> <nFCI>{{ prod.nFCI }}</nFCI>
{% for rastro in prod.rastro %} {% for rastro in prod.rastro %}
@ -258,6 +276,7 @@
{% for med in prod.med %} {% for med in prod.med %}
<med> <med>
<cProdANVISA>{{ med.cProdANVISA }}</cProdANVISA> <cProdANVISA>{{ med.cProdANVISA }}</cProdANVISA>
<xMotivoIsencao>{{ med.xMotivoIsencao }}</xMotivoIsencao>
<vPMC>{{ med.vPMC }}</vPMC> <vPMC>{{ med.vPMC }}</vPMC>
</med> </med>
{% endfor %} {% endfor %}
@ -266,6 +285,7 @@
<imposto> <imposto>
{% with imposto = det.imposto %} {% with imposto = det.imposto %}
<vTotTrib>{{ imposto.vTotTrib }}</vTotTrib> <vTotTrib>{{ imposto.vTotTrib }}</vTotTrib>
{% if imposto.ICMS is defined %}
<ICMS> <ICMS>
{% if imposto.ICMS.CST == '00' -%} {% if imposto.ICMS.CST == '00' -%}
<ICMS00> <ICMS00>
@ -365,6 +385,7 @@
<CST>{{ imposto.ICMS.CST }}</CST> <CST>{{ imposto.ICMS.CST }}</CST>
<vBCSTRet>{{ imposto.ICMS.vBCSTRet }}</vBCSTRet> <vBCSTRet>{{ imposto.ICMS.vBCSTRet }}</vBCSTRet>
<pST>{{ imposto.ICMS.pST }}</pST> <pST>{{ imposto.ICMS.pST }}</pST>
<vICMSSubstituto>{{ imposto.ICMS.vICMSSubstituto }}</vICMSSubstituto>
<vICMSSTRet>{{ imposto.ICMS.vICMSSTRet }}</vICMSSTRet> <vICMSSTRet>{{ imposto.ICMS.vICMSSTRet }}</vICMSSTRet>
<vBCFCPSTRet>{{ imposto.ICMS.vBCFCPSTRet }}</vBCFCPSTRet> <vBCFCPSTRet>{{ imposto.ICMS.vBCFCPSTRet }}</vBCFCPSTRet>
<pFCPSTRet>{{ imposto.ICMS.pFCPSTRet }}</pFCPSTRet> <pFCPSTRet>{{ imposto.ICMS.pFCPSTRet }}</pFCPSTRet>
@ -443,9 +464,18 @@
<orig>{{ imposto.ICMSST.orig }}</orig> <orig>{{ imposto.ICMSST.orig }}</orig>
<CST>{{ imposto.ICMSST.CST }}</CST> <CST>{{ imposto.ICMSST.CST }}</CST>
<vBCSTRet>{{ imposto.ICMSST.vBCSTRet }}</vBCSTRet> <vBCSTRet>{{ imposto.ICMSST.vBCSTRet }}</vBCSTRet>
<pST>{{ imposto.ICMSST.pST }}</pST>
<vICMSSubstituto>{{ imposto.ICMSST.vICMSSubstituto }}</vICMSSubstituto>
<vICMSSTRet>{{ imposto.ICMSST.vICMSSTRet }}</vICMSSTRet> <vICMSSTRet>{{ imposto.ICMSST.vICMSSTRet }}</vICMSSTRet>
<vBCFCPSTRet>{{ imposto.ICMSST.vBCFCPSTRet }}</vBCFCPSTRet>
<pFCPSTRet>{{ imposto.ICMSST.pFCPSTRet }}</pFCPSTRet>
<vFCPSTRet>{{ imposto.ICMSST.vFCPSTRet }}</vFCPSTRet>
<vBCSTDest>{{ imposto.ICMSST.vBCSTDest }}</vBCSTDest> <vBCSTDest>{{ imposto.ICMSST.vBCSTDest }}</vBCSTDest>
<vICMSSTDest>{{ imposto.ICMSST.vICMSSTDest }}</vICMSSTDest> <vICMSSTDest>{{ imposto.ICMSST.vICMSSTDest }}</vICMSSTDest>
<pRedBCEfet>{{ imposto.ICMSST.pRedBCEfet }}</pRedBCEfet>
<vBCEfet>{{ imposto.ICMSST.vBCEfet }}</vBCEfet>
<pICMSEfet>{{ imposto.ICMSST.pICMSEfet }}</pICMSEfet>
<vICMSEfet>{{ imposto.ICMSST.vICMSEfet }}</vICMSEfet>
</ICMSST> </ICMSST>
{% endif %} {% endif %}
{% if imposto.ICMS.CST == '101' -%} {% if imposto.ICMS.CST == '101' -%}
@ -500,6 +530,7 @@
<CSOSN>{{ imposto.ICMS.CST }}</CSOSN> <CSOSN>{{ imposto.ICMS.CST }}</CSOSN>
<vBCSTRet>{{ imposto.ICMS.vBCSTRet }}</vBCSTRet> <vBCSTRet>{{ imposto.ICMS.vBCSTRet }}</vBCSTRet>
<pST>{{ imposto.ICMS.pST }}</pST> <pST>{{ imposto.ICMS.pST }}</pST>
<vICMSSubstituto>{{ imposto.ICMS.vICMSSubstituto }}</vICMSSubstituto>
<vICMSSTRet>{{ imposto.ICMS.vICMSSTRet }}</vICMSSTRet> <vICMSSTRet>{{ imposto.ICMS.vICMSSTRet }}</vICMSSTRet>
<vBCFCPSTRet>{{ imposto.ICMS.vBCFCPSTRet }}</vBCFCPSTRet> <vBCFCPSTRet>{{ imposto.ICMS.vBCFCPSTRet }}</vBCFCPSTRet>
<pFCPSTRet>{{ imposto.ICMS.pFCPSTRet }}</pFCPSTRet> <pFCPSTRet>{{ imposto.ICMS.pFCPSTRet }}</pFCPSTRet>
@ -529,37 +560,58 @@
</ICMSSN900> </ICMSSN900>
{% endif %} {% endif %}
</ICMS> </ICMS>
{% if NFe.infNFe.ide.mod != '65' %}
<IPI>
<clEnq>{{ imposto.IPI.clEnq }}</clEnq>
<CNPJProd>{{ imposto.IPI.CNPJProd }}</CNPJProd>
<cSelo>{{ imposto.IPI.cSelo }}</cSelo>
<qSelo>{{ imposto.IPI.qSelo }}</qSelo>
<cEnq>{{ imposto.IPI.cEnq }}</cEnq>
{% if imposto.IPI.CST in ('00', '49', '50', '99') %}
<IPITrib>
<CST>{{ imposto.IPI.CST }}</CST>
<vBC>{{ imposto.IPI.vBC }}</vBC>
<pIPI>{{ imposto.IPI.pIPI }}</pIPI>
<qUnid>{{ imposto.IPI.qUnid }}</qUnid>
<vUnid>{{ imposto.IPI.vUnid }}</vUnid>
<vIPI>{{ imposto.IPI.vIPI }}</vIPI>
</IPITrib>
{% endif %}
{% if imposto.IPI.CST in ('01', '02', '03', '04', '51', '52', '53', '54', '55') %}
<IPINT>
<CST>{{ imposto.IPI.CST }}</CST>
</IPINT>
{% endif %}
</IPI>
{% if imposto.II is defined %}
<II>
<vBC>{{ imposto.II.vBC }}</vBC>
<vDespAdu>{{ imposto.II.vDespAdu }}</vDespAdu>
<vII>{{ imposto.II.vII }}</vII>
<vIOF>{{ imposto.II.vIOF }}</vIOF>
</II>
{% endif %} {% endif %}
{% if NFe.infNFe.ide.mod != '65' and imposto.IPI is defined %}
<IPI>
<clEnq>{{ imposto.IPI.clEnq }}</clEnq>
<CNPJProd>{{ imposto.IPI.CNPJProd }}</CNPJProd>
<cSelo>{{ imposto.IPI.cSelo }}</cSelo>
<qSelo>{{ imposto.IPI.qSelo }}</qSelo>
<cEnq>{{ imposto.IPI.cEnq }}</cEnq>
{% if imposto.IPI.CST in ('00', '49', '50', '99') %}
<IPITrib>
<CST>{{ imposto.IPI.CST }}</CST>
<vBC>{{ imposto.IPI.vBC }}</vBC>
<pIPI>{{ imposto.IPI.pIPI }}</pIPI>
<qUnid>{{ imposto.IPI.qUnid }}</qUnid>
<vUnid>{{ imposto.IPI.vUnid }}</vUnid>
<vIPI>{{ imposto.IPI.vIPI }}</vIPI>
</IPITrib>
{% endif %}
{% if imposto.IPI.CST in ('01', '02', '03', '04', '51', '52', '53', '54', '55') %}
<IPINT>
<CST>{{ imposto.IPI.CST }}</CST>
</IPINT>
{% endif %}
</IPI>
{% if imposto.II is defined %}
<II>
<vBC>{{ imposto.II.vBC }}</vBC>
<vDespAdu>{{ imposto.II.vDespAdu }}</vDespAdu>
<vII>{{ imposto.II.vII }}</vII>
<vIOF>{{ imposto.II.vIOF }}</vIOF>
</II>
{% endif %}
{% endif %}
{% if imposto.ISSQN is defined %}
<ISSQN>
<vBC>{{ imposto.ISSQN.vBC }}</vBC>
<vAliq>{{ imposto.ISSQN.vAliq }}</vAliq>
<vISSQN>{{ imposto.ISSQN.vISSQN }}</vISSQN>
<cMunFG>{{ imposto.ISSQN.cMunFG }}</cMunFG>
<cListServ>{{ imposto.ISSQN.cListServ }}</cListServ>
<vDeducao>{{ imposto.ISSQN.vDeducao }}</vDeducao>
<vOutro>{{ imposto.ISSQN.vOutro }}</vOutro>
<vDescIncond>{{ imposto.ISSQN.vDescIncond }}</vDescIncond>
<vDescCond>{{ imposto.ISSQN.vDescCond }}</vDescCond>
<vISSRet>{{ imposto.ISSQN.vDeducao }}</vISSRet>
<indISS>{{ imposto.ISSQN.indISS }}</indISS>
<cServico>{{ imposto.ISSQN.cServico }}</cServico>
<cMun>{{ imposto.ISSQN.cMun }}</cMun>
<cPais>{{ imposto.ISSQN.cPais }}</cPais>
<nProcesso>{{ imposto.ISSQN.nProcesso }}</nProcesso>
<indIncentivo>{{ imposto.ISSQN.indIncentivo }}</indIncentivo>
</ISSQN>
{% endif %} {% endif %}
<PIS> <PIS>
{% if imposto.PIS.CST in ('01', '02') %} {% if imposto.PIS.CST in ('01', '02') %}
@ -637,33 +689,13 @@
{% endif %} {% endif %}
</COFINS> </COFINS>
{% if imposto.COFINSST is defined %} {% if imposto.COFINSST is defined %}
<PISST>
<COFINSST>
<vBC>{{ imposto.COFINSST.vBC }}</vBC> <vBC>{{ imposto.COFINSST.vBC }}</vBC>
<pCOFINS>{{ imposto.COFINSST.pCOFINS }}</pCOFINS> <pCOFINS>{{ imposto.COFINSST.pCOFINS }}</pCOFINS>
<qBCProd>{{ imposto.COFINSST.qBCProd }}</qBCProd> <qBCProd>{{ imposto.COFINSST.qBCProd }}</qBCProd>
<vAliqProd>{{ imposto.COFINSST.vAliqProd }}</vAliqProd> <vAliqProd>{{ imposto.COFINSST.vAliqProd }}</vAliqProd>
<vCOFINS>{{ imposto.COFINSST.vCOFINS }}</vCOFINS> <vCOFINS>{{ imposto.COFINSST.vCOFINS }}</vCOFINS>
</PISST>
{% endif %}
{% if imposto.ISSQN is defined %}
<ISSQN>
<vBC>{{ imposto.ISSQN.vBC }}</vBC>
<vAliq>{{ imposto.ISSQN.vAliq }}</vAliq>
<vISSQN>{{ imposto.ISSQN.vISSQN }}</vISSQN>
<cMunFG>{{ imposto.ISSQN.cMunFG }}</cMunFG>
<cListServ>{{ imposto.ISSQN.cListServ }}</cListServ>
<vDeducao>{{ imposto.ISSQN.vDeducao }}</vDeducao>
<vOutro>{{ imposto.ISSQN.vOutro }}</vOutro>
<vDescIncond>{{ imposto.ISSQN.vDescIncond }}</vDescIncond>
<vDescCond>{{ imposto.ISSQN.vDescCond }}</vDescCond>
<vISSRet>{{ imposto.ISSQN.vDeducao }}</vISSRet>
<indISS>{{ imposto.ISSQN.indISS }}</indISS>
<cServico>{{ imposto.ISSQN.cServico }}</cServico>
<cMun>{{ imposto.ISSQN.cMun }}</cMun>
<cPais>{{ imposto.ISSQN.cPais }}</cPais>
<nProcesso>{{ imposto.ISSQN.nProcesso }}</nProcesso>
<indIncentivo>{{ imposto.ISSQN.vDeducao }}</indIncentivo>
</ISSQN>
</COFINSST>
{% endif %} {% endif %}
{% if imposto.ICMSUFDest is defined %} {% if imposto.ICMSUFDest is defined %}
<ICMSUFDest> <ICMSUFDest>
@ -830,8 +862,8 @@
<cAut>{{ pag.card.cAut }}</cAut> <cAut>{{ pag.card.cAut }}</cAut>
</card> </card>
{% endif %} {% endif %}
<vTroco>{{ pag.vTroco }}</vTroco>
</detPag> </detPag>
<vTroco>{{ pag.vTroco }}</vTroco>
{% endfor %} {% endfor %}
</pag> </pag>
{% endif %} {% endif %}
@ -855,6 +887,16 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</infAdic> </infAdic>
{% if NFe.infNFe.infRespTec is defined %}
<infRespTec>
<CNPJ>{{ NFe.infNFe.infRespTec.CNPJ }}</CNPJ>
<xContato>{{ NFe.infNFe.infRespTec.xContato }}</xContato>
<email>{{ NFe.infNFe.infRespTec.email }}</email>
<fone>{{ NFe.infNFe.infRespTec.fone }}</fone>
<idCSRT>{{ NFe.infNFe.infRespTec.idCSRT }}</idCSRT>
<hashCSRT>{{ NFe.infNFe.infRespTec.hashCSRT }}</hashCSRT>
</infRespTec>
{% endif %}
{% if NFe.infNFe.exporta is defined %} {% if NFe.infNFe.exporta is defined %}
<exporta> <exporta>
<UFSaidaPais>{{ NFe.infNFe.exporta.UFSaidaPais }}</UFSaidaPais> <UFSaidaPais>{{ NFe.infNFe.exporta.UFSaidaPais }}</UFSaidaPais>
@ -870,6 +912,10 @@
</compra> </compra>
{% endif %} {% endif %}
</infNFe> </infNFe>
<infNFeSupl>
<qrCode>{{ NFe.infNFe.qrCode }}</qrCode>
<urlChave>{{ NFe.infNFe.urlChave }}</urlChave>
</infNFeSupl>
</NFe> </NFe>
{% endfor %} {% endfor %}
</enviNFe> </enviNFe>

7
requirements.txt

@ -1,4 +1,4 @@
lxml >= 3.5.0, < 4
lxml
nose nose
mock mock
coveralls coveralls
@ -10,8 +10,9 @@ suds >= 0.4
suds_requests >= 0.3 suds_requests >= 0.3
defusedxml >= 0.4.1, < 0.6 defusedxml >= 0.4.1, < 0.6
eight >= 0.3.0, < 0.5 eight >= 0.3.0, < 0.5
cryptography >= 1.8, < 1.10
pyOpenSSL >= 16.0.0, < 17
cryptography >= 1.8, < 3
pyOpenSSL < 19, >= 17.5.0
certifi >= 2015.11.20.1 certifi >= 2015.11.20.1
reportlab reportlab
pytz pytz
zeep

7
setup.py

@ -1,7 +1,9 @@
# coding=utf-8 # coding=utf-8
from setuptools import setup, find_packages from setuptools import setup, find_packages
VERSION = "1.0.1.post3"
VERSION = "1.0.6"
setup( setup(
name="pytrustnfe", name="pytrustnfe",
@ -34,13 +36,14 @@ later (LGPLv2+)',
license='LGPL-v2.1+', license='LGPL-v2.1+',
description='PyTrustNFe é uma biblioteca para envio de NF-e', description='PyTrustNFe é uma biblioteca para envio de NF-e',
long_description=open('README.md', 'r').read(), long_description=open('README.md', 'r').read(),
long_description_content_type='text/markdown',
install_requires=[ install_requires=[
'Jinja2 >= 2.8', 'Jinja2 >= 2.8',
'signxml >= 2.4.0', 'signxml >= 2.4.0',
'lxml >= 3.5.0, < 4',
'suds >= 0.4', 'suds >= 0.4',
'suds_requests >= 0.3', 'suds_requests >= 0.3',
'reportlab', 'reportlab',
'lxml',
'pytz', 'pytz',
'zeep' 'zeep'
], ],

Loading…
Cancel
Save