diff --git a/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.Designer.cs b/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.Designer.cs index a4f4ef100..739a1ea4e 100644 --- a/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.Designer.cs +++ b/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.Designer.cs @@ -31,6 +31,7 @@ namespace SozialeDiensteNiederrhein { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Spitzabrechnung)); + DevExpress.XtraReports.UI.XRSummary xrSummary1 = new DevExpress.XtraReports.UI.XRSummary(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); @@ -78,7 +79,6 @@ namespace SozialeDiensteNiederrhein this.xrTableRow33 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell52 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell53 = new DevExpress.XtraReports.UI.XRTableCell(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); this.xrTable5 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow30 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -99,12 +99,22 @@ namespace SozialeDiensteNiederrhein this.xrTableRow37 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.Zwischensumme = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrTable6 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow12 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); + this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -142,7 +152,7 @@ namespace SozialeDiensteNiederrhein this.xrTable1.Name = "xrTable1"; this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.rowErbrachteLeistung}); - this.xrTable1.SizeF = new System.Drawing.SizeF(509.0417F, 17F); + this.xrTable1.SizeF = new System.Drawing.SizeF(649.9999F, 17F); this.xrTable1.StylePriority.UseBorderColor = false; // // rowErbrachteLeistung @@ -550,7 +560,9 @@ namespace SozialeDiensteNiederrhein // DetailReport // this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { - this.Detail1}); + this.Detail1, + this.Zwischensumme, + this.GroupHeader2}); this.DetailReport.DataMember = "InvoiceItems"; this.DetailReport.DataSource = this.bindingSource1; this.DetailReport.Level = 0; @@ -561,7 +573,7 @@ namespace SozialeDiensteNiederrhein this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable4}); this.Detail1.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Detail1.HeightF = 17F; + this.Detail1.HeightF = 17.00001F; this.Detail1.Name = "Detail1"; this.Detail1.StylePriority.UseFont = false; // @@ -572,7 +584,7 @@ namespace SozialeDiensteNiederrhein this.xrTable4.Name = "xrTable4"; this.xrTable4.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow33}); - this.xrTable4.SizeF = new System.Drawing.SizeF(579.8747F, 17F); + this.xrTable4.SizeF = new System.Drawing.SizeF(649.9999F, 17F); this.xrTable4.StylePriority.UseBorderColor = false; // // xrTableRow33 @@ -596,7 +608,7 @@ namespace SozialeDiensteNiederrhein this.xrTableCell52.StylePriority.UseBorders = false; this.xrTableCell52.StylePriority.UseFont = false; this.xrTableCell52.Text = "abzüglich der geleisteten Abschlagszahlung:"; - this.xrTableCell52.Weight = 0.635093477689303D; + this.xrTableCell52.Weight = 0.745831138845095D; // // xrTableCell53 // @@ -614,11 +626,7 @@ namespace SozialeDiensteNiederrhein this.xrTableCell53.StylePriority.UseTextAlignment = false; this.xrTableCell53.Text = "xrTableCell10"; this.xrTableCell53.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; - this.xrTableCell53.Weight = 0.25702143742487976D; - // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO); + this.xrTableCell53.Weight = 0.14628377626908778D; // // GroupFooter1 // @@ -642,7 +650,7 @@ namespace SozialeDiensteNiederrhein this.xrTableRow35, this.xrTableRow36, this.xrTableRow37}); - this.xrTable5.SizeF = new System.Drawing.SizeF(579.8747F, 132F); + this.xrTable5.SizeF = new System.Drawing.SizeF(649.9999F, 132F); this.xrTable5.StylePriority.UseBorderColor = false; // // xrTableRow30 @@ -847,6 +855,99 @@ namespace SozialeDiensteNiederrhein this.xrTableCell60.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; this.xrTableCell60.Weight = 0.25702143742487982D; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.Settlement2RO); + // + // Zwischensumme + // + this.Zwischensumme.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTable6}); + this.Zwischensumme.HeightF = 34F; + this.Zwischensumme.Name = "Zwischensumme"; + this.Zwischensumme.Visible = false; + // + // xrTable6 + // + this.xrTable6.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrTable6.Name = "xrTable6"; + this.xrTable6.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow12, + this.xrTableRow10}); + this.xrTable6.SizeF = new System.Drawing.SizeF(650F, 34F); + this.xrTable6.StylePriority.UseFont = false; + // + // xrTableRow12 + // + this.xrTableRow12.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell9, + this.xrTableCell10}); + this.xrTableRow12.Name = "xrTableRow12"; + this.xrTableRow12.Weight = 0.40476190476190466D; + // + // xrTableCell9 + // + this.xrTableCell9.BorderColor = System.Drawing.SystemColors.ControlLight; + this.xrTableCell9.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell9.Font = new System.Drawing.Font("Calibri", 11F); + this.xrTableCell9.Name = "xrTableCell9"; + this.xrTableCell9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell9.StylePriority.UseBorderColor = false; + this.xrTableCell9.StylePriority.UseBorders = false; + this.xrTableCell9.StylePriority.UseFont = false; + this.xrTableCell9.StylePriority.UsePadding = false; + this.xrTableCell9.Text = "Zwischensumme [ItemDescription]:"; + this.xrTableCell9.Weight = 2.5080772986778848D; + // + // xrTableCell10 + // + this.xrTableCell10.BorderColor = System.Drawing.SystemColors.ControlLight; + this.xrTableCell10.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell10.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceItems.GrossAmountTotal")}); + this.xrTableCell10.Font = new System.Drawing.Font("Calibri", 11F); + this.xrTableCell10.Name = "xrTableCell10"; + this.xrTableCell10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell10.StylePriority.UseBorderColor = false; + this.xrTableCell10.StylePriority.UseBorders = false; + this.xrTableCell10.StylePriority.UseFont = false; + this.xrTableCell10.StylePriority.UsePadding = false; + this.xrTableCell10.StylePriority.UseTextAlignment = false; + xrSummary1.FormatString = "{0:c}"; + xrSummary1.Running = DevExpress.XtraReports.UI.SummaryRunning.Group; + this.xrTableCell10.Summary = xrSummary1; + this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell10.Weight = 0.4919227013221153D; + // + // xrTableRow10 + // + this.xrTableRow10.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell7}); + this.xrTableRow10.Name = "xrTableRow10"; + this.xrTableRow10.Weight = 0.40476190476190466D; + // + // xrTableCell7 + // + this.xrTableCell7.BorderColor = System.Drawing.SystemColors.ControlLight; + this.xrTableCell7.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell7.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTableCell7.Name = "xrTableCell7"; + this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell7.StylePriority.UseBorderColor = false; + this.xrTableCell7.StylePriority.UseBorders = false; + this.xrTableCell7.StylePriority.UseFont = false; + this.xrTableCell7.StylePriority.UsePadding = false; + this.xrTableCell7.Weight = 3D; + // + // GroupHeader2 + // + this.GroupHeader2.GroupFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] { + new DevExpress.XtraReports.UI.GroupField("ratefactor", DevExpress.XtraReports.UI.XRColumnSortOrder.Descending)}); + this.GroupHeader2.HeightF = 0F; + this.GroupHeader2.Name = "GroupHeader2"; + // // Spitzabrechnung // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -876,8 +977,9 @@ namespace SozialeDiensteNiederrhein ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable6)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } @@ -952,5 +1054,13 @@ namespace SozialeDiensteNiederrhein private DevExpress.XtraReports.UI.XRLabel xrLabel13; private DevExpress.XtraReports.UI.XRLabel lblGruppenNein; private DevExpress.XtraReports.UI.XRRichText xrRichText1; + private DevExpress.XtraReports.UI.GroupFooterBand Zwischensumme; + private DevExpress.XtraReports.UI.XRTable xrTable6; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow12; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell9; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell10; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow10; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; + private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader2; } } diff --git a/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.cs b/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.cs index 40245a650..867059be5 100644 --- a/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.cs +++ b/ReportImp/SozialeDiensteNiederrhein/SettlementReport2.cs @@ -9,6 +9,8 @@ using BeWo.Data.Access; using BeWo.Data.Entities; using System.Linq; using BS.Shared; +using BS.Shared.Extensions; +using System.Text.RegularExpressions; namespace SozialeDiensteNiederrhein { @@ -21,8 +23,7 @@ namespace SozialeDiensteNiederrhein public void SetReportDataSource(Settlement2RO pRO) { - - decimal rateFactor = 1; + decimal rateFactor = 1; foreach (var ii in pRO.InvoiceItems) { @@ -30,7 +31,17 @@ namespace SozialeDiensteNiederrhein { rateFactor = (100 + ii.RateFactor.Value) / 100; } - } + + if (pRO.FehlkontakteString != null && ii.RateFactor == 0) + { + Zwischensumme.Visible = true; + if (!ii.ItemDescription.IsNullOrEmpty()) + { + ii.DetailDescription = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte"); + } + ii.ItemDescription = "Fehlkontakte"; + } + } pRO.RateFactor = (double)rateFactor; if (pRO.Claim < 0)