From 4b126bb5f84a6c3eacc908841cbe539f92496e52 Mon Sep 17 00:00:00 2001 From: Danimar Ribeiro Date: Mon, 7 Nov 2016 10:52:30 -0200 Subject: [PATCH] =?UTF-8?q?Tag=20idEstrangeiro=20quando=20a=20identifica?= =?UTF-8?q?=C3=A7=C3=A3o=20indicar=20opera=C3=A7=C3=A3o=20com=20exterior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfe/templates/NfeAutorizacao.xml | 13 +++++++++---- setup.py | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) 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'],