From d8126e254ded790e3f2dc2b274ca866ba8d4d936 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 24 Sep 2026 17:49:24 +0200 Subject: [PATCH] BusinessDocument: Do not show billing address name when UseBillingAddress is false --- Elwig/Documents/BusinessDocument.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Elwig/Documents/BusinessDocument.cs b/Elwig/Documents/BusinessDocument.cs index b09108a..3399758 100644 --- a/Elwig/Documents/BusinessDocument.cs +++ b/Elwig/Documents/BusinessDocument.cs @@ -30,7 +30,7 @@ namespace Elwig.Documents { get { IAddress addr = (Member.BillingAddress != null && UseBillingAddress) ? Member.BillingAddress : Member; var plz = addr.PostalDest.AtPlz; - return string.Join("\n", ((string?[])[Member.BillingAddress?.FullName, Member.AdministrativeName, Member.ForTheAttentionOf, addr.Address, $"{plz?.Plz} {plz?.Ort.Name.Split(",")[0]}", addr.PostalDest.Country.Name]).Where(s => !string.IsNullOrWhiteSpace(s))); + return string.Join("\n", ((string?[])[addr is BillingAddr ? addr.FullName : null, Member.AdministrativeName, Member.ForTheAttentionOf, addr.Address, $"{plz?.Plz} {plz?.Ort.Name.Split(",")[0]}", addr.PostalDest.Country.Name]).Where(s => !string.IsNullOrWhiteSpace(s))); } }