Add ticket paper width selector and improve thermal cut/print layout
This commit is contained in:
@@ -100,7 +100,8 @@ def generate_ticket(sale_data, business_info, width=80):
|
||||
buf += 'Gracias por su compra!\n'.encode('cp437', errors='replace')
|
||||
buf += 'Nexus Autoparts POS\n'.encode('cp437', errors='replace')
|
||||
buf += b'\n\n\n'
|
||||
buf += PARTIAL_CUT
|
||||
buf += FEED + b'\x05' # Feed 5 lines before cutting
|
||||
buf += CUT # Full cut
|
||||
|
||||
return bytes(buf)
|
||||
|
||||
@@ -187,7 +188,8 @@ def generate_quotation_ticket(quote_data, business_info, width=80):
|
||||
buf += 'Precios sujetos a disponibilidad\n'.encode('cp437', errors='replace')
|
||||
buf += 'Nexus Autoparts POS\n'.encode('cp437', errors='replace')
|
||||
buf += b'\n\n\n'
|
||||
buf += PARTIAL_CUT
|
||||
buf += FEED + b'\x05'
|
||||
buf += CUT
|
||||
|
||||
return bytes(buf)
|
||||
|
||||
@@ -338,6 +340,7 @@ def generate_service_order_ticket(so_data, business_info, width=80):
|
||||
buf += "No es comprobante fiscal\n".encode("cp437", errors="replace")
|
||||
buf += "Nexus Autoparts POS\n".encode("cp437", errors="replace")
|
||||
buf += b"\n\n\n"
|
||||
buf += PARTIAL_CUT
|
||||
buf += FEED + b'\x05'
|
||||
buf += CUT
|
||||
|
||||
return bytes(buf)
|
||||
|
||||
Reference in New Issue
Block a user