fix(invoice): drop salutation from PDF (it's an invoice, not a letter)
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.
This commit is contained in:
@@ -390,7 +390,10 @@ export function InvoiceDocument({ invoice }: DocProps) {
|
|||||||
: ""}
|
: ""}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text style={styles.paragraph}>{t.salutationGeneric}</Text>
|
{/* 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. */}
|
||||||
<Text style={styles.paragraph}>{t.thankYouLine}</Text>
|
<Text style={styles.paragraph}>{t.thankYouLine}</Text>
|
||||||
|
|
||||||
<View style={styles.table}>
|
<View style={styles.table}>
|
||||||
|
|||||||
@@ -544,8 +544,11 @@ async function main() {
|
|||||||
|
|
||||||
// Informal German tone (du/dein) — make sure no formal "Sie/Ihren" remains
|
// Informal German tone (du/dein) — make sure no formal "Sie/Ihren" remains
|
||||||
// in the strings we control (footer / signature lines come from settings).
|
// in the strings we control (footer / signature lines come from settings).
|
||||||
assert("DE PDF uses informal salutation 'Hallo,'", deText.includes("Hallo,"));
|
// The PDF intentionally has NO salutation — this is an invoice, not a
|
||||||
assert("DE PDF no longer uses 'Sehr geehrte Damen und Herren'", !deText.includes("Sehr geehrte Damen und Herren"));
|
// 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 uses informal 'deine Bestellung'", deText.includes("deine Bestellung"));
|
||||||
assert(
|
assert(
|
||||||
"DE PDF payment-terms uses informal 'überweise … für dich'",
|
"DE PDF payment-terms uses informal 'überweise … für dich'",
|
||||||
|
|||||||
Reference in New Issue
Block a user