fix print data in invoice
This commit is contained in:
parent
c36e7277d5
commit
418856a116
|
@ -656,9 +656,15 @@ class Receipt(object):
|
||||||
self._printer.set(align='left')
|
self._printer.set(align='left')
|
||||||
if type_doc == 'invoice':
|
if type_doc == 'invoice':
|
||||||
if sale['number']:
|
if sale['number']:
|
||||||
|
text_title = ""
|
||||||
|
invoice_type = sale.get('invoice_type', '')
|
||||||
|
if invoice_type == 'P':
|
||||||
|
text_title = "SISTEMA POS: "
|
||||||
|
elif invoice_type == '1':
|
||||||
|
text_title = "FACTURA DE VENTA ELECTRONICA: "
|
||||||
if sale['total_amount'] >= 0:
|
if sale['total_amount'] >= 0:
|
||||||
self._printer.text(
|
self._printer.text(
|
||||||
'FACTURA DE VENTA No. ' + sale['number'])
|
text_title + sale['number'])
|
||||||
else:
|
else:
|
||||||
self._printer.text('NOTA CREDITO No. ' + sale['number'])
|
self._printer.text('NOTA CREDITO No. ' + sale['number'])
|
||||||
elif type_doc in ['order', 'delivery']:
|
elif type_doc in ['order', 'delivery']:
|
||||||
|
@ -1049,12 +1055,13 @@ class Receipt(object):
|
||||||
res = ''
|
res = ''
|
||||||
kind = auth['kind']
|
kind = auth['kind']
|
||||||
start_date_auth = auth['start_date_auth']
|
start_date_auth = auth['start_date_auth']
|
||||||
|
end_date_auth = auth['end_date_auth']
|
||||||
from_auth = auth['from_auth']
|
from_auth = auth['from_auth']
|
||||||
to_auth = auth['to_auth']
|
to_auth = auth['to_auth']
|
||||||
number = auth['number']
|
number = auth['number']
|
||||||
prefix = auth.get('prefix', "")
|
prefix = auth.get('prefix', "")
|
||||||
if auth:
|
if auth:
|
||||||
res = f"Autorizacion de facturacion {kind} No {number} del {start_date_auth}, prefijo {prefix} habilita desde {from_auth} a {to_auth}"
|
res = f"Autorizacion de facturacion {kind} No {number} del {start_date_auth} hasta {end_date_auth}, habilita desde {prefix} {from_auth} a {prefix} {to_auth}"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue