/** * Default invoice email templates per language and per payment state. Used * when the user hasn't customised them in settings. Variables * ({{invoiceNumber}}, etc.) are substituted by `renderTemplate` at send time. * * There are two body variants per language: * - "unpaid": includes the bank-transfer payment-reference hint. * - "paid": identical but with the bank-transfer hint removed (the order * is already settled, so asking for a transfer reference would * be confusing). * * The shop logo is rendered as an inline attachment with content-id * `invoice-logo`; the email sender attaches the logo bytes automatically * when the template (or any custom template) references that cid. */ const DE_HEAD = `\
Die Rechnung befindet sich im Anhang.
`; const DE_FOOT = `\
Bei Überweisung bitte die Rechnungs-Nummer als Referenz verwenden:
{{invoiceNumber}}
Besten Dank!
Besten Dank!
`; const EN_HEAD = `\Please find the invoice attached.
`; const EN_FOOT = `\
When paying by bank transfer, please use the invoice number as the reference:
{{invoiceNumber}}
Thanks a lot!
Thanks a lot!
`; // Unpaid (outstanding) bodies — keep the bank-transfer reference hint. const DE_HTML_UNPAID = `${DE_HEAD}\n${DE_PAYMENT_HINT}\n${DE_FOOT}`; const EN_HTML_UNPAID = `${EN_HEAD}\n${EN_PAYMENT_HINT}\n${EN_FOOT}`; // Paid bodies — bank-transfer hint removed. const DE_HTML_PAID = `${DE_HEAD}\n${DE_PAID_NOTE}\n${DE_FOOT}`; const EN_HTML_PAID = `${EN_HEAD}\n${EN_PAID_NOTE}\n${EN_FOOT}`; export const DEFAULT_EMAIL_SUBJECT_DE = "Rechnung {{invoiceNumber}} – {{companyName}}"; export const DEFAULT_EMAIL_SUBJECT_EN = "Invoice {{invoiceNumber}} – {{companyName}}"; // Backwards-compatible aliases (these are the "unpaid" variants, matching the // historical single-template behaviour). export const DEFAULT_EMAIL_BODY_DE = DE_HTML_UNPAID; export const DEFAULT_EMAIL_BODY_EN = EN_HTML_UNPAID; export const DEFAULT_EMAIL_BODY_DE_UNPAID = DE_HTML_UNPAID; export const DEFAULT_EMAIL_BODY_EN_UNPAID = EN_HTML_UNPAID; export const DEFAULT_EMAIL_BODY_DE_PAID = DE_HTML_PAID; export const DEFAULT_EMAIL_BODY_EN_PAID = EN_HTML_PAID;