From 3d4b8762e53959a7778e0365d3775dc426a971e1 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Sun, 18 Jan 2026 14:47:45 -0700 Subject: [PATCH] Oops --- src/pdf/generateInvoicePDF.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/pdf/generateInvoicePDF.ts b/src/pdf/generateInvoicePDF.ts index 47a002d..b0f954d 100644 --- a/src/pdf/generateInvoicePDF.ts +++ b/src/pdf/generateInvoicePDF.ts @@ -15,6 +15,11 @@ interface InvoiceItem { interface Client { name: string; email: string | null; + street: string | null; + city: string | null; + state: string | null; + zip: string | null; + country: string | null; } interface Organization { @@ -154,6 +159,11 @@ const styles = { fontSize: 10, color: "#6B7280", } as Style, + clientAddress: { + fontSize: 10, + color: "#6B7280", + lineHeight: 1.5, + } as Style, table: { marginBottom: 40, } as Style, @@ -399,6 +409,28 @@ export function createInvoiceDocument(props: InvoiceDocumentProps) { [ h(Text, { style: styles.sectionLabel }, "Bill To"), h(Text, { style: styles.clientName }, client.name), + client.street || + client.city || + client.state || + client.zip || + client.country + ? h( + View, + { style: styles.clientAddress }, + [ + client.street ? h(Text, client.street) : null, + client.city || client.state || client.zip + ? h( + Text, + [client.city, client.state, client.zip] + .filter(Boolean) + .join(", "), + ) + : null, + client.country ? h(Text, client.country) : null, + ].filter(Boolean), + ) + : null, client.email ? h(Text, { style: styles.clientEmail }, client.email) : null,