From f70d2b881504934cb123d20b2a75f815945a11d7 Mon Sep 17 00:00:00 2001 From: Kojo Date: Fri, 8 May 2026 11:08:45 +0200 Subject: [PATCH] BeWoImFlow: Auf QB Monatsunterschrift vom Klient wieder raus, Filterung im CustomReportCreator richtig verarbeiten SupportOID=162463 --- ReportImp/BeWoImFlow/CustomReportCreator.cs | 50 +++++++++++--- .../BeWoImFlow/Quittierungsbeleg.Designer.cs | 65 +++---------------- 2 files changed, 48 insertions(+), 67 deletions(-) diff --git a/ReportImp/BeWoImFlow/CustomReportCreator.cs b/ReportImp/BeWoImFlow/CustomReportCreator.cs index e08a740aa..a0d5c5439 100644 --- a/ReportImp/BeWoImFlow/CustomReportCreator.cs +++ b/ReportImp/BeWoImFlow/CustomReportCreator.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using BeWo.Report; using BeWo.Report.ReportObjects; using DevExpress.XtraReports.UI; @@ -12,13 +10,16 @@ namespace BeWoImFlow { public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) { - List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay); + List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid); if (lROs.Count > 0) { var rootReport = CreateServicesOverviewReportForRo(lROs[0]); - rootReport.CreateDocument(); - + if (rootReport.Pages.Count == 0) + { + rootReport.CreateDocument(); + } + for (int i = 1; i < lROs.Count; i++) { var lNext = CreateServicesOverviewReportForRo(lROs[i]); @@ -31,20 +32,49 @@ namespace BeWoImFlow return new XtraReport(); } - public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) + public override XtraReport CreateServiceOverviewReportForCustomers(IList customerOids, int month, int year, long? orgaOid, long? empOid, long? serviceCategoryOid, int startDay, int endDay, bool nurFehlende) + { + var roList = new List(); + + foreach (var coid in customerOids) + { + var ro = ServicesOverviewRO.Create(coid, month, year, true, orgaOid ?? 0, empOid ?? 0, startDay, endDay, serviceCategoryOid); + if (ro != null) + { + roList.Add(ro); + } + } + + if (roList.Count > 0) + { + var rootReport = CreateServicesOverviewReportForRo(roList[0]); + rootReport.CreateDocument(); + for (int i = 1; i < roList.Count; i++) + { + var lNext = CreateServicesOverviewReportForRo(roList[i]); + lNext.CreateDocument(); + rootReport.Pages.AddRange(lNext.Pages); + } + + return rootReport; + } + + return new XtraReport(); + } + + public override XtraReport CreateServiceOverviewSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) { var ro = ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid); return CreateServicesOverviewReportForRo(ro); - } - public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId) + public override XtraReport CreateReportForServicesOverviewRo(ServicesOverviewRO ro, string reportId) { - return CreateServicesOverviewReportForRo(ro); + return CreateServicesOverviewReportForRo(ro); } - private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro) + private XtraReport CreateServicesOverviewReportForRo(ServicesOverviewRO ro) { IBeWoReport report = null; diff --git a/ReportImp/BeWoImFlow/Quittierungsbeleg.Designer.cs b/ReportImp/BeWoImFlow/Quittierungsbeleg.Designer.cs index 598e2c7c8..284bfbe54 100644 --- a/ReportImp/BeWoImFlow/Quittierungsbeleg.Designer.cs +++ b/ReportImp/BeWoImFlow/Quittierungsbeleg.Designer.cs @@ -116,9 +116,6 @@ namespace BeWoImFlow this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField(); - this.lblUnterschriftKlient = new DevExpress.XtraReports.UI.XRLabel(); - this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); - this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -302,9 +299,9 @@ namespace BeWoImFlow this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None; this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")}); - this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(6.103516E-05F, 0F); this.picSignature.Name = "picSignature"; - this.picSignature.SizeF = new System.Drawing.SizeF(160F, 35.00002F); + this.picSignature.SizeF = new System.Drawing.SizeF(160F, 31.99999F); this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; this.picSignature.StylePriority.UseBorders = false; this.picSignature.BeforePrint += new DevExpress.XtraReports.UI.BeforePrintEventHandler(this.picSignature_BeforePrint); @@ -550,10 +547,6 @@ namespace BeWoImFlow this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; this.xrTableCell49.Weight = 0.44692737430167606D; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); - // // formattingRuleStartDate // this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; @@ -729,9 +722,6 @@ namespace BeWoImFlow // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.lblUnterschriftKlient, - this.xrPictureBox2, - this.xrLabel18, this.xrLabel17, this.xrPictureBox1, this.xrLabel9, @@ -853,7 +843,7 @@ namespace BeWoImFlow | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableAbwesenheiten.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrTableAbwesenheiten.LocationFloat = new DevExpress.Utils.PointFloat(170F, 91.45832F); + this.xrTableAbwesenheiten.LocationFloat = new DevExpress.Utils.PointFloat(170F, 91.45831F); this.xrTableAbwesenheiten.Name = "xrTableAbwesenheiten"; this.xrTableAbwesenheiten.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.xrTableAbwesenheiten.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { @@ -1096,7 +1086,7 @@ namespace BeWoImFlow | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.lblHatGruppen.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.lblHatGruppen.LocationFloat = new DevExpress.Utils.PointFloat(435.1388F, 91.45832F); + this.lblHatGruppen.LocationFloat = new DevExpress.Utils.PointFloat(435.1388F, 91.45831F); this.lblHatGruppen.Name = "lblHatGruppen"; this.lblHatGruppen.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); this.lblHatGruppen.SizeF = new System.Drawing.SizeF(30F, 30F); @@ -1119,7 +1109,7 @@ namespace BeWoImFlow // xrRichText1 // this.xrRichText1.Font = new DevExpress.Drawing.DXFont("Arial", 8F); - this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(474.4723F, 91.45832F); + this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(474.4723F, 91.45831F); this.xrRichText1.Name = "xrRichText1"; this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString"); this.xrRichText1.SizeF = new System.Drawing.SizeF(264.9721F, 50F); @@ -1128,7 +1118,7 @@ namespace BeWoImFlow // xrLabel15 // this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Underline); - this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 91.45832F); + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 91.45831F); this.xrLabel15.Multiline = true; this.xrLabel15.Name = "xrLabel15"; this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); @@ -1213,7 +1203,7 @@ namespace BeWoImFlow this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(329F, 0F); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); - this.xrLabel1.SizeF = new System.Drawing.SizeF(86.00003F, 20F); + this.xrLabel1.SizeF = new System.Drawing.SizeF(86.00002F, 20F); this.xrLabel1.StylePriority.UseBackColor = false; this.xrLabel1.StylePriority.UseBorders = false; this.xrLabel1.StylePriority.UseFont = false; @@ -1228,42 +1218,6 @@ namespace BeWoImFlow this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldKontaktArt.Name = "fieldKontaktArt"; // - // lblUnterschriftKlient - // - this.lblUnterschriftKlient.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.lblUnterschriftKlient.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.lblUnterschriftKlient.LocationFloat = new DevExpress.Utils.PointFloat(94.99995F, 250F); - this.lblUnterschriftKlient.Name = "lblUnterschriftKlient"; - this.lblUnterschriftKlient.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); - this.lblUnterschriftKlient.SizeF = new System.Drawing.SizeF(304.5972F, 20F); - this.lblUnterschriftKlient.StylePriority.UseBackColor = false; - this.lblUnterschriftKlient.StylePriority.UseBorders = false; - this.lblUnterschriftKlient.StylePriority.UseFont = false; - this.lblUnterschriftKlient.StylePriority.UsePadding = false; - this.lblUnterschriftKlient.StylePriority.UseTextAlignment = false; - this.lblUnterschriftKlient.Text = "Datum, Unterschrift Klient/in"; - this.lblUnterschriftKlient.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - // - // xrPictureBox2 - // - this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("ImageSource", null, "CustomerSignature")}); - this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(200.236F, 214.5F); - this.xrPictureBox2.Name = "xrPictureBox2"; - this.xrPictureBox2.SizeF = new System.Drawing.SizeF(199.3611F, 35.50002F); - this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage; - // - // xrLabel18 - // - this.xrLabel18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy}")}); - this.xrLabel18.LocationFloat = new DevExpress.Utils.PointFloat(94.99995F, 214.5F); - this.xrLabel18.Name = "xrLabel18"; - this.xrLabel18.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel18.SizeF = new System.Drawing.SizeF(105.2361F, 35.50002F); - this.xrLabel18.StylePriority.UseTextAlignment = false; - this.xrLabel18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; - // // Quittierungsbeleg // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -1284,7 +1238,7 @@ namespace BeWoImFlow this.formattingRuleEmployeeName}); this.Margins = new DevExpress.Drawing.DXMargins(50F, 30F, 100F, 30F); this.PageHeight = 1169; - this.PageWidth = 827; + this.PageWidth = 826; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; this.Version = "23.2"; ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); @@ -1384,8 +1338,5 @@ namespace BeWoImFlow private DevExpress.XtraReports.UI.XRLabel xrLabel16; private DevExpress.XtraReports.UI.XRLabel xrLabel17; private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1; - private DevExpress.XtraReports.UI.XRLabel lblUnterschriftKlient; - private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2; - private DevExpress.XtraReports.UI.XRLabel xrLabel18; } }