From d54e9a6ed5b52a443bfb0a29494b98a2474b1bb4 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 24 Mar 2026 08:06:37 +0100 Subject: [PATCH] fix: Adjust header alignment and footer content in PDF receipt generation --- tienda/pdf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tienda/pdf.py b/tienda/pdf.py index 4ba4cea..e830b5b 100644 --- a/tienda/pdf.py +++ b/tienda/pdf.py @@ -6,6 +6,7 @@ import string, random class Recibo(FPDF): def header(self): self.set_font('Arial', 'B', 15) + self.cell(0, 10, "Comercialmeria S.L") self.cell(0, 10, 'RECIBO DE PAGO', ln=True, align='C') self.ln(10) @@ -33,7 +34,7 @@ def generar_recibo(cliente: str, total: float, objetos: list, metodo_pago: str): DATA.append( (str(i["amount"]), str(i["product_name"]), str(i["price"]), str(float(i["price"])*int(i["amount"]))) ) - pdf.cell(0, 10, "DETALLE DEL COBRO", ln=True, align='C') + pdf.cell(0, 10, "DETALLE DEL COBRO", ln=True, align='R') pdf.ln(5) with pdf.table() as table: