Add legalForm-driven Pflichtangaben (register court/number, managing director)

Mirrors the Payload backend's new company-settings.legalForm field: when
present, registerCourt/registerNumber/managingDirector now appear in the
email footer (buildLegalFooterLines) and both invoice PDF footers,
matching §37a HGB / §35a GmbHG requirements for registered legal forms.
A sole proprietorship (the default) renders identically to before —
these fields are only appended when actually set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Marco
2026-07-22 15:09:43 +00:00
parent d7e7928dfc
commit 07c70c86f5
5 changed files with 39 additions and 4 deletions
+7
View File
@@ -645,6 +645,13 @@ export async function getEmailTemplate(
export type CompanySettings = {
sellerName: string;
// Drives whether registerCourt/registerNumber/managingDirector are
// populated — mirrors Payload's CompanySettings.ts collection exactly
// (same option values), see buildLegalFooterLines() in emailTemplates.ts.
legalForm: "sole-proprietorship" | "e-k" | "gbr" | "ohg" | "kg" | "gmbh" | "ug" | "ag";
registerCourt: string | null;
registerNumber: string | null;
managingDirector: string | null;
sellerStreet: string;
sellerZip: string;
sellerCity: string;