minor fix

This commit is contained in:
Wilson Gomez 2023-10-07 11:16:13 -05:00
parent 4b6283a7a8
commit e94a7c868c
1 changed files with 2 additions and 12 deletions

View File

@ -655,14 +655,6 @@ class Receipt(object):
def print_body(self, sale, type_doc='invoice', short=False):
self._printer.set(font=_FONT_B)
# kind_string = sale.get('kind_string', None)
# if type_doc != 'invoice' and kind_string and self._environment != 'retail':
# self._printer.set(custom_size=True, width=2,
# height=2, align='center')
# kind = f'- - - {kind_string} - - -'
# self._printer.text(kind)
# self._printer.ln(2)
# self._printer.set(custom_size=False)
self._printer.set(align='left')
if type_doc == 'invoice':
if sale['number']:
@ -789,9 +781,6 @@ class Receipt(object):
self._printer.text(self.get_authorization(auth_data))
if not short:
self.print_enter()
# elif self._gta_info and sale['state'] not in ['draft']:
# self._printer.text(self._gta_info)
# self.print_enter()
if not short:
self._printer.text('Fecha de creacion: %s' % sale["create_date"])
self._printer.ln(2)
@ -892,6 +881,7 @@ class Receipt(object):
print(e)
traceback.print_exc()
self._printer.close()
time.sleep(1)
except Exception as e:
print(e)
traceback.print_exc()
@ -921,7 +911,7 @@ class Receipt(object):
_kind = 'PARA LLEVAR'
elif kind == 'to_table':
_kind = 'PARA MESA'
else:
elif kind == 'delivery':
_kind = 'DOMICILIO'
self._printer.set(custom_size=True, width=2, height=2, align='center')