diff --git a/pytrustnfe/nfe/templates/NfeAutorizacao.xml b/pytrustnfe/nfe/templates/NfeAutorizacao.xml index 61cfa67..3b5d319 100644 --- a/pytrustnfe/nfe/templates/NfeAutorizacao.xml +++ b/pytrustnfe/nfe/templates/NfeAutorizacao.xml @@ -100,11 +100,16 @@ {% if NFe.infNFe.dest is defined %} {% with dest = NFe.infNFe.dest %} - {% if dest.tipo == 'person' -%} - {{ dest.cnpj_cpf }} + {% if NFe.infNFe.ide.idDest == '3' %} + {{ dest.idEstrangeiro }} {% endif %} - {% if dest.tipo == 'company' -%} - {{ dest.cnpj_cpf }} + {% if NFe.infNFe.ide.idDest != '3' %} + {% if dest.tipo == 'person' -%} + {{ dest.cnpj_cpf }} + {% endif %} + {% if dest.tipo == 'company' -%} + {{ dest.cnpj_cpf }} + {% endif %} {% endif %} {{ dest.xNome }} diff --git a/setup.py b/setup.py index 14edf9f..806f75d 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ long_description = pypandoc.convert('README.md', 'rst') setup( name="PyTrustNFe", - version="0.1.5", + version="0.1.7", author="Danimar Ribeiro", author_email='danimaribeiro@gmail.com', keywords=['nfe', 'mdf-e'],