Browse Source

Tag idEstrangeiro quando a identificação indicar operação com exterior

pull/9/head
Danimar Ribeiro 9 years ago
parent
commit
4b126bb5f8
  1. 5
      pytrustnfe/nfe/templates/NfeAutorizacao.xml
  2. 2
      setup.py

5
pytrustnfe/nfe/templates/NfeAutorizacao.xml

@ -100,12 +100,17 @@
{% if NFe.infNFe.dest is defined %} {% if NFe.infNFe.dest is defined %}
<dest> <dest>
{% with dest = NFe.infNFe.dest %} {% with dest = NFe.infNFe.dest %}
{% if NFe.infNFe.ide.idDest == '3' %}
<idEstrangeiro>{{ dest.idEstrangeiro }}</idEstrangeiro>
{% endif %}
{% if NFe.infNFe.ide.idDest != '3' %}
{% if dest.tipo == 'person' -%} {% if dest.tipo == 'person' -%}
<CPF>{{ dest.cnpj_cpf }}</CPF> <CPF>{{ dest.cnpj_cpf }}</CPF>
{% endif %} {% endif %}
{% if dest.tipo == 'company' -%} {% if dest.tipo == 'company' -%}
<CNPJ>{{ dest.cnpj_cpf }}</CNPJ> <CNPJ>{{ dest.cnpj_cpf }}</CNPJ>
{% endif %} {% endif %}
{% endif %}
<xNome>{{ dest.xNome }}</xNome> <xNome>{{ dest.xNome }}</xNome>
<enderDest> <enderDest>
<xLgr>{{ dest.enderDest.xLgr }}</xLgr> <xLgr>{{ dest.enderDest.xLgr }}</xLgr>

2
setup.py

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

Loading…
Cancel
Save