示例#1
0
文件: soap_100.py 项目: wcreis/PySPED
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.versaoDados.xml
     xml += '</cabecMsg>'
     return xml
示例#2
0
文件: soap_100.py 项目: wcreis/PySPED
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += '<nfeDadosMsg>'
        xml += tirar_acentos(self.dados.xml)
        xml += '</nfeDadosMsg>'

        return xml
示例#3
0
文件: soap_100.py 项目: Anferi/PySPED
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += '<nfeDadosMsg>'
        xml += tirar_acentos(self.dados.xml)
        xml += '</nfeDadosMsg>'

        return xml
示例#4
0
文件: soap_100.py 项目: Anferi/PySPED
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.versaoDados.xml
     xml += '</cabecMsg>'
     return xml
示例#5
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)

        if self.Id.xml:
            xml += self.Id.xml
        else:
            xml += '<infEvento>'

        xml += self.tpAmb.xml
        xml += self.verAplic.xml
        xml += self.cOrgao.xml
        xml += self.cStat.xml
        xml += self.xMotivo.xml
        xml += self.chNFe.xml
        xml += self.tpEvento.xml
        xml += self.xEvento.xml
        xml += self.nSeqEvento.xml

        if self.CNPJDest.valor:
            xml += self.CNPJDest.xml
        elif self.CPFDest.valor:
            xml += self.CPFDest.xml

        xml += self.emailDest.xml
        xml += self.dhRegEvento.xml
        xml += self.nProt.xml
        xml += '</infEvento>'
        return xml
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += ABERTURA
        xml += '<nfse:RetornoConsultaLote xmlns:nfse="http://localhost:8080/WsNFe2/lote">'
        xml += self.Cabecalho.xml

        if len(self.Alertas):
            xml += '<Alertas>'

            for a in self.Alertas:
                xml += a.xml

            xml += '</Alertas>'

        if len(self.Erros):
            xml += '<Erros>'

            for e in self.Erros:
                xml += e.xml

            xml += '</Erros>'

        if len(self.ListaNFSe):
            xml += '<ListaNFSe>'

            for c in self.ListaNFSe:
                xml += c.xml

            xml += '</ListaNFSe>'


        xml += '</nfse:RetornoConsultaLote>'
        return xml
示例#7
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += '<nfse:ReqConsultaLote xmlns:nfse="http://localhost:8080/WsNFe2/lote" xmlns:tipos="http://localhost:8080/WsNFe2/tp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost:8080/WsNFe2/lote http://localhost:8080/WsNFe2/xsd/ReqConsultaLote.xsd">'
     xml += self.Cabecalho.xml
     xml += '</nfse:ReqConsultaLote>'
     return xml
示例#8
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.infCons.xml
     xml += '</ConsCad>'
     return xml
示例#9
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<nfeCabecMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/' + self.webservice + '">'
     xml += self.cUF.xml
     xml += self.versaoDados.xml
     xml += '</nfeCabecMsg>'
     return xml
示例#10
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.infCons.xml
     xml += '</retConsCad>'
     return xml
示例#11
0
    def get_xml(self):
        self.nfeCabecMsg.webservice = self.webservice
        self.nfeCabecMsg.cUF.valor = self.cUF
        self.nfeCabecMsg.versaoDados.valor = self.envio.versao.valor

        self.nfeDadosMsg.webservice = self.webservice
        self.nfeDadosMsg.dados = self.envio

        if self.soap_action_webservice_e_metodo:
            self._header[
                b'content-type'] = b'application/soap+xml; charset=utf-8; action="http://www.portalfiscal.inf.br/nfe/wsdl/' + self.webservice.encode(
                    'utf-8') + b'/' + self.metodo.encode('utf-8') + b'"'
        else:
            self._header[
                b'content-type'] = b'application/soap+xml; charset=utf-8; action="http://www.portalfiscal.inf.br/nfe/wsdl/' + self.webservice.encode(
                    'utf-8') + b'"'

        xml = XMLNFe.get_xml(self)
        xml += ABERTURA
        xml += '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">'
        xml += '<soap:Header>'
        xml += self.nfeCabecMsg.xml
        xml += '</soap:Header>'
        xml += '<soap:Body>'
        xml += self.nfeDadosMsg.xml
        xml += '</soap:Body>'
        xml += '</soap:Envelope>'
        return xml
