Browse Source

determine fewer caracteres in each line of product description

pull/145/head
marinaGD 7 years ago
parent
commit
d64f60f171
  1. 10
      pytrustnfe/nfe/danfe.py

10
pytrustnfe/nfe/danfe.py

@ -156,9 +156,9 @@ class danfe(object):
infAdProd = item.find( infAdProd = item.find(
".//{http://www.portalfiscal.inf.br/nfe}infAdProd") ".//{http://www.portalfiscal.inf.br/nfe}infAdProd")
list_ = wrap(tagtext(oNode=el_prod, cTag='xProd'), 56)
list_ = wrap(tagtext(oNode=el_prod, cTag='xProd'), 50)
if infAdProd is not None: if infAdProd is not None:
list_.extend(wrap(infAdProd.text, 56))
list_.extend(wrap(infAdProd.text, 50))
list_desc.append(list_) list_desc.append(list_)
list_cProd = wrap(tagtext(oNode=el_prod, cTag='cProd'), 14) list_cProd = wrap(tagtext(oNode=el_prod, cTag='cProd'), 14)
@ -661,8 +661,8 @@ obsCont[@xCampo='NomeVendedor']")
self.canvas.setFont('NimbusSanL-Regu', 5.5) self.canvas.setFont('NimbusSanL-Regu', 5.5)
# Colunas # Colunas
self.vline(self.nLeft + 12, self.nlin + 2, nH)
self.stringcenter(self.nLeft + 5.5, self.nlin + 5.5, 'CÓDIGO')
self.vline(self.nLeft + 15, self.nlin + 2, nH)
self.stringcenter(self.nLeft + 7.5, self.nlin + 5.5, 'CÓDIGO')
self.vline(nMr - 7, self.nlin + 2, nH) self.vline(nMr - 7, self.nlin + 2, nH)
self.stringcenter(nMr - 3.5, self.nlin + 4.5, 'ALÍQ') self.stringcenter(nMr - 3.5, self.nlin + 4.5, 'ALÍQ')
self.stringcenter(nMr - 3.5, self.nlin + 6.5, 'IPI') self.stringcenter(nMr - 3.5, self.nlin + 6.5, 'IPI')
@ -750,7 +750,7 @@ obsCont[@xCampo='NomeVendedor']")
# Descrição Item # Descrição Item
line_desc = nLin line_desc = nLin
for des in list_desc[id]: for des in list_desc[id]:
self.string(self.nLeft + 12.5, line_desc, des)
self.string(self.nLeft + 15.5, line_desc, des)
line_desc += nStep line_desc += nStep
nLin = max(line_cod, line_desc) nLin = max(line_cod, line_desc)

Loading…
Cancel
Save