Skip to content

Commit

Permalink
Update Dockerfile to download specific version of fiscalberry and ens…
Browse files Browse the repository at this point in the history
…ure float handling in EscPComandos
  • Loading branch information
alevilar committed Dec 17, 2024
1 parent 6960b49 commit 083a604
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y python3 libstdc++6 cups-client

RUN apt-get update && apt-get install -y wget
RUN wget https://github.com/paxapos/fiscalberry/releases/latest/download/fiscalberry-lin -O /usr/local/bin/fiscalberry-lin

RUN wget https://github.com/paxapos/fiscalberry/releases/download/v1.0.20/fiscalberry-lin -O /usr/local/bin/fiscalberry-lin

RUN chmod +x /usr/local/bin/fiscalberry-lin

Expand Down
4 changes: 2 additions & 2 deletions src/common/EscPComandos.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ def printFacturaElectronica(self, escpos: EscposIO, **kwargs):
alicIva = iva["alic_iva"]
dsIva = pad(f"IVA {alicIva}:", self.desc_cols_ext - 1, " ", "l")
importeIva = iva["importe"]
importeIva = pad(f"{round(importeIva, 2):,.2f}",self.price_cols, " ", "r")
importeIva = pad(f"{round(float(importeIva), 2):,.2f}",self.price_cols, " ", "r")
printer.set(font='a', height=1, align='left', normal_textsize=True)

printer.text(f'{dsIva}{self.signo}{importeIva}\n')

# 7- TOTAL
# Imprimir total
escpos.writelines(f'TOTAL: {self.signo}{round(importeTotal,2):,.2f}', bold=True, align='center', height=2, width=2, double_height=True, double_width=True)
escpos.writelines(f'TOTAL: {self.signo}{round(total,2):,.2f}', bold=True, align='center', height=2, width=2, double_height=True, double_width=True)
printer.ln();


Expand Down

0 comments on commit 083a604

Please sign in to comment.