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;