From 257b1d51cbfc76de580ba8bb6077a35931045901 Mon Sep 17 00:00:00 2001 From: Polibras Date: Mon, 15 Jan 2018 14:30:45 -0300 Subject: [PATCH] [FIX] Ajustes nos templates --- .gitignore | 1 + pytrustnfe/nfe/__init__.py | 2 +- pytrustnfe/nfe/templates/NFeDistribuicaoDFe.xml | 15 +++++++++++---- pytrustnfe/nfe/templates/RecepcaoEventoManifesto.xml | 3 +-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index eff572b..950e598 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ dist/ docs/_build .vscode/tags .cache +.idea/ diff --git a/pytrustnfe/nfe/__init__.py b/pytrustnfe/nfe/__init__.py index 62b6932..bf87674 100644 --- a/pytrustnfe/nfe/__init__.py +++ b/pytrustnfe/nfe/__init__.py @@ -282,7 +282,7 @@ def recepcao_evento_carta_correcao(certificado, **kwargs): # Assinar def xml_recepcao_evento_manifesto(certificado, **kwargs): # Assinar - return _render(certificado, 'RecepcaoEventoManifesto', **kwargs) + return _render(certificado, 'RecepcaoEventoManifesto', True, **kwargs) def recepcao_evento_manifesto(certificado, **kwargs): # Assinar diff --git a/pytrustnfe/nfe/templates/NFeDistribuicaoDFe.xml b/pytrustnfe/nfe/templates/NFeDistribuicaoDFe.xml index 9e4d774..1e40c56 100644 --- a/pytrustnfe/nfe/templates/NFeDistribuicaoDFe.xml +++ b/pytrustnfe/nfe/templates/NFeDistribuicaoDFe.xml @@ -9,11 +9,18 @@ {{ ultimo_nsu }} - - {{ chave_nfe }} - + {% if nsu is defined %} + + {{ nsu }} + + {% endif %} + {% if chNFe is defined %} + + {{ chNFe }} + + {% endif %} - + \ No newline at end of file diff --git a/pytrustnfe/nfe/templates/RecepcaoEventoManifesto.xml b/pytrustnfe/nfe/templates/RecepcaoEventoManifesto.xml index 0d77fa3..a45ca1a 100644 --- a/pytrustnfe/nfe/templates/RecepcaoEventoManifesto.xml +++ b/pytrustnfe/nfe/templates/RecepcaoEventoManifesto.xml @@ -1,6 +1,6 @@ {{ lote }} - + 91 {{ ambiente }} @@ -12,7 +12,6 @@ 1.00 {{ manifesto.event_description }} - {{ manifesto.justificativa }}