示例#12
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)

        if self.Id.xml:
            xml += self.Id.xml
        else:
            xml += '<infEvento>'

        xml += self.tpAmb.xml
        xml += self.verAplic.xml
        xml += self.cOrgao.xml
        xml += self.cStat.xml
        xml += self.xMotivo.xml
        xml += self.chNFe.xml
        xml += self.tpEvento.xml
        xml += self.xEvento.xml
        xml += self.nSeqEvento.xml

        if self.CNPJDest.valor:
            xml += self.CNPJDest.xml
        elif self.CPFDest.valor:
            xml += self.CPFDest.xml

        xml += self.emailDest.xml
        xml += self.dhRegEvento.xml
        xml += self.nProt.xml
        xml += '</infEvento>'
        return xml
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += ABERTURA
        xml += '<nfse:RetornoCancelamentoNFSe xmlns:nfse="http://localhost:8080/WsNFe2/lote">'
        xml += self.Cabecalho.xml

        if len(self.NotasCanceladas):
            xml += '<NotasCanceladas>'

            for n in self.NotasCanceladas:
                xml += n.xml

            xml += '</NotasCanceladas>'

        if len(self.Alertas):
            xml += '<Alertas>'

            for a in self.Alertas:
                xml += a.xml

            xml += '</Alertas>'

        if len(self.Erros):
            xml += '<Erros>'

            for e in self.Erros:
                xml += e.xml

            xml += '</Erros>'

        xml += '</nfse:RetornoCancelamentoNFSe>'
        return xml
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += '<nfse:RetornoConsultaSeqRps xmlns:nfse="http://localhost:8080/WsNFe2/lote" xmlns:tipos="http://localhost:8080/WsNFe2/tp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost:8080/WsNFe2/lote http://localhost:8080/WsNFe2/xsd/ConsultaSeqRps.xsd">'
     xml += self.Cabecalho.xml
     xml += '</nfse:RetornoConsultaSeqRps>'
     return xml
示例#15
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += ABERTURA
        xml += '<nfse:RetornoCancelamentoNFSe xmlns:nfse="http://localhost:8080/WsNFe2/lote">'
        xml += self.Cabecalho.xml

        if len(self.NotasCanceladas):
            xml += '<NotasCanceladas>'

            for n in self.NotasCanceladas:
                xml += n.xml

            xml += '</NotasCanceladas>'

        if len(self.Alertas):
            xml += '<Alertas>'

            for a in self.Alertas:
                xml += a.xml

            xml += '</Alertas>'

        if len(self.Erros):
            xml += '<Erros>'

            for e in self.Erros:
                xml += e.xml

            xml += '</Erros>'

        xml += '</nfse:RetornoCancelamentoNFSe>'
        return xml
示例#16
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<nfeCabecMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/' + self.webservice + '">'
     xml += self.cUF.xml
     xml += self.versaoDados.xml
     xml += '</nfeCabecMsg>'
     return xml
示例#17
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += self.versao.xml
     xml += self.descEvento.xml
     xml += self.nProt.xml
     xml += self.xJust.xml
     xml += '</detEvento>'
     return xml
示例#18
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.NFe.xml.replace(ABERTURA, '')
     xml += self.protNFe.xml.replace(ABERTURA, '')
     xml += '</nfeProc>'
     return xml
示例#19
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.inutCTe.xml.replace(ABERTURA, '')
     xml += self.retInutCTe.xml.replace(ABERTURA, '')
     xml += '</procInutCTe>'
     return xml
示例#20
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.tpAmb.xml
     xml += self.nRec.xml
     xml += '</consReciNFe>'
     return xml
示例#21
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.cancCTe.xml.replace(ABERTURA, '')
     xml += self.retCancCTe.xml.replace(ABERTURA, '')
     xml += '</procCancCTe>'
     return xml
