diff --git a/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.Designer.cs b/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.Designer.cs index d82b22c8c..1a8ce1517 100644 --- a/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.Designer.cs +++ b/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.Designer.cs @@ -36,7 +36,6 @@ namespace CaritasverbandDuerenJuelichEV this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); - this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); this.xrTable2 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -92,7 +91,6 @@ namespace CaritasverbandDuerenJuelichEV this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.lblRechnungsnummer = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); this.xrTable5 = new DevExpress.XtraReports.UI.XRTable(); @@ -112,9 +110,11 @@ namespace CaritasverbandDuerenJuelichEV this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); - this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); + this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit(); @@ -162,30 +162,15 @@ namespace CaritasverbandDuerenJuelichEV // // bottomMarginBand1 // - this.bottomMarginBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.xrLabel10}); - this.bottomMarginBand1.HeightF = 93.9585F; + this.bottomMarginBand1.HeightF = 35.2918F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // - // xrLabel10 - // - this.xrLabel10.Font = new DevExpress.Drawing.DXFont("calibri", 9F); - this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(128.1257F, 15.00003F); - this.xrLabel10.Multiline = true; - this.xrLabel10.Name = "xrLabel10"; - this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel10.SizeF = new System.Drawing.SizeF(407.9558F, 36.45833F); - this.xrLabel10.StylePriority.UseFont = false; - this.xrLabel10.StylePriority.UseTextAlignment = false; - this.xrLabel10.Text = "Bankkonten: Sparkasse Düren (BLZ 395 501 10) Konto 667 923\r\nIBAN: DE88 3955 0110 " + - "0000 6679 23 – SWIFT-BIC: SDUEDE33XXX"; - this.xrLabel10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; - // // Page1 // this.Page1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTable5, this.xrTable2, this.xrLabel4, this.xrLabel22, @@ -202,14 +187,14 @@ namespace CaritasverbandDuerenJuelichEV this.lblRechnungsnummer, this.xrLabel8}); this.Page1.Font = new DevExpress.Drawing.DXFont("Verdana", 10F); - this.Page1.HeightF = 566.7918F; + this.Page1.HeightF = 596.9793F; this.Page1.Name = "Page1"; this.Page1.StylePriority.UseBorders = false; this.Page1.StylePriority.UseFont = false; // // xrTable2 // - this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(35.00048F, 267.3959F); + this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(35.00035F, 253.8542F); this.xrTable2.Name = "xrTable2"; this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2, @@ -1099,17 +1084,6 @@ namespace CaritasverbandDuerenJuelichEV this.xrLabel8.StylePriority.UseTextAlignment = false; this.xrLabel8.Text = "xrLabel8"; this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; - // - // xrLabel15 - // - this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); - this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(35.00048F, 37.5F); - this.xrLabel15.Name = "xrLabel15"; - this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel15.SizeF = new System.Drawing.SizeF(677.4579F, 17.00001F); - this.xrLabel15.StylePriority.UseFont = false; - this.xrLabel15.Text = "Um Überweisung unter Angabe der Kunden- und Rechnungsnummer wird gebeten (siehe o" + - "ben)."; // // DetailReport // @@ -1123,14 +1097,12 @@ namespace CaritasverbandDuerenJuelichEV // // Detail1 // - this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.xrTable5}); - this.Detail1.HeightF = 25F; + this.Detail1.HeightF = 0F; this.Detail1.Name = "Detail1"; // // xrTable5 // - this.xrTable5.LocationFloat = new DevExpress.Utils.PointFloat(35.00069F, 0F); + this.xrTable5.LocationFloat = new DevExpress.Utils.PointFloat(35.00035F, 571.9793F); this.xrTable5.Name = "xrTable5"; this.xrTable5.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow23}); @@ -1314,6 +1286,8 @@ namespace CaritasverbandDuerenJuelichEV this.xrTableCell9.BorderColor = System.Drawing.Color.Black; this.xrTableCell9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell9.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.ServiceDescription")}); this.xrTableCell9.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.xrTableCell9.Multiline = true; @@ -1388,22 +1362,31 @@ namespace CaritasverbandDuerenJuelichEV // // GroupFooter1 // - this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.xrLabel5, - this.xrLabel1, - this.xrLabel15}); - this.GroupFooter1.HeightF = 164.9165F; + this.GroupFooter1.HeightF = 0F; this.GroupFooter1.Name = "GroupFooter1"; // - // xrLabel5 + // bindingSource1 // - this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); - this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(35.00048F, 76.66664F); - this.xrLabel5.Name = "xrLabel5"; - this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel5.SizeF = new System.Drawing.SizeF(175.0005F, 17.00001F); - this.xrLabel5.StylePriority.UseFont = false; - this.xrLabel5.Text = "Mit freundlichen Grüßen"; + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); + // + // ReportFooter + // + this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel15, + this.xrLabel1, + this.xrLabel5}); + this.ReportFooter.Name = "ReportFooter"; + // + // xrLabel15 + // + this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(35.00048F, 37.5F); + this.xrLabel15.Name = "xrLabel15"; + this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel15.SizeF = new System.Drawing.SizeF(677.4579F, 39.16664F); + this.xrLabel15.StylePriority.UseFont = false; + this.xrLabel15.Text = "Um Überweisung unter Angabe der Leistung und Rechnungsnummer wird gebeten (siehe " + + "oben)."; // // xrLabel1 // @@ -1420,9 +1403,15 @@ namespace CaritasverbandDuerenJuelichEV this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrLabel1.TextFormatString = "Gesamtkosten für Monat {0:0.00 €}"; // - // bindingSource1 + // xrLabel5 // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); + this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); + this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(35.00047F, 76.66664F); + this.xrLabel5.Name = "xrLabel5"; + this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel5.SizeF = new System.Drawing.SizeF(175.0005F, 17.00001F); + this.xrLabel5.StylePriority.UseFont = false; + this.xrLabel5.Text = "Mit freundlichen Grüßen"; // // ServiceInvoiceReport // @@ -1432,13 +1421,14 @@ namespace CaritasverbandDuerenJuelichEV this.topMarginBand1, this.bottomMarginBand1, this.Page1, - this.DetailReport}); + this.DetailReport, + this.ReportFooter}); this.DataSource = this.bindingSource1; this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F); this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { this.ruleRateFactorNull}); - this.Margins = new DevExpress.Drawing.DXMargins(63.54165F, 51F, 50F, 93.9585F); + this.Margins = new DevExpress.Drawing.DXMargins(63.54165F, 51F, 50F, 35.2918F); this.PageHeight = 1169; this.PageWidth = 827; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; @@ -1463,7 +1453,6 @@ namespace CaritasverbandDuerenJuelichEV private DevExpress.XtraReports.UI.GroupHeaderBand Page1; private DevExpress.XtraReports.UI.XRLabel lblRechnungsnummer; private DevExpress.XtraReports.UI.XRLabel xrLabel8; - private DevExpress.XtraReports.UI.XRLabel xrLabel15; private DevExpress.XtraReports.UI.DetailReportBand DetailReport; private DevExpress.XtraReports.UI.DetailBand Detail1; private DevExpress.XtraReports.UI.XRTable xrTable5; @@ -1480,8 +1469,6 @@ namespace CaritasverbandDuerenJuelichEV private DevExpress.XtraReports.UI.XRTableCell xrTableCell45; private DevExpress.XtraReports.UI.XRLabel xrLabel7; private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1; - private DevExpress.XtraReports.UI.XRLabel xrLabel1; - private DevExpress.XtraReports.UI.XRLabel xrLabel10; private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; private DevExpress.XtraReports.UI.XRLabel xrLabel9; @@ -1538,6 +1525,9 @@ namespace CaritasverbandDuerenJuelichEV private DevExpress.XtraReports.UI.XRLabel xrLabel16; private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; private DevExpress.XtraReports.UI.XRTableCell xrTableCell9; + private DevExpress.XtraReports.UI.ReportFooterBand ReportFooter; + private DevExpress.XtraReports.UI.XRLabel xrLabel15; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; private DevExpress.XtraReports.UI.XRLabel xrLabel5; } } diff --git a/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs b/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs index f499edefb..935b4e9f4 100644 --- a/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs +++ b/ReportImp/CaritasverbandDuerenJuelichEV/ServiceInvoiceReport.cs @@ -62,14 +62,28 @@ namespace CaritasverbandDuerenJuelichEV var hauptbetreuer = c.Employee2CustomerList.FirstOrDefault( e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue && ve.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)); + var vertretung = c.Employee2CustomerList.FirstOrDefault( + e2c => e2c.ValueList.Any(ve => ve.Entry.SystemEntryID.HasValue + && ve.Entry.Value == "Ergänzende Betreuung")); + + if (hauptbetreuer != null && hauptbetreuer.Employee.Person != null) { lblBetreuungskraft.Text = hauptbetreuer.Employee.Person.FirstNameLastName; } - var betreuungsart = c.ValueList.FirstOrDefault(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType); - if (betreuungsart != null) + if (vertretung != null && vertretung.Employee.Person != null) { - lblBetreuungsart.Text = betreuungsart.Entry.Value; + lblBetreuungskraft.Text += " / " + vertretung.Employee.Person.FirstNameLastName; + } + + var betreuungsarten = c.ValueList.Where(v2o => v2o.Entry.Type == ValueListEntryType.CustomerCareType).ToList(); + if (betreuungsarten != null && betreuungsarten.Count > 0) + { + if (betreuungsarten.Count >= 1) + lblBetreuungsart.Text = betreuungsarten[0].Entry.Value; + if (betreuungsarten.Count >= 2) + lblBetreuungsart.Text += " / " + betreuungsarten[1].Entry.Value; + } } if (pRO.ServiceInvoicePeriods[0].SupportConceptApprovalPeriod != null &&