From 0487fea7640abfd2901f44fc44a9acf295255feb Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 21 Feb 2024 16:19:49 +0100 Subject: [PATCH] =?UTF-8?q?LandshuterNetzwerk/Invoicing/CustomInvoiceNumbe?= =?UTF-8?q?rGenerator=20-=20Angepasst=20f=C3=BCr=20Eigenanteil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InvoiceCustomerReport.Designer.cs | 28 +------------------ .../Invoicing/CustomInvoiceNumberGenerator.cs | 16 ++++++++--- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/ReportImp/LandshuterNetzwerk/InvoiceCustomerReport.Designer.cs b/ReportImp/LandshuterNetzwerk/InvoiceCustomerReport.Designer.cs index 0df3e8476..4bf1aafcc 100644 --- a/ReportImp/LandshuterNetzwerk/InvoiceCustomerReport.Designer.cs +++ b/ReportImp/LandshuterNetzwerk/InvoiceCustomerReport.Designer.cs @@ -73,8 +73,6 @@ namespace LandshuterNetzwerk this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); this.xrTable4 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow11 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -642,11 +640,9 @@ namespace LandshuterNetzwerk // this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel15, - this.xrLabel10, - this.xrLabel12, this.xrTable4}); this.ReportFooter.Font = new System.Drawing.Font("Verdana", 10F); - this.ReportFooter.HeightF = 247.5417F; + this.ReportFooter.HeightF = 148.5833F; this.ReportFooter.KeepTogether = true; this.ReportFooter.Name = "ReportFooter"; this.ReportFooter.StylePriority.UseFont = false; @@ -663,26 +659,6 @@ namespace LandshuterNetzwerk this.xrLabel15.Text = "Wir bitten um Überweisung auf eines der unten genannten Konten unter Angabe des T" + "itels \"Betreuungskosten [CustomerLastName]\" und der Rechnungsnummer [InvoiceNumb" + "er]"; - // - // xrLabel10 - // - this.xrLabel10.Font = new System.Drawing.Font("Arial", 10F); - this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 126.3751F); - this.xrLabel10.Name = "xrLabel10"; - this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel10.SizeF = new System.Drawing.SizeF(175F, 17F); - this.xrLabel10.StylePriority.UseFont = false; - this.xrLabel10.Text = "Mit freundlichen Grüßen"; - // - // xrLabel12 - // - this.xrLabel12.Font = new System.Drawing.Font("Arial", 10F); - this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(0F, 176.3751F); - this.xrLabel12.Name = "xrLabel12"; - this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel12.SizeF = new System.Drawing.SizeF(292F, 17.00002F); - this.xrLabel12.StylePriority.UseFont = false; - this.xrLabel12.Text = "[CreatorFirstName] [CreatorLastName]"; // // xrTable4 // @@ -901,8 +877,6 @@ namespace LandshuterNetzwerk private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; private DevExpress.XtraReports.UI.XRLabel xrLabel5; private DevExpress.XtraReports.UI.ReportFooterBand ReportFooter; - private DevExpress.XtraReports.UI.XRLabel xrLabel12; - private DevExpress.XtraReports.UI.XRLabel xrLabel10; private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull; private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; diff --git a/ReportImp/LandshuterNetzwerk/Invoicing/CustomInvoiceNumberGenerator.cs b/ReportImp/LandshuterNetzwerk/Invoicing/CustomInvoiceNumberGenerator.cs index 4fbc90975..f063e0ae2 100644 --- a/ReportImp/LandshuterNetzwerk/Invoicing/CustomInvoiceNumberGenerator.cs +++ b/ReportImp/LandshuterNetzwerk/Invoicing/CustomInvoiceNumberGenerator.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Service.Invoicing; using BeWo.Service.Plugins; @@ -24,15 +25,23 @@ namespace LandshuterNetzwerk.Invoicing String wohngemeinschaft = ""; String team = ""; + Customer c = null; if (invoiceBase != null) { var c2s = invoiceBase.CostBearer2SupportConcept; - if (c2s != null) - { - var c = c2s.SupportConcept.Customer; + if (c2s != null) + { + c = c2s.SupportConcept.Customer; + } + else if (invoiceBase.RecipientCustomerOid.HasValue) + { + c = DAOFactory.GenericDAO.LoadByID(invoiceBase.RecipientCustomerOid.Value); + } + if (c != null) + { foreach (var t2c in c.Team2CustomerList) { team = t2c.Team.Name; @@ -46,7 +55,6 @@ namespace LandshuterNetzwerk.Invoicing } } } - } DateTime dt = DateTime.Now;