From a44865bb048f2c0ae2cd148bafe4ea3705bffb53 Mon Sep 17 00:00:00 2001 From: HirschleM Date: Mon, 6 Jul 2026 11:01:54 +0200 Subject: [PATCH] MH: HW Hilfswerk Sammelrechnung angepasst SupportOID=167176 --- .../Invoicing/CustomInvoiceCreation.cs | 29 +++++++++++++++++++ .../ServiceInvoiceReport.Designer.cs | 19 ++++++------ 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/ReportImp/HwHilfswerkInklusionUndTeilhabe/Invoicing/CustomInvoiceCreation.cs b/ReportImp/HwHilfswerkInklusionUndTeilhabe/Invoicing/CustomInvoiceCreation.cs index acfba48e3..f5afda13f 100644 --- a/ReportImp/HwHilfswerkInklusionUndTeilhabe/Invoicing/CustomInvoiceCreation.cs +++ b/ReportImp/HwHilfswerkInklusionUndTeilhabe/Invoicing/CustomInvoiceCreation.cs @@ -1,5 +1,7 @@ using BeWo.Data.Entities; using BeWo.Service.Invoicing; +using BS.Shared.DataContracts; +using BS.Shared.Services; using System; using System.Collections.Generic; using System.Linq; @@ -10,6 +12,33 @@ namespace HwHilfswerkInklusionUndTeilhabe.Invoicing { public class CustomInvoiceCreation : InvoiceCreation { + public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc) + { + var item = base.CreateInvoiceItem(iServiceRecord, scap, calc); + + if (iServiceRecord.ServiceDescription.CategoryName != "" && iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("autismus")) + { + item.ItemDescription = "Autismustherapie"; + } + else if (iServiceRecord.ServiceDescription.CategoryName != "" && iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("fachleistung")) + { + item.ItemDescription = "Fachleistung"; + } + else if (iServiceRecord.ServiceDescription.CategoryName != "" && iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("sozialassistenz")) + { + item.ItemDescription = "Sozialassistenz"; + } + else if (iServiceRecord.ServiceDescription.CategoryName != "" && iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("einfache assistenz")) + { + item.ItemDescription = "Einfache Assistenz"; + } + else if (iServiceRecord.ServiceDescription.CategoryName != "" && iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("hintergrunddienst")) + { + item.ItemDescription = "Hintergrunddienst"; + } + + return item; + } public override string GetSummaryItemKey(SupportConceptApprovalPeriod scap, InvoiceItem iitem, bool summaryPerMonth) { String key = String.Format("{0:0.0000}_{1}_{2}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemDescription); diff --git a/ReportImp/HwHilfswerkInklusionUndTeilhabe/ServiceInvoiceReport.Designer.cs b/ReportImp/HwHilfswerkInklusionUndTeilhabe/ServiceInvoiceReport.Designer.cs index 85de2180a..67c965238 100644 --- a/ReportImp/HwHilfswerkInklusionUndTeilhabe/ServiceInvoiceReport.Designer.cs +++ b/ReportImp/HwHilfswerkInklusionUndTeilhabe/ServiceInvoiceReport.Designer.cs @@ -40,6 +40,7 @@ namespace BeWo.Report.DefaultReports this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.xrLine1 = new DevExpress.XtraReports.UI.XRLine(); this.xrRichText5 = new DevExpress.XtraReports.UI.XRRichText(); this.xrRichText4 = new DevExpress.XtraReports.UI.XRRichText(); this.xrRichText3 = new DevExpress.XtraReports.UI.XRRichText(); @@ -70,7 +71,6 @@ namespace BeWo.Report.DefaultReports this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLine1 = new DevExpress.XtraReports.UI.XRLine(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrRichText5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText4)).BeginInit(); @@ -149,6 +149,12 @@ namespace BeWo.Report.DefaultReports this.bottomMarginBand1.HeightF = 77.25004F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // + // xrLine1 + // + this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLine1.Name = "xrLine1"; + this.xrLine1.SizeF = new System.Drawing.SizeF(701.8572F, 11.54168F); + // // xrRichText5 // this.xrRichText5.Font = new DevExpress.Drawing.DXFont("Arial", 8F); @@ -198,9 +204,10 @@ namespace BeWo.Report.DefaultReports this.xrLabel7.Multiline = true; this.xrLabel7.Name = "xrLabel7"; this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel7.SizeF = new System.Drawing.SizeF(244.0836F, 63.12501F); + this.xrLabel7.SizeF = new System.Drawing.SizeF(244.0836F, 129.2083F); this.xrLabel7.StylePriority.UseFont = false; - this.xrLabel7.Text = "Aktenzeichen: [CustomerReferenceNumber]\r\n\r\nLeistungszeitraum: [AccountingPeriod]"; + this.xrLabel7.Text = "Aktenzeichen: [CustomerReferenceNumber]\r\n\r\nName, Vorname:\r\n[CustomerLastName], [C" + + "ustomerFirstName]\r\n\r\nLeistungszeitraum: [AccountingPeriod]"; // // lblAdresse // @@ -562,12 +569,6 @@ namespace BeWo.Report.DefaultReports this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrLabel1.TextFormatString = "{0}"; // - // xrLine1 - // - this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); - this.xrLine1.Name = "xrLine1"; - this.xrLine1.SizeF = new System.Drawing.SizeF(701.8572F, 11.54168F); - // // bindingSource1 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);