print footer

This commit is contained in:
Wilson Gomez 2023-09-19 17:46:48 -05:00
parent b23dfd7789
commit 877d8692b1

View file

@ -295,7 +295,7 @@ class Receipt(object):
self._printer.text('CUFE: ' + sale['cufe'])
if sale.get('qr_code'):
self.print_qrcode(sale['qr_code'])
self.print_footer(open_box, type_doc)
self.print_footer(open_box, type_doc, sale['invoice_type'])
else:
self._printer.cut()
# self.print_extra_info(sale)
@ -829,12 +829,18 @@ class Receipt(object):
def print_col(self, x, l):
self._printer.text(x[:l] + (l - len(x)) * ' ')
def print_footer(self, open_box=False, type_doc=None):
def print_footer(self, open_box=False, type_doc=None, invoice_type=None):
if self._footer:
self._printer.text(self._footer)
self.print_enter()
self._printer.ln(2)
if type_doc == 'invoice':
self._printer.text('SOFTWARE TRYTON - www.presik.com')
if invoice_type == '1':
self._printer.textln('FACTURACION COMO SOFTWARE PROPIO')
elif invoice_type == 'P':
self._printer.textln('SISTEMA POS')
self._printer.textln('PROVEEDOR DE SOFTWARE PRESIK SAS')
self._printer.textln('NIT: 900803782-2')
self._printer.textln('www.presik.com')
self.print_enter()
self._printer.cut()
if open_box: