From 489312cab7a2e3f19493db9f543615513da407be Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Mon, 12 Jun 2023 12:51:09 -0400 Subject: [PATCH] fix: don't write notes if empty --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 3898920285666bd6b8f24ca06e5a09a1ec450004..d11030d1c0f50ea9cd7ace94e15fa3f3c5c44938 100644 --- a/main.go +++ b/main.go @@ -110,7 +110,9 @@ var generateCmd = &cobra.Command{ writeRow(&pdf, items[i], q, r) subtotal += float64(q) * r } - writeNotes(&pdf, note) + if note != "" { + writeNotes(&pdf, note) + } writeTotals(&pdf, subtotal, subtotal*tax, subtotal*discount) writeFooter(&pdf, id) output = strings.TrimSuffix(output, ".pdf") + ".pdf"