Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Feature cancelar NFS-e #4

Open
wants to merge 2 commits into
base: generated
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nfselib/ginfes/v3_01/generatedsnamespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
"ListaRpsType": 'xmlns="http://www.ginfes.com.br/tipos_v03.xsd"',
"ConsultarSituacaoLoteRpsEnvio": 'xmlns="http://www.ginfes.com.br/servico_consultar_situacao_lote_rps_envio_v03.xsd" xmlns:tipos="http://www.ginfes.com.br/tipos_v03.xsd"',
"cabecalho": 'xmlns:ns2="http://www.ginfes.com.br/cabecalho_v03.xsd"',
"CancelarNfseEnvio": 'xmlns:p="http://www.ginfes.com.br/servico_cancelar_nfse_envio_v03.xsd" xmlns:p1="http://www.ginfes.com.br/tipos_v03.xsd"',

}
2 changes: 1 addition & 1 deletion nfselib/ginfes/v3_01/servico_cancelar_nfse_envio_v03.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def hasContent_(self):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='CancelarNfseEnvio', namespacedef_='', pretty_print=True):
def export(self, outfile, level, namespace_='p:', name_='CancelarNfseEnvio', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('CancelarNfseEnvio')
if imported_ns_def_ is not None:
namespacedef_ = imported_ns_def_
Expand Down
22 changes: 11 additions & 11 deletions nfselib/ginfes/v3_01/tipos_v03.py
Original file line number Diff line number Diff line change
Expand Up @@ -3044,10 +3044,10 @@ def export(self, outfile, level, namespace_='', name_='tcIdentificacaoNfse', nam
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcIdentificacaoNfse')
self.exportAttributes(outfile, level, already_processed, namespace_='p1:', name_='tcIdentificacaoNfse')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tcIdentificacaoNfse', pretty_print=pretty_print)
self.exportChildren(outfile, level + 1, namespace_='p1:', name_='tcIdentificacaoNfse', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
Expand All @@ -3061,16 +3061,16 @@ def exportChildren(self, outfile, level, namespace_='', name_='tcIdentificacaoNf
eol_ = ''
if self.Numero is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<Numero>%s</Numero>%s' % (self.gds_format_integer(self.Numero, input_name='Numero'), eol_))
outfile.write('<%sNumero>%s</%sNumero>%s' % (namespace_, self.gds_format_integer(self.Numero, input_name='Numero'), namespace_, eol_))
if self.Cnpj is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<Cnpj>%s</Cnpj>%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.Cnpj), input_name='Cnpj')), eol_))
outfile.write('<%sCnpj>%s</%sCnpj>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.Cnpj), input_name='Cnpj')), namespace_, eol_))
if self.InscricaoMunicipal is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<InscricaoMunicipal>%s</InscricaoMunicipal>%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.InscricaoMunicipal), input_name='InscricaoMunicipal')), eol_))
outfile.write('<%sInscricaoMunicipal>%s</%sInscricaoMunicipal>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.InscricaoMunicipal), input_name='InscricaoMunicipal')), namespace_, eol_))
if self.CodigoMunicipio is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<CodigoMunicipio>%s</CodigoMunicipio>%s' % (self.gds_format_integer(self.CodigoMunicipio, input_name='CodigoMunicipio'), eol_))
outfile.write('<%sCodigoMunicipio>%s</%sCodigoMunicipio>%s' % (namespace_, self.gds_format_integer(self.CodigoMunicipio, input_name='CodigoMunicipio'), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
Expand Down Expand Up @@ -3662,10 +3662,10 @@ def export(self, outfile, level, namespace_='', name_='tcInfPedidoCancelamento',
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcInfPedidoCancelamento')
self.exportAttributes(outfile, level, already_processed, namespace_='p1:', name_='tcInfPedidoCancelamento')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tcInfPedidoCancelamento', pretty_print=pretty_print)
self.exportChildren(outfile, level + 1, namespace_='p1:', name_='tcInfPedidoCancelamento', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
Expand All @@ -3683,7 +3683,7 @@ def exportChildren(self, outfile, level, namespace_='', name_='tcInfPedidoCancel
self.IdentificacaoNfse.export(outfile, level, namespace_, name_='IdentificacaoNfse', pretty_print=pretty_print)
if self.CodigoCancelamento is not None:
showIndent(outfile, level, pretty_print)
outfile.write('<CodigoCancelamento>%s</CodigoCancelamento>%s' % (self.gds_encode(self.gds_format_string(quote_xml(self.CodigoCancelamento), input_name='CodigoCancelamento')), eol_))
outfile.write('<%sCodigoCancelamento>%s</%sCodigoCancelamento>%s' % (namespace_, self.gds_encode(self.gds_format_string(quote_xml(self.CodigoCancelamento), input_name='CodigoCancelamento')), namespace_, eol_))
def build(self, node):
already_processed = set()
self.buildAttributes(node, node.attrib, already_processed)
Expand Down Expand Up @@ -3755,10 +3755,10 @@ def export(self, outfile, level, namespace_='', name_='tcPedidoCancelamento', na
showIndent(outfile, level, pretty_print)
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
already_processed = set()
self.exportAttributes(outfile, level, already_processed, namespace_, name_='tcPedidoCancelamento')
self.exportAttributes(outfile, level, already_processed, namespace_='p1:', name_='tcPedidoCancelamento')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespace_='', name_='tcPedidoCancelamento', pretty_print=pretty_print)
self.exportChildren(outfile, level + 1, namespace_='p1:', name_='tcPedidoCancelamento', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
else:
Expand Down