Browse Source

Correções na emissão de nota fiscal

tags/0.1.5
martini97 9 years ago
parent
commit
482480fa08
  1. 4
      pytrustnfe/nfe/assinatura.py
  2. 5
      pytrustnfe/nfe/templates/NfeAutorizacao.xml
  3. 2
      setup.py

4
pytrustnfe/nfe/assinatura.py

@ -26,6 +26,10 @@ class Assinatura(object):
digest_algorithm='sha1',
c14n_algorithm='http://www.w3.org/TR/2001/REC-xml-c14n-20010315')
ns = {}
ns[None] = signer.namespaces['ds']
signer.namespaces = ns
signed_root = signer.sign(
xml_element, key=key, cert=cert,
reference_uri=('#%s' % reference))

5
pytrustnfe/nfe/templates/NfeAutorizacao.xml

@ -159,8 +159,9 @@
</autXML>
{% endfor %}
{% endif %}
{% set count = 1 %}
{% for det in NFe.infNFe.detalhes %}
<det nItem="1">
<det nItem="{{ count }}">
<prod>
{% with prod = det.prod %}
<cProd>{{ prod.cProd }}</cProd>
@ -168,6 +169,7 @@
<xProd>{{ prod.xProd }}</xProd>
<NCM>{{ prod.NCM }}</NCM>
<NVE>{{ prod.NVE }}</NVE>
<CEST>{{ prod.CEST }}</CEST>
<EXTIPI>{{ prod.EXTIPI }}</EXTIPI>
<CFOP>{{ prod.CFOP }}</CFOP>
<uCom>{{ prod.uCom }}</uCom>
@ -611,6 +613,7 @@
{% if det.infAdProd %}
<infAdProd>{{ det.infAdProd }}<infAdProd>
{% endif %}
{% set count = count + 1 %}
</det>
{% endfor %}
<total>

2
setup.py

@ -6,7 +6,7 @@ long_description = pypandoc.convert('README.md', 'rst')
setup(
name="PyTrustNFe",
version="0.1.3",
version="0.1.4",
author="Danimar Ribeiro",
author_email='danimaribeiro@gmail.com',
keywords=['nfe', 'mdf-e'],

Loading…
Cancel
Save