Se añade descripción a las lineas

This commit is contained in:
root 2023-09-04 01:17:49 +00:00
parent 74cdc8693e
commit a974acc623
1 changed files with 6 additions and 1 deletions

7
api.py
View File

@ -31,7 +31,8 @@ def print_bill(data, address, waiter):
printer.text(d["shop_address"]+'\n')
printer.set(align='left', bold=False, height=1, width=1)
printer.textln('===============================================')
text = d['state']
printer.textln(text)
if d['invoice'] and d['invoice']['resolution']:
text = "Resolucion de Facturacion # " + \
str(d['invoice']['resolution']['resolution_number']) \
@ -139,6 +140,10 @@ def print_customer_order(data, address, waiter):
text = line['product'] + " " + str(line['quantity']) + "\n"
printer.text(text)
if line['description']:
text = line['description'] + "\n"
printer.text(text)
if pizza == 2:
printer.ln()
pizza = 0