ArcheTecklenburg/RechnungBesWohnformen.cs - Formate in Adresse und Aktenzeichen

This commit is contained in:
2024-12-12 12:13:49 +01:00
parent c7e0a0ed27
commit e45d6e4734
2 changed files with 38 additions and 1 deletions

View File

@@ -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;

View File

@@ -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);