From 65104bfa34b21dcaa4d5b42397496e217315378d Mon Sep 17 00:00:00 2001 From: Marcel Hirschle Date: Fri, 27 Oct 2023 14:11:05 +0200 Subject: [PATCH] MH: Alzey Rechnungserstellung --- ReportImp/AlzeyTeilhabe/RechnungPa.Designer.cs | 12 ++++++------ ReportImp/AlzeyTeilhabe/RechnungPa.cs | 2 ++ .../AlzeyTeilhabe/Service/CustomSaveInterceptor.cs | 10 +++++++++- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ReportImp/AlzeyTeilhabe/RechnungPa.Designer.cs b/ReportImp/AlzeyTeilhabe/RechnungPa.Designer.cs index 27cd63509..fc0a3c26b 100644 --- a/ReportImp/AlzeyTeilhabe/RechnungPa.Designer.cs +++ b/ReportImp/AlzeyTeilhabe/RechnungPa.Designer.cs @@ -87,11 +87,11 @@ namespace AlzeyTeilhabe this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit(); @@ -569,7 +569,7 @@ namespace AlzeyTeilhabe // lblAdresse // this.lblAdresse.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 172.6059F); + this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 166.6059F); this.lblAdresse.Multiline = true; this.lblAdresse.Name = "lblAdresse"; this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -693,6 +693,10 @@ namespace AlzeyTeilhabe this.GroupFooter1.Name = "GroupFooter1"; this.GroupFooter1.StylePriority.UseFont = false; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); + // // xrLabel10 // this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0.00111262F, 46.4584F); @@ -753,10 +757,6 @@ namespace AlzeyTeilhabe this.ReportFooter.HeightF = 142.7083F; this.ReportFooter.Name = "ReportFooter"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); - // // RechnungPa // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { diff --git a/ReportImp/AlzeyTeilhabe/RechnungPa.cs b/ReportImp/AlzeyTeilhabe/RechnungPa.cs index f610fff93..9a1c5183a 100644 --- a/ReportImp/AlzeyTeilhabe/RechnungPa.cs +++ b/ReportImp/AlzeyTeilhabe/RechnungPa.cs @@ -20,6 +20,8 @@ namespace AlzeyTeilhabe if (!String.IsNullOrEmpty(pRO.RecipientOrganisation)) { + if (pRO.RecipientOrganisation.ToLower().Contains("ikk südwest")) + pRO.RecipientOrganisation = pRO.RecipientAddressLine1; sb.AppendLine(pRO.RecipientOrganisation); } if (!String.IsNullOrEmpty(pRO.RecipientContactPerson)) diff --git a/ReportImp/AlzeyTeilhabe/Service/CustomSaveInterceptor.cs b/ReportImp/AlzeyTeilhabe/Service/CustomSaveInterceptor.cs index e4428ef8b..219cda54f 100644 --- a/ReportImp/AlzeyTeilhabe/Service/CustomSaveInterceptor.cs +++ b/ReportImp/AlzeyTeilhabe/Service/CustomSaveInterceptor.cs @@ -13,7 +13,15 @@ namespace AlzeyTeilhabe.Service public override void BeforeSaveServiceRecord(ServiceRecord sr) { if (sr.ServiceDescription.ServiceCategory.Name.ToLower().Contains("soziotherapie")) - sr.DistanceInMeter = sr.Customer.DistanceInMeter; + { + if (sr.ServiceDescription.Name.ToLower().Contains("fahrtkosten") && sr.Customer.DistanceInMeter != null) + sr.DistanceInMeter = sr.Customer.DistanceInMeter * 2; + else + sr.DistanceInMeter = null; + + } + else + sr.DistanceInMeter = null; } } }