|
|
@ -313,23 +313,28 @@ class danfce(object): |
|
|
|
|
|
|
|
|
cnpj = tagtext(oNode=el_dest, cTag='CNPJ') |
|
|
cnpj = tagtext(oNode=el_dest, cTag='CNPJ') |
|
|
cpf = tagtext(oNode=el_dest, cTag='CPF') |
|
|
cpf = tagtext(oNode=el_dest, cTag='CPF') |
|
|
|
|
|
pnome = tagtext(oNode=el_dest, cTag='xNome') |
|
|
if cnpj: |
|
|
if cnpj: |
|
|
cnpj_cpf = format_cnpj_cpf(cnpj) |
|
|
cnpj_cpf = format_cnpj_cpf(cnpj) |
|
|
cnpj_cpf = "CONSUMIDOR CNPJ: %s" % (cnpj) |
|
|
cnpj_cpf = "CONSUMIDOR CNPJ: %s" % (cnpj) |
|
|
|
|
|
pnome = (pnome[:10] + '..') if len(pnome) > 10 else pnome |
|
|
elif cpf: |
|
|
elif cpf: |
|
|
cnpj_cpf = format_cnpj_cpf(cpf) |
|
|
cnpj_cpf = format_cnpj_cpf(cpf) |
|
|
cnpj_cpf = "CONSUMIDOR CPF: %s" % (cpf) |
|
|
cnpj_cpf = "CONSUMIDOR CPF: %s" % (cpf) |
|
|
|
|
|
pnome = (pnome[:13] + '..') if len(pnome) > 13 else pnome |
|
|
else: |
|
|
else: |
|
|
cnpj_cpf = u"CONSUMIDOR NÃO IDENTIFICADO" |
|
|
cnpj_cpf = u"CONSUMIDOR NÃO IDENTIFICADO" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nNFC = tagtext(oNode=el_ide, cTag="nNF") |
|
|
nNFC = tagtext(oNode=el_ide, cTag="nNF") |
|
|
serie = tagtext(oNode=el_ide, cTag='serie') |
|
|
serie = tagtext(oNode=el_ide, cTag='serie') |
|
|
|
|
|
|
|
|
dataSolicitacao = getdateUTC(tagtext(oNode=el_ide, cTag="dhEmi")) |
|
|
dataSolicitacao = getdateUTC(tagtext(oNode=el_ide, cTag="dhEmi")) |
|
|
dataSolicitacao = dataSolicitacao[0] + " " + dataSolicitacao[1] |
|
|
dataSolicitacao = dataSolicitacao[0] + " " + dataSolicitacao[1] |
|
|
|
|
|
|
|
|
text = u"%s <br />%s <br />NFC-e nº%s Série %s %s<br />" % ( |
|
|
|
|
|
frase_chave_acesso, cnpj_cpf, nNFC, serie, dataSolicitacao) |
|
|
|
|
|
|
|
|
text = u"%s <br />NFC-e nº%s Série %s %s<br />" % ( |
|
|
|
|
|
frase_chave_acesso, nNFC, serie, dataSolicitacao) |
|
|
|
|
|
|
|
|
self._drawCenteredParagraph(text) |
|
|
self._drawCenteredParagraph(text) |
|
|
|
|
|
|
|
|
@ -349,6 +354,18 @@ class danfce(object): |
|
|
numProtocolo, dataAutorizacao) |
|
|
numProtocolo, dataAutorizacao) |
|
|
self._drawCenteredParagraph(text) |
|
|
self._drawCenteredParagraph(text) |
|
|
|
|
|
|
|
|
|
|
|
consumi_text = u"%s %s <br />" %(cnpj_cpf, pnome) |
|
|
|
|
|
|
|
|
|
|
|
self._drawCenteredParagraph(consumi_text) |
|
|
|
|
|
pEnd = tagtext(oNode=el_dest, cTag='xLgr') + ', ' + tagtext( |
|
|
|
|
|
oNode=el_dest, cTag='nro') + ' - ' |
|
|
|
|
|
pEnd += tagtext(oNode=el_dest, cTag='xBairro') + '<br />' + tagtext( |
|
|
|
|
|
oNode=el_dest, cTag='xMun') + ' - ' |
|
|
|
|
|
pEnd += tagtext(oNode=el_dest, cTag='UF') + ' - ' + tagtext( |
|
|
|
|
|
oNode=el_dest, cTag='CEP') + '<br />' |
|
|
|
|
|
|
|
|
|
|
|
self._drawCenteredParagraph(pEnd) |
|
|
|
|
|
|
|
|
self.draw_qr_code(qrcode) |
|
|
self.draw_qr_code(qrcode) |
|
|
|
|
|
|
|
|
infAdFisco = tagtext(oNode=el_infAdic, cTag='infAdFisco') |
|
|
infAdFisco = tagtext(oNode=el_infAdic, cTag='infAdFisco') |
|
|
|