From 4cd80d7cd3e4e8654eaa59022e321fc01cfcafc8 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Tue, 2 Jun 2026 15:24:57 +0200 Subject: [PATCH] InvoiceCustomerRO - Fix der Anrede, falls bei Rechnungsadresse Name gesetzt ist ToDoOID=952736724 --- Report/ReportObjects/InvoiceCustomerRO.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Report/ReportObjects/InvoiceCustomerRO.cs b/Report/ReportObjects/InvoiceCustomerRO.cs index f88246536..97a9f4de1 100644 --- a/Report/ReportObjects/InvoiceCustomerRO.cs +++ b/Report/ReportObjects/InvoiceCustomerRO.cs @@ -131,14 +131,6 @@ namespace BeWo.Report.ReportObjects if (p != null) { result.RecipientSalutationAddressField = p.Sex == Sex.Male ? "Herr" : "Frau"; - - if (p.InvoiceAddress != null && !String.IsNullOrEmpty(p.InvoiceAddress.AddressLine1)) - { - result.RecipientFirstName = p.InvoiceAddress.AddressLine1; - result.RecipientLastName = ""; - } - //else - //{ if (p.Sex == Sex.Male) { result.RecipientSalutationAddressField = "Herrn"; @@ -154,16 +146,21 @@ namespace BeWo.Report.ReportObjects result.RecipientSalutationAddressField = ""; result.RecipientSalutation = "Guten Tag " + p.FirstName + " " + p.LastName + ","; } - - //} if (p.Sex == Sex.Male) result.CustomerSalutation = "Herr"; else if (p.Sex == Sex.Female) result.CustomerSalutation = "Frau"; else result.CustomerSalutation = ""; + if (p.InvoiceAddress != null && !String.IsNullOrEmpty(p.InvoiceAddress.AddressLine1)) + { + result.RecipientFirstName = p.InvoiceAddress.AddressLine1; + result.RecipientLastName = ""; + result.RecipientSalutationAddressField = ""; + result.RecipientSalutation = "Guten Tag " + result.RecipientFirstName; + } - if (p.Address != null) + if (p.Address != null) { result.CustomerStreet = p.Address.Street; result.CustomerTown = p.Address.Town;