From 29a3e91a017158771b1f8a6cdb30c257d100cd00 Mon Sep 17 00:00:00 2001 From: rodia Date: Mon, 31 Jul 2023 10:16:25 -0500 Subject: [PATCH] fix: se corrige formato de impresion --- api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api.py b/api.py index 49faf1b..602c982 100644 --- a/api.py +++ b/api.py @@ -29,8 +29,8 @@ def print_bill(data, address): printer.set(align='center', bold=False, height=1, width=1) printer.text(d["shop_name"]+'\n') printer.text(d["shop_address"]+'\n') - printer.set(align='right', bold=False, height=1, width=1) - printer.textln('========================') + printer.set(align='left', bold=False, height=1, width=1) + printer.textln('=======================================') if d['invoice'] and d['invoice']['resolution']: text = "Resolucion de Facturacion # "+str(d['invoice']['resolution']['resolution_number']) \ @@ -44,14 +44,14 @@ def print_bill(data, address): printer.text("Cliente: "+d["party"]+'\n') printer.text("CC/NIT: "+d["tax_identifier_code"]+'\n') printer.text("Direccion: "+d["address"]+'\n') - printer.text('========================\n') + printer.textln('=======================================') printer.ln() for line in d["lines"]: if line['type'] != 'title': text = line['product'] printer.text(text) printer.ln() - text = "cant: " + str(line['quantity']) +" "+ line["uom"] + " $" + line["unit_price"] +"\n" + text = str(line['quantity']) +" "+" $" + line["unit_price"] +"\n" printer.text(text) printer.set(align='right', bold=False, height=1, width=1)