From 09769153be4388349b83ffeb509dca290acd12c6 Mon Sep 17 00:00:00 2001 From: Gerhard Scheikl Date: Fri, 15 May 2026 16:16:10 +0200 Subject: [PATCH] fix(invoice): drop salutation from PDF (it's an invoice, not a letter) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Hallo,' (DE) / 'Dear Sir or Madam,' (EN) line above the items table was leftover letter framing. Removing it: - reclaims a bit of vertical space at the top of every PDF, and - sidesteps the formal-vs-informal tone debate entirely \u2014 a tax document doesn't need a greeting. The 'Vielen Dank f\u00fcr deine Bestellung. Wir stellen dir hiermit folgendes in Rechnung:' / 'Thank you for your order. We hereby invoice you for the following:' line is kept as it actually introduces the items table. Smoke assertions flipped from 'must contain Hallo,' to 'must NOT contain Hallo, / Sehr geehrte …' so the suppression is enforced in CI. --- app/services/invoice/pdf/InvoiceDocument.tsx | 5 ++++- scripts/render-sample.ts | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/services/invoice/pdf/InvoiceDocument.tsx b/app/services/invoice/pdf/InvoiceDocument.tsx index bed32d0..205da10 100644 --- a/app/services/invoice/pdf/InvoiceDocument.tsx +++ b/app/services/invoice/pdf/InvoiceDocument.tsx @@ -390,7 +390,10 @@ export function InvoiceDocument({ invoice }: DocProps) { : ""} - {t.salutationGeneric} + {/* No salutation here on purpose — this is an invoice, not a + * letter. Dropping the line saves vertical space and avoids + * the formal/informal "Hallo," vs "Dear Sir or Madam" framing + * that doesn't belong on a tax document. */} {t.thankYouLine} diff --git a/scripts/render-sample.ts b/scripts/render-sample.ts index d45f7dc..8a9c24d 100644 --- a/scripts/render-sample.ts +++ b/scripts/render-sample.ts @@ -544,8 +544,11 @@ async function main() { // Informal German tone (du/dein) — make sure no formal "Sie/Ihren" remains // in the strings we control (footer / signature lines come from settings). - assert("DE PDF uses informal salutation 'Hallo,'", deText.includes("Hallo,")); - assert("DE PDF no longer uses 'Sehr geehrte Damen und Herren'", !deText.includes("Sehr geehrte Damen und Herren")); + // The PDF intentionally has NO salutation — this is an invoice, not a + // letter. Both formal ("Sehr geehrte …") and informal ("Hallo,") are + // suppressed. + assert("DE PDF has no 'Hallo,' salutation", !deText.includes("Hallo,")); + assert("DE PDF has no 'Sehr geehrte Damen und Herren' salutation", !deText.includes("Sehr geehrte Damen und Herren")); assert("DE PDF uses informal 'deine Bestellung'", deText.includes("deine Bestellung")); assert( "DE PDF payment-terms uses informal 'überweise … für dich'",