Merge branch 'develop'

Fix - Issues 33 y 34
This commit is contained in:
Mauricio Baeza 2017-12-01 11:06:40 -06:00
commit 95503188d9
3 changed files with 7 additions and 2 deletions

View File

@ -939,6 +939,7 @@ def _comprobante(doc, options):
data = CaseInsensitiveDict(doc.attrib.copy())
del data['certificado']
data['seriefolio'] = '{} - {}'.format(data['serie'], data['folio'])
data['totalenletras'] = to_letters(float(data['total']), data['moneda'])
if data['version'] == '3.3':
tipos = {

View File

@ -2770,6 +2770,7 @@ class PreFacturas(BaseModel):
data['es_pre'] = True
data['cancelada'] = False
data['donativo'] = obj['donativo']
tipos = {
'I': 'ingreso',
@ -2820,6 +2821,9 @@ class PreFacturas(BaseModel):
data['totales']['taxlocales'] = taxes['taxlocales']
data['timbre'] = {}
data['donataria'] = {}
data['ine'] = {}
return data
@classmethod
@ -2827,7 +2831,7 @@ class PreFacturas(BaseModel):
obj = PreFacturas.get(PreFacturas.id==id)
name = '{}{}_{}.pdf'.format(obj.serie, obj.folio, obj.cliente.rfc)
data = cls._get_info_to_pdf(cls, id)
doc = util.to_pdf(data)
doc = util.to_pdf(data, data['emisor']['rfc'])
return doc, name
@classmethod

View File

@ -78,7 +78,7 @@
"fontSize": 8, "alignment": 0, "textColor": "black",
"backColor": "white"}
},
"folio": {
"seriefolio": {
"rectangulo": {"x": 15.1, "y": 23.2, "width": 3.0, "height": 0.4,
"radius": 0.0, "stroke": false, "fill": false},
"estilo": {"name": "nombre", "fontName": "Helvetica-Bold",