From 79ecf3e99c6136b898c524c42a86b0e59f50d0f8 Mon Sep 17 00:00:00 2001 From: barussa Date: Tue, 6 Oct 2020 09:47:03 -0300 Subject: [PATCH] =?UTF-8?q?Altera=C3=A7=C3=A3o=20c=C3=B3d=20NFe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfe/danfce.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytrustnfe/nfe/danfce.py b/pytrustnfe/nfe/danfce.py index 2771a13..751152e 100644 --- a/pytrustnfe/nfe/danfce.py +++ b/pytrustnfe/nfe/danfce.py @@ -165,6 +165,7 @@ class danfce(object): el_prod = item.find(".//{http://www.portalfiscal.inf.br/nfe}prod") cod = tagtext(oNode=el_prod, cTag='cProd') + cod = (cod[:5] + '..') if len(cod) > 5 else cod descricao = tagtext(oNode=el_prod, cTag='xProd') descricao = (descricao[:20] + '..') if len(descricao) > 20 else descricao Un = tagtext(oNode=el_prod, cTag='uCom')