示例#22
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += self.versao.xml
     xml += self.descEvento.xml
     xml += self.nProt.xml
     xml += self.xJust.xml
     xml += '</detEvento>'
     return xml
示例#23
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.inutNFe.xml.replace(ABERTURA, '')
     xml += self.retInutNFe.xml.replace(ABERTURA, '')
     xml += '</ProcInutNFe>'
     return xml
示例#24
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.evento.xml.replace(ABERTURA, '')
     xml += self.retEvento.xml.replace(ABERTURA, '')
     xml += '</procEventoNFe>'
     return xml
示例#25
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.NFe.xml.replace(ABERTURA, '')
     xml += self.protNFe.xml.replace(ABERTURA, '')
     xml += '</nfeProc>'
     return xml
示例#26
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.tpAmb.xml
     xml += self.nRec.xml
     xml += '</consReciNFe>'
     return xml
示例#27
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += self.versao.xml
     xml += self.descEvento.xml
     xml += self.xCorrecao.xml
     xml += self.xCondUso.xml
     xml += '</detEvento>'
     return xml
示例#28
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.cancNFe.xml.replace(ABERTURA, '')
     xml += self.retCancNFe.xml.replace(ABERTURA, '')
     xml += '</procCancNFe>'
     return xml
示例#29
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.evento.xml.replace(ABERTURA, '')
     xml += self.retEvento.xml.replace(ABERTURA, '')
     xml += '</procEventoNFe>'
     return xml
    def get_xml(self):
        xml = XMLNFe.get_xml(self)

        xml += self.NSU.xml
        xml += self.schema.xml
        xml += self.base64Binary.xml

        xml += '</docZip>'
        return xml
示例#31
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.tpAmb.xml
     xml += self.cUF.xml
     xml += self.xServ.xml
     xml += '</consStatServCte>'
     return xml
示例#32
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.tpAmb.xml
     xml += self.cUF.xml
     xml += self.xServ.xml
     xml += "</consStatServCte>"
     return xml
示例#33
0
    def get_xml(self):
        if not self.ultNSU.valor:
            return ''

        xml = XMLNFe.get_xml(self)
        xml += '<distNSU>'
        xml += self.ultNSU.xml
        xml += '</distNSU>'
        return xml
示例#34
0
    def get_xml(self):
        if not self.chNFe.valor:
            return ''

        xml = XMLNFe.get_xml(self)
        xml += '<consChNFe>'
        xml += self.chNFe.xml
        xml += '</consChNFe>'
        return xml
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<Cabecalho>'
     xml += self.CodCidade.xml
     xml += self.CPFCNPJRemetente.xml
     xml += self.transacao.xml
     xml += self.Versao.xml
     xml += '</Cabecalho>'
     return xml
示例#36
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += "<Cabecalho>"
     xml += self.CodCidade.xml
     xml += self.CPFCNPJRemetente.xml
     xml += self.Versao.xml
     xml += self.NumeroLote.xml
     xml += "</Cabecalho>"
     return xml
示例#37
0
    def get_xml(self):
        if not self.NSU.valor:
            return ''

        xml = XMLNFe.get_xml(self)
        xml += '<consNSU>'
        xml += self.NSU.xml
        xml += '</consNSU>'
        return xml
示例#38
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += ABERTURA
     xml += self.versao.xml
     xml += self.tpAmb.xml
     xml += self.xServ.xml
     xml += self.chNFe.xml
     xml += '</consSitCTe>'
     return xml
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<Cabecalho>'
     xml += self.CodCidade.xml
     xml += self.Sucesso.xml
     xml += self.CPFCNPJRemetente.xml
     xml += self.Versao.xml
     xml += '</Cabecalho>'
     return xml
示例#40
0
    def get_xml(self):
        if not self.NSU.valor:
            return ''

        xml = XMLNFe.get_xml(self)
        xml += '<consNSU>'
        xml += self.NSU.xml
        xml += '</consNSU>'
        return xml
