feat: Add transaction code generation for orders and update receipt templates

This commit is contained in:
2026-04-09 08:51:12 +02:00
parent a570c542c2
commit a3eae63587
7 changed files with 76 additions and 10 deletions
+2 -1
View File
@@ -15,7 +15,7 @@ class Recibo(FPDF):
self.set_font('Arial', 'I', 8)
self.cell(0, 10, f'Pagina {self.page_no()}', align='C')
def generar_recibo(cliente: str, total: float, objetos: list, metodo_pago: str):
def generar_recibo(cliente: str, total: float, objetos: list, metodo_pago: str, transaction_code: str):
pdf = Recibo()
font_path = "/fonts/Roboto-Regular.ttf"
pdf.add_font('Roboto', '', '/fonts/Roboto-Regular.ttf')
@@ -24,6 +24,7 @@ def generar_recibo(cliente: str, total: float, objetos: list, metodo_pago: str):
pdf.set_font('Roboto', size=12)
pdf.cell(0, 10, f"Cliente: {cliente}", ln=True)
pdf.cell(0, 10, f"ID de transaccion: {transaction_code}", ln=True)
pdf.cell(0, 10, f"")
DATA = []