Browse Source

Implementação nota fiscal Susesu - OK

pull/37/merge
Danimar Ribeiro 9 years ago
parent
commit
e6df62b3fe
  1. 3
      cidades/susesu.md
  2. 8
      pytrustnfe/nfse/susesu/templates/EnviarNotaRetornaurlNota.xml
  3. 4
      pytrustnfe/nfse/susesu/templates/Nota.xml
  4. 3
      pytrustnfe/xml/__init__.py

3
cidades/susesu.md

@ -0,0 +1,3 @@
* Ipeúna / SP
* Piracaia / SP
* Rio das Pedras / SP

8
pytrustnfe/nfse/susesu/templates/EnviarNotaRetornaurlNota.xml

@ -1,5 +1,5 @@
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body>
<EnviarNotaRetornaurlNota xmlns="http://susesu.com.br/">
<codPrefeitura>{{ nfse.codigo_prefeitura }}</codPrefeitura>
<notaFiscal>
@ -10,5 +10,5 @@
<cnpjPrestador>{{ nfse.cnpj_prestador }}</cnpjPrestador>
<senhaNFD>{{ nfse.senha_nfd }}</senhaNFD>
</EnviarNotaRetornaurlNota>
</soap:Body>
</soap:Envelope>
</Body>
</Envelope>

4
pytrustnfe/nfse/susesu/templates/Nota.xml

@ -6,7 +6,7 @@
<OUTRAS_INFORMACOES>{{ nfse.observacoes}}</OUTRAS_INFORMACOES>
<DESCRICAO_SERVICOS>{{ nfse.descricao }}</DESCRICAO_SERVICOS>
<VALOR_TOTAL_NOTA>{{ nfse.total_servicos }}</VALOR_TOTAL_NOTA>
<STATUS_ISS_NOTA>1</STATUS_ISS_NOTA>
<STATUS_ISS_NOTA>{{ nfse.status_nota }}</STATUS_ISS_NOTA>
<IRRF>{{ nfse.valor_ir }}</IRRF>
<INSS>{{ nfse.valor_inss }}</INSS>
<PIS>{{ nfse.valor_pis }}</PIS>
@ -27,6 +27,6 @@
<TOMADOR_EMAIL>{{ nfse.tomador.email }}</TOMADOR_EMAIL>
<TOMADOR_TELEFONE>{{ nfse.tomador.telefone }}</TOMADOR_TELEFONE>
<TOMADOR_MUNICIPIO>{{ nfse.tomador.cidade }}</TOMADOR_MUNICIPIO>
<ALIQUOTA>{{ nfse.tomador.aliquota_atividade }}</ALIQUOTA>
<ALIQUOTA>{{ nfse.aliquota_atividade }}</ALIQUOTA>
<PORCENTAGEM_REGIME_ESPECIAL>0</PORCENTAGEM_REGIME_ESPECIAL>
</NOTA>

3
pytrustnfe/xml/__init__.py

@ -29,7 +29,8 @@ def render_xml(path, template_name, remove_empty, **nfe):
template = env.get_template(template_name)
xml = template.render(**nfe)
parser = etree.XMLParser(remove_blank_text=True, remove_comments=True)
parser = etree.XMLParser(remove_blank_text=True, remove_comments=True,
strip_cdata=False)
root = etree.fromstring(xml, parser=parser)
if remove_empty:
context = etree.iterwalk(root)

Loading…
Cancel
Save