fix: don't write notes if empty

Maas Lalani created

Change summary

main.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

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"