From 83f24908702d3f74218c3b86756b3ead5abb90c9 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Wed, 20 Mar 2024 17:15:52 +0100 Subject: [PATCH] change the pdf filenames --- internal/server/handle_pdf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/server/handle_pdf.go b/internal/server/handle_pdf.go index c9867fc..b72fcd5 100644 --- a/internal/server/handle_pdf.go +++ b/internal/server/handle_pdf.go @@ -27,7 +27,7 @@ func handleCreateInvoicePdf(bs *booking.Service, ps *pdf.PdfService, hc *config. if err != nil { return err } - return c.Attachment("tmp.pdf", "tmp.pdf") + return c.Attachment("tmp.pdf", fmt.Sprintf("VFNI-%s.pdf", b.InvoiceNumber(hc))) } } @@ -65,6 +65,6 @@ func handleCreateReportPdf(bs *booking.Service, ps *pdf.PdfService) echo.Handler return err } - return c.Attachment("tmp.pdf", "tmp.pdf") + return c.Attachment("tmp.pdf", fmt.Sprintf("VF-%02d-report.pdf", month)) } }