From dff61cbeeb44fde552714ed061c213722d7246cf Mon Sep 17 00:00:00 2001 From: Junior Tada Date: Mon, 23 Nov 2015 16:30:23 -0200 Subject: [PATCH] =?UTF-8?q?Serializa=C3=A7=C3=A3o=20de=20NFS-e=20sem=20xsd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pynfe/entidades/servico.py | 2 +- pynfe/processamento/serializacao.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pynfe/entidades/servico.py b/pynfe/entidades/servico.py index 49463d2..931656c 100644 --- a/pynfe/entidades/servico.py +++ b/pynfe/entidades/servico.py @@ -8,7 +8,7 @@ from decimal import Decimal class Servico(Entidade): valor_servico = Decimal() - iss_retido = Decimal() + iss_retido = int() """ http://www1.receita.fazenda.gov.br/sistemas/nfse/tabelas-de-codigos.htm Lista com códigos dos serviços """ diff --git a/pynfe/processamento/serializacao.py b/pynfe/processamento/serializacao.py index 4f35d08..88b029f 100644 --- a/pynfe/processamento/serializacao.py +++ b/pynfe/processamento/serializacao.py @@ -625,7 +625,7 @@ class SerializacaoNfse(Serializacao): raiz = etree.Element(tag_raiz) valores = etree.SubElement(raiz, 'Valores') etree.SubElement(valores, 'ValorServicos').text = str('{:.2f}').format(servico.valor_servico) - etree.SubElement(raiz, 'IssRetido').text = str('{:.2f}').format(servico.iss_retido) + etree.SubElement(raiz, 'IssRetido').text = str(servico.iss_retido) #etree.SubElement(raiz, 'ResponsavelRetencao').text = '' etree.SubElement(raiz, 'ItemListaServico').text = servico.item_lista #etree.SubElement(raiz, 'CodigoCnae').text = '' @@ -654,7 +654,7 @@ class SerializacaoNfse(Serializacao): def _serializar_gerar(self, nfse, tag_raiz='GerarNfseEnvio', retorna_string=False): if nfse.autorizador.upper() == 'BETHA': - raiz = etree.Element(tag_raiz) + raiz = etree.Element(tag_raiz, xmlns=NAMESPACE_BETHA) # TODO - implementar outros sistemas autorizadores else: raiz = etree.Element(tag_raiz)