fix: se corrige formato de impresion
This commit is contained in:
parent
3e97d453b9
commit
29a3e91a01
8
api.py
8
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)
|
||||
|
Loading…
Reference in New Issue
Block a user