Skip to content

Commit

Permalink
Update release tag to v1.0.15 and enhance printer settings in EscPCom…
Browse files Browse the repository at this point in the history
…andos
  • Loading branch information
alevilar committed Nov 7, 2024
1 parent 1061e59 commit 98b3457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/desktop.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.14
release_name: Release v1.0.14
tag_name: v1.0.15
release_name: Release v1.0.15
draft: false
prerelease: false

Expand Down
11 changes: 6 additions & 5 deletions src/common/EscPComandos.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,12 @@ def printComanda(self, escpos: EscposIO, comanda, setHeader=None, setTrailer=Non

self.__initPrinter(printer)

printer.set(font='a', height=1, align='center', normal_textsize=True)
printer.set(font='a', height=1, width=1, align='center', normal_textsize=True)

if setHeader:
for headerLine in setHeader:
printer.text(headerLine)
printer.text("\n\n")
printer.textln(headerLine)
printer.text("\n\n")

if "id" in comanda:
printer.text(f"Comanda #{comanda['id']}\n")
Expand All @@ -674,12 +674,13 @@ def printComanda(self, escpos: EscposIO, comanda, setHeader=None, setTrailer=Non

def print_plato(plato):
"Imprimir platos"
printer.set(font='a', bold=True, height=2, width=2, align='left', double_height=True, double_width=True)
printer.set(font='a', bold=False, height=2, width=2, align='left', double_height=True, double_width=False)

printer.text(f"{plato['cant']}) {plato['nombre']}")

if 'sabores' in plato:
printer.text(f"[{', '.join(plato['sabores'])}]s")
for sabor in plato['sabores']:
printer.text(f" - {sabor}\n")

printer.text("\n")

Expand Down

0 comments on commit 98b3457

Please sign in to comment.