diff --git a/internal/erpsetup/branding.go b/internal/erpsetup/branding.go index 65dd635..bd20ffd 100644 --- a/internal/erpsetup/branding.go +++ b/internal/erpsetup/branding.go @@ -99,7 +99,7 @@ func emailTemplateDoc() map[string]any { return map[string]any{ "doctype": "Email Template", "name": emailTemplateRE, "enabled": 1, "reference_doctype": "Sales Invoice", - "subject": "Rechnung {{ name }} – BreakPilot", + "subject": "Rechnung {{ name }} – Breakpilot", "use_html": 1, "response_html": invoiceMailHTML, } } @@ -132,7 +132,7 @@ func logoFileDoc() map[string]any { } } -const logoSVG = `BreakPilot` +const logoSVG = `Breakpilot` // Shared Jinja: the company's own address and its bank account. const companyVars = `{%- set bp_addr = frappe.db.get_value("Address", {"is_your_company_address": 1, "is_primary_address": 1, "disabled": 0}, ["address_line1", "pincode", "city", "email_id"], as_dict=1) or {"address_line1": "In Steinäckern 16", "pincode": "78351", "city": "Bodman-Ludwigshafen", "email_id": "kontakt@breakpilot.com"} -%} @@ -370,7 +370,7 @@ var invoiceMailHTML = brand.Replace(`
Mit freundlichen Grüßen
-
Ihr BreakPilot-Team
+
Ihr Breakpilot-Team
{{ company }}
In Steinäckern 16, 78351 Bodman-Ludwigshafen
kontakt@breakpilot.com · www.breakpilot.com
diff --git a/internal/erpsetup/erpsetup_test.go b/internal/erpsetup/erpsetup_test.go index 15c960d..ab49204 100644 --- a/internal/erpsetup/erpsetup_test.go +++ b/internal/erpsetup/erpsetup_test.go @@ -794,3 +794,18 @@ func TestQuoteNamesLBVersions(t *testing.T) { t.Error("Prüfwerk Standard description does not name the code graph (LB Prüfwerk 1.0.3 § 4 Abs. 4)") } } + +// What customers read is spelled "Breakpilot": the documents, the letter +// head and footer, and the invoice e-mail with its subject. ERPNext record +// names (print formats, letter head, item group) keep the old spelling, +// because renaming them would create new records. +func TestCustomerTextSpellsBreakpilot(t *testing.T) { + for name, s := range map[string]string{ + "document": documentHTML, "letter head": letterHeadHTML, "letter footer": letterFooterHTML, + "invoice mail": invoiceMailHTML, "logo": logoSVG, "mail subject": emailTemplateDoc()["subject"].(string), + } { + if strings.Contains(s, "BreakPilot") { + t.Errorf("%s still spells BreakPilot", name) + } + } +}