fix(email,ui): billing emails follow customer language + readable payment-check confirmation#763
Conversation
…ment-check confirmation - Billing/dunning emails no longer render in the gallery event's language. emailProcessor now honors an explicit `__language` in the email data (else falls back to the event-first recipient resolution), and the invoice reminder passes the customer/invoice locale (customer.preferred_language || invoice.language || 'de'). Fixes German customers getting English dunning notices. (PicPeak#760) - Payment-check confirmation card ("Action recorded") is now theme-adaptive (green tint + readable text on both light and dark surfaces) instead of a hardcoded light-green mix + dark-green title that vanished in dark mode. (PicPeak#759) - The per-customer "Preferred language" field already exists (CustomerDetailPage) plus the business-profile default; updated the helper text to note billing emails now honor it too. (PicPeak#761)
|
Verified the whole chain — the fix is correct.
One gap worth closing in the same PR — the sibling billing emails have the identical event-first bug and don't set
Each already computes the locale, so it's a one-liner per call: Otherwise merge cleared. |
Addresses the PR PicPeak#763 review: the invoice_sent / storno_issued / payment-check / paid-admin-notification emails share the identical event-first language bug and never set __language, so a German customer on an English-gallery event got an English email body with German-formatted amounts. Each call site already computes the locale it formats amounts in, so this is a one-liner per call — the body language now matches the amount formatting: - invoice_sent, storno_issued (sending.js) -> __language: ctx.locale - payment-check, invoice_paid_admin_notification (payments.js) -> __language: locale Leak-safe (no template references {{__language}}) and falls back to the existing event-first resolution when unset, per the mechanism added in PicPeak#763.
|
@the-luap Folded in — c0008be. All the sibling billing emails now set
Leak-safe (nothing references |
|
Re-verified c0008be. All four sibling emails now carry
Swept the invoice Merge cleared. |
Fixes three issues found while testing the invoice-dunning flow. Tested on the dev instance.
#760 — billing/dunning emails used the event's gallery language
emailProcessor.getRecipientLanguage()resolves language event-first, so an invoice tied to an English-gallery event sent the customer an English dunning email even for a German customer/invoice.emailProcessornow honors an explicit__languagein the email data (both the queue-processor and preview paths); otherwise it falls back to the existing event-first resolution — no change for gallery emails.invoice/reminders.js) resolves the locale ascustomer.preferred_language || invoice.language || 'de'and passes it as__language.#759 — payment-check confirmation card unreadable in dark mode
The "Action recorded" card hardcoded a dark-green title over a light-green

color-mixbackground — muddy + illegible on dark surfaces. Now theme-adaptive: a green tint over--color-surfacewith--color-texttitle/body, readable on both light and dark.#761 — per-customer language
The per-customer "Preferred language" dropdown already exists (
CustomerDetailPage), as does the global business-profile default. The gap was that emails ignored it (#760). Updated the field's helper text (en + de) to note billing emails now honor it.Fixes #759, #760, #761.