示例#41
0
    def get_xml(self):
        if not self.ultNSU.valor:
            return ''

        xml = XMLNFe.get_xml(self)
        xml += '<distNSU>'
        xml += self.ultNSU.xml
        xml += '</distNSU>'
        return xml
示例#42
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)

        xml += self.NSU.xml
        xml += self.schema.xml
        xml += self.base64Binary.xml

        xml += '</docZip>'
        return xml
示例#43
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<Erro>'
     xml += self.Codigo.xml
     xml += self.Descricao.xml
     xml += self.ChaveRPS.xml
     xml += self.ChaveNFe.xml
     xml += '</Erro>'
     return xml
示例#44
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<retNFe>'
     xml += self.chNFe.xml
     xml += self.cStat.xml
     xml += self.xMotivo.xml
     xml += self.procNFeZip.xml
     xml += self.procNFeGrupoZip.xml
     xml += '</retNFe>'
     return xml
示例#45
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += self.Id.xml

        if len(self.RPS):
            for r in self.RPS:
                xml += r.xml

        xml += '</Lote>'
        return xml
示例#46
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<Item>'
     xml += self.DiscriminacaoServico.xml
     xml += self.Quantidade.xml
     xml += self.ValorUnitario.xml
     xml += self.ValorTotal.xml
     xml += self.Tributavel.xml
     xml += '</Item>'
     return xml
示例#47
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<infCons>'
     xml += self.xServ.xml
     xml += self.UF.xml
     xml += self.IE.xml
     xml += self.CNPJ.xml
     xml += self.CPF.xml
     xml += '</infCons>'
     return xml
示例#48
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<retNFe>'
     xml += self.chNFe.xml
     xml += self.cStat.xml
     xml += self.xMotivo.xml
     xml += self.procNFeZip.xml
     xml += self.procNFeGrupoZip.xml
     xml += '</retNFe>'
     return xml
示例#49
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<infCons>'
     xml += self.xServ.xml
     xml += self.UF.xml
     xml += self.IE.xml
     xml += self.CNPJ.xml
     xml += self.CPF.xml
     xml += '</infCons>'
     return xml
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += self.Id.xml

        if len(self.NotaCancelamento):
            for n in self.NotaCancelamento:
                xml += n.xml

        xml += '</Lote>'
        return xml
示例#51
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<Cabecalho>'
     xml += self.CodCid.xml
     xml += self.IMPrestador.xml
     xml += self.CPFCNPJRemetente.xml
     xml += self.SeriePrestacao.xml
     xml += self.Versao.xml
     xml += '</Cabecalho>'
     return xml
示例#52
0
    def get_xml(self):
        if not self.nRec.valor:
            return ""

        xml = XMLNFe.get_xml(self)
        xml += "<infRec>"
        xml += self.nRec.xml
        xml += self.tMed.xml
        xml += "</infRec>"
        return xml
示例#53
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)

        if self.NFeZip.valor and self.protNFeZip.valor:
            xml += '<procNFeGrupoZip>'
            xml += self.NFeZip.xml
            xml += self.protNFeZip.xml
            xml += '</procNFeGrupoZip>'

        return xml
示例#54
0
 def get_xml(self):
     xml = XMLNFe.get_xml(self)
     xml += '<Cabecalho>'
     xml += self.CodCid.xml
     xml += self.IMPrestador.xml
     xml += self.CPFCNPJRemetente.xml
     xml += self.SeriePrestacao.xml
     xml += self.Versao.xml
     xml += '</Cabecalho>'
     return xml
示例#55
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += self.versao.xml
        xml += self.infProt.xml

        if len(self.Signature.URI) and (self.Signature.URI.strip() != '#'):
            xml += self.Signature.xml

        xml += '</protNFe>'
        return xml
示例#56
0
    def get_xml(self):
        xml = XMLNFe.get_xml(self)
        xml += self.versao.xml
        xml += self.infProt.xml

        if len(self.Signature.URI) and (self.Signature.URI.strip() != '#'):
            xml += self.Signature.xml

        xml += '</protNFe>'
        return xml