From e45d6e4734feac61c59f6fcf25cf9c1f57d1e445 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 12 Dec 2024 12:13:49 +0100 Subject: [PATCH] ArcheTecklenburg/RechnungBesWohnformen.cs - Formate in Adresse und Aktenzeichen --- .../RechnungBesWohnformen.Designer.cs | 2 + .../ArcheTecklenburg/RechnungBesWohnformen.cs | 37 ++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.Designer.cs b/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.Designer.cs index 4f3a205b7..20c08eae1 100644 --- a/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.Designer.cs +++ b/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.Designer.cs @@ -406,6 +406,8 @@ namespace ArcheTecklenburg // // lblZad // + this.lblZad.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "BusinessPartnerId")}); this.lblZad.Font = new DevExpress.Drawing.DXFont("calibri", 10F); this.lblZad.LocationFloat = new DevExpress.Utils.PointFloat(1.041762F, 204.5833F); this.lblZad.Multiline = true; diff --git a/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.cs b/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.cs index 63c0c5f0d..3ff5e6668 100644 --- a/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.cs +++ b/ReportImp/ArcheTecklenburg/RechnungBesWohnformen.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using BS.Shared.DataContracts.Compact; using BS.Shared.DataContracts; using BS.Shared.Extensions; +using System.Text; namespace ArcheTecklenburg { @@ -22,9 +23,43 @@ namespace ArcheTecklenburg // Der LWL bekommt Rechnung plus Liste mit den Abwesenheiten public void SetReportDataSource(ServiceInvoiceRO pRO) { + var sb = new StringBuilder(); + if (!String.IsNullOrEmpty(pRO.RecipientOrganisation)) + { + sb.AppendLine(pRO.RecipientOrganisation); + } + if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1)) + { + sb.AppendLine(pRO.RecipientAddressLine1); + } + if (!String.IsNullOrEmpty(pRO.RecipientDivision)) + { + sb.AppendLine(pRO.RecipientDivision); + } + + if (!String.IsNullOrEmpty(pRO.RecipientContactPerson) && pRO.RecipientContactPerson != pRO.RecipientOrganisation) + { + sb.AppendLine(pRO.RecipientContactPerson); + } + if (!String.IsNullOrEmpty(pRO.RecipientPoBox)) + { + sb.AppendLine(pRO.RecipientPoBox); + } + + if (!String.IsNullOrEmpty(pRO.RecipientStreet) && String.IsNullOrEmpty(pRO.RecipientPoBox)) + { + sb.AppendLine(pRO.RecipientStreet); + } + + if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown)) + { + sb.AppendLine(pRO.RecipientPostCodeAndTown); + } + + lblAdresse.Text = sb.ToString(); + if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !pRO.RecipientOrganisation.Contains("LWL")) { - lblZad.Visible = false; if (pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept.CostBearerContactPerson != null) { pRO.RecipientAddressLine1 = String.Format("z.Hd. {0}", pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept.CostBearerContactPerson.FirstNameLastName);