From c1446f966def2f5bc16d0ed360d66ac06d17bf6b Mon Sep 17 00:00:00 2001 From: HirschleM Date: Fri, 4 Jul 2025 10:46:54 +0200 Subject: [PATCH 01/35] MH: Arche Tecklenburg Bugfix Dienstplanungsdruck --- .../ArcheTecklenburg/ArcheTecklenburg.csproj | 11 + .../ArcheTecklenburg/RosterReport.Designer.cs | 257 +++++++++++ ReportImp/ArcheTecklenburg/RosterReport.cs | 417 ++++++++++++++++++ ReportImp/ArcheTecklenburg/RosterReport.resx | 123 ++++++ 4 files changed, 808 insertions(+) create mode 100644 ReportImp/ArcheTecklenburg/RosterReport.Designer.cs create mode 100644 ReportImp/ArcheTecklenburg/RosterReport.cs create mode 100644 ReportImp/ArcheTecklenburg/RosterReport.resx diff --git a/ReportImp/ArcheTecklenburg/ArcheTecklenburg.csproj b/ReportImp/ArcheTecklenburg/ArcheTecklenburg.csproj index 80631188e..b4ef2259e 100644 --- a/ReportImp/ArcheTecklenburg/ArcheTecklenburg.csproj +++ b/ReportImp/ArcheTecklenburg/ArcheTecklenburg.csproj @@ -45,6 +45,7 @@ + @@ -99,6 +100,12 @@ RechnungBesWohnformen.cs + + Component + + + RosterReport.cs + Component @@ -148,6 +155,10 @@ RechnungBesWohnformen.cs Designer + + RosterReport.cs + Designer + Teamstundenkonto.cs diff --git a/ReportImp/ArcheTecklenburg/RosterReport.Designer.cs b/ReportImp/ArcheTecklenburg/RosterReport.Designer.cs new file mode 100644 index 000000000..7f153e3ca --- /dev/null +++ b/ReportImp/ArcheTecklenburg/RosterReport.Designer.cs @@ -0,0 +1,257 @@ +using BeWo.Report.ReportObjects; +namespace ArcheTecklenburg +{ + partial class RosterReport + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); + this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); + this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); + this.xrLabel_Image = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel_Time = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.ruleNotApprovedAndExpiringNext4Months = new DevExpress.XtraReports.UI.FormattingRule(); + this.ruleNotApprovedAndExpiringNext8Months = new DevExpress.XtraReports.UI.FormattingRule(); + this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); + this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand(); + this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.approvedText = new DevExpress.XtraReports.UI.CalculatedField(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.HeightF = 0F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // ReportHeader + // + this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrPageInfo1, + this.xrLabel1}); + this.ReportHeader.HeightF = 48.95833F; + this.ReportHeader.Name = "ReportHeader"; + // + // xrPageInfo1 + // + this.xrPageInfo1.Font = new System.Drawing.Font("Arial", 8F); + this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(835.1252F, 0F); + this.xrPageInfo1.Name = "xrPageInfo1"; + this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; + this.xrPageInfo1.SizeF = new System.Drawing.SizeF(273.8748F, 23F); + this.xrPageInfo1.StylePriority.UseFont = false; + this.xrPageInfo1.StylePriority.UseTextAlignment = false; + this.xrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomRight; + // + // xrLabel1 + // + this.xrLabel1.Font = new System.Drawing.Font("Arial", 14F); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel1.Multiline = true; + this.xrLabel1.Name = "xrLabel1"; + this.xrLabel1.SizeF = new System.Drawing.SizeF(835.125F, 25F); + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.StylePriority.UseTextAlignment = false; + this.xrLabel1.Text = "Dienstplan für \"[WohnheimName]\" ([ReportDateTime!MMMM yyyy])"; + this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft; + // + // DetailReport + // + this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail1, + this.ReportFooter}); + this.DetailReport.DataMember = "RosterReportRows"; + this.DetailReport.DataSource = this.bindingSource1; + this.DetailReport.Level = 0; + this.DetailReport.Name = "DetailReport"; + // + // Detail1 + // + this.Detail1.HeightF = 20.00001F; + this.Detail1.Name = "Detail1"; + this.Detail1.StylePriority.UseBackColor = false; + // + // ReportFooter + // + this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel_Image, + this.xrLabel_Time}); + this.ReportFooter.HeightF = 80.20834F; + this.ReportFooter.Name = "ReportFooter"; + // + // xrLabel_Image + // + this.xrLabel_Image.BorderColor = System.Drawing.Color.Transparent; + this.xrLabel_Image.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrLabel_Image.BorderWidth = 0.25F; + this.xrLabel_Image.Font = new System.Drawing.Font("Arial", 8F); + this.xrLabel_Image.LocationFloat = new DevExpress.Utils.PointFloat(55F, 32.92F); + this.xrLabel_Image.Multiline = true; + this.xrLabel_Image.Name = "xrLabel_Image"; + this.xrLabel_Image.SizeF = new System.Drawing.SizeF(20F, 20F); + this.xrLabel_Image.StylePriority.UseBorderColor = false; + this.xrLabel_Image.StylePriority.UseBorders = false; + this.xrLabel_Image.StylePriority.UseBorderWidth = false; + this.xrLabel_Image.StylePriority.UseFont = false; + this.xrLabel_Image.StylePriority.UseTextAlignment = false; + this.xrLabel_Image.Text = "\r\n"; + this.xrLabel_Image.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrLabel_Time + // + this.xrLabel_Time.Font = new System.Drawing.Font("Arial", 8F); + this.xrLabel_Time.LocationFloat = new DevExpress.Utils.PointFloat(85F, 32.92F); + this.xrLabel_Time.Multiline = true; + this.xrLabel_Time.Name = "xrLabel_Time"; + this.xrLabel_Time.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F); + this.xrLabel_Time.SizeF = new System.Drawing.SizeF(124.36F, 19.99581F); + this.xrLabel_Time.StylePriority.UseFont = false; + this.xrLabel_Time.StylePriority.UsePadding = false; + this.xrLabel_Time.StylePriority.UseTextAlignment = false; + this.xrLabel_Time.Text = "\r\n"; + this.xrLabel_Time.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.RosterRO); + // + // ruleNotApprovedAndExpiringNext4Months + // + this.ruleNotApprovedAndExpiringNext4Months.Condition = "[IsApproved] == False And [OpenMonths] < 4"; + this.ruleNotApprovedAndExpiringNext4Months.DataMember = "SupportConceptDetailList"; + this.ruleNotApprovedAndExpiringNext4Months.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); + this.ruleNotApprovedAndExpiringNext4Months.Name = "ruleNotApprovedAndExpiringNext4Months"; + // + // ruleNotApprovedAndExpiringNext8Months + // + this.ruleNotApprovedAndExpiringNext8Months.Condition = "[IsApproved] == False And [OpenMonths] < 8 And [OpenMonths] >= 4"; + this.ruleNotApprovedAndExpiringNext8Months.DataMember = "SupportConceptDetailList"; + this.ruleNotApprovedAndExpiringNext8Months.Formatting.BackColor = System.Drawing.Color.LightBlue; + this.ruleNotApprovedAndExpiringNext8Months.Name = "ruleNotApprovedAndExpiringNext8Months"; + // + // PageHeader + // + this.PageHeader.HeightF = 20F; + this.PageHeader.Name = "PageHeader"; + this.PageHeader.StylePriority.UseBorderColor = false; + this.PageHeader.StylePriority.UseTextAlignment = false; + this.PageHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; + // + // PageFooter + // + this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrPageInfo2}); + this.PageFooter.HeightF = 51.87502F; + this.PageFooter.Name = "PageFooter"; + // + // xrPageInfo2 + // + this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F); + this.xrPageInfo2.Format = "Seite {0} von {1}"; + this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(1024.917F, 33.87502F); + this.xrPageInfo2.Name = "xrPageInfo2"; + this.xrPageInfo2.SizeF = new System.Drawing.SizeF(74.08325F, 18F); + this.xrPageInfo2.StylePriority.UseFont = false; + this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + // + // approvedText + // + this.approvedText.DataMember = "SupportConceptDetailList"; + this.approvedText.Expression = "Iif([IsApproved], \'bewilligt\' , \'nicht bewilligt\')"; + this.approvedText.Name = "approvedText"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 50F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 20F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // RosterReport + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.ReportHeader, + this.DetailReport, + this.PageHeader, + this.PageFooter, + this.topMarginBand1, + this.bottomMarginBand1}); + this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { + this.approvedText}); + this.DataSource = this.bindingSource1; + this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { + this.ruleNotApprovedAndExpiringNext8Months, + this.ruleNotApprovedAndExpiringNext4Months}); + this.Landscape = true; + this.Margins = new System.Drawing.Printing.Margins(30, 30, 50, 20); + this.PageHeight = 827; + this.PageWidth = 1169; + this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; + this.Version = "17.1"; + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.DetailReportBand DetailReport; + private DevExpress.XtraReports.UI.DetailBand Detail1; + private DevExpress.XtraReports.UI.PageHeaderBand PageHeader; + private DevExpress.XtraReports.UI.PageFooterBand PageFooter; + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2; + private DevExpress.XtraReports.UI.CalculatedField approvedText; + private DevExpress.XtraReports.UI.FormattingRule ruleNotApprovedAndExpiringNext8Months; + private DevExpress.XtraReports.UI.FormattingRule ruleNotApprovedAndExpiringNext4Months; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.ReportFooterBand ReportFooter; + private DevExpress.XtraReports.UI.XRLabel xrLabel_Image; + private DevExpress.XtraReports.UI.XRLabel xrLabel_Time; + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; + } +} diff --git a/ReportImp/ArcheTecklenburg/RosterReport.cs b/ReportImp/ArcheTecklenburg/RosterReport.cs new file mode 100644 index 000000000..5310354be --- /dev/null +++ b/ReportImp/ArcheTecklenburg/RosterReport.cs @@ -0,0 +1,417 @@ +using System; +using System.Drawing; +using System.Globalization; +using DevExpress.XtraReports.UI; +using BeWo.Report.ReportObjects; +using BS.Shared.DataContracts; +using BS.Shared.Extensions; +using System.Collections.Generic; +using System.Linq; +using BeWo.Report; + +namespace ArcheTecklenburg +{ + public partial class RosterReport : XtraReport, IBeWoReport + { + public XRTable Table1 { get; set; } + public XRTable Table2 { get; set; } + + public XRTableRow Row1 { get; set; } + public XRTableRow Row2 { get; set; } + + public Tuple Title { get; set; } + public Tuple[] Days { get; set; } + public Tuple[] Weeks { get; set; } + public Tuple Month { get; set; } + + public DateTime monthAndYear { get; set; } + public int Modifier { get; set; } + public int LastIndex { get; set; } + public List Feiertage { get; set; } + public List Abwesenheiten { get; set; } + public List WoIndexes { get; set; } + + public RosterReport() + { + Modifier = 0; + WoIndexes = new List(); + InitializeComponent(); + InitializeComponent2(); + } + + public void SetReportDataSource(RosterRO pRO) // In Rows sind die Days drin, da müssen die Abwesenheiten rein. Das ist der way2go + { + int days = DateTime.DaysInMonth(pRO.ReportDateTime.Year, pRO.ReportDateTime.Month); + monthAndYear = new DateTime(pRO.ReportDateTime.Year, pRO.ReportDateTime.Month, 1); + Feiertage = pRO.Feiertage; + Abwesenheiten = new List(); + + //foreach (var row in pRO.RosterReportRows) + //{ + // if (row.Employee.AbsenceTimes.Count > 0) + // { + // Abwesenheiten.AddRange(row.Employee.AbsenceTimes.Where(a => a.Start.Value.Month == monthAndYear.Month && a.Start.Value.Year == monthAndYear.Year || + // a.End.Value.Month == monthAndYear.Month && a.End.Value.Year == monthAndYear.Year).ToList()); + // } + //} + + Table1.BeginInit(); + Table2.BeginInit(); + + Row1.Cells.Clear(); + Row2.Cells.Clear(); + + Row1.Cells.Add(Title.Item1); + Row2.Cells.Add(Title.Item2); + + int w = 0; + + for (int i = 0; i < days; i++) + { + var tmp = Days[i]; + + Row1.Cells.Add(tmp.Item1); + Row2.Cells.Add(tmp.Item2); + + if (pRO.ReportDateTime.AddDays(i).DayOfWeek == DayOfWeek.Sunday) + { + var week = Weeks[w++]; + Row1.Cells.Add(week.Item1); + Row2.Cells.Add(week.Item2); + } + + } + Row1.Cells.Add(Month.Item1); + Row2.Cells.Add(Month.Item2); + + Table1.EndInit(); + Table2.EndInit(); + + SetWeekDayNames(monthAndYear.Year, monthAndYear.Month, DateTime.DaysInMonth(monthAndYear.Year, monthAndYear.Month)); + + bindingSource1.DataSource = pRO; + + List dienste = new List(); + if (pRO.RosterReportRows.Count > 0) + { + if (pRO.RosterReportRows[0].AlleDienste.Count > 0) + { + foreach (var dienst in pRO.RosterReportRows[0].AlleDienste) + dienste.Add(dienst.Value); + } + } + + if (dienste.Count > 0) + { + xrLabel_Image.Text = dienste[0].Kurz; + xrLabel_Image.BackColor = ColorTranslator.FromHtml(dienste[0].Farbe); + xrLabel_Image.BorderColor = Color.Black; + xrLabel_Time.Text = AdaptTime(dienste[0].Start.TimeOfDay, dienste[0].Ende.TimeOfDay); + dienste.RemoveAt(0); + int zeile = 0; + int elem = 1; + int counter = 1; + int schwellwert = 7; + foreach (var d in dienste) + { + var foreColor = TransformStringToColor(d.Farbe).IsBrighter(70) ? Color.Black : Color.White; + + this.ReportFooter.Controls.Add( + new XRLabel() + { + LocationF = new PointF(xrLabel_Image.WidthF * elem + xrLabel_Time.WidthF * elem + 55f, xrLabel_Time.LocationF.Y + zeile * (xrLabel_Image.HeightF + 10)), + Font = xrLabel_Image.Font, + TextAlignment = xrLabel_Image.TextAlignment, + WidthF = xrLabel_Image.WidthF, + HeightF = xrLabel_Image.HeightF, + Borders = xrLabel_Image.Borders, + BorderColor = Color.Black, + BorderWidth = xrLabel_Image.BorderWidth, + BackColor = ColorTranslator.FromHtml(d.Farbe), + ForeColor = foreColor, + Text = d.Kurz + }); + this.ReportFooter.Controls.Add( + new XRLabel() + { + LocationF = new PointF(xrLabel_Image.WidthF * (elem + 1) + xrLabel_Time.WidthF * elem + 67f, xrLabel_Time.LocationF.Y + zeile * (xrLabel_Time.HeightF + 10)), + Font = xrLabel_Time.Font, + TextAlignment = xrLabel_Time.TextAlignment, + WidthF = xrLabel_Time.WidthF, + HeightF = xrLabel_Time.HeightF, + Text = AdaptTime(d.Start.TimeOfDay, d.Ende.TimeOfDay), + Padding = xrLabel_Time.Padding + }); + + elem++; + counter++; + + if (counter % schwellwert == 0) //Hier muss Wert für x wieder resettet werden + { + zeile++; + elem = 0; + if (schwellwert == 7) + schwellwert++; + counter = 1; + } + + } + } + + } + + + + private string AdaptTime(TimeSpan start, TimeSpan ende) + { + string[] startArray = start.ToString().Split(':'); + string[] endeArray = ende.ToString().Split(':'); + + return startArray[0] + ":" + startArray[1] + " - " + endeArray[0] + ":" + endeArray[1]; + } + + private void InitializeComponent2() + { + Table1 = new XRTable(); + Table2 = new XRTable(); + Row1 = new XRTableRow(); + Row2 = new XRTableRow(); + + Table1.BeginInit(); + Table2.BeginInit(); + + + Table1.BackColor = System.Drawing.Color.LightBlue; + Table1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); + Table1.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold); + Table1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + Table1.Name = "xrTable1"; + Table1.Rows.Add(Row1); + Table1.SizeF = new System.Drawing.SizeF(1109F, 20F); + Table1.StylePriority.UseBackColor = false; + Table1.StylePriority.UseBorders = false; + Table1.StylePriority.UseFont = false; + Table1.StylePriority.UseTextAlignment = false; + Table1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + + Table2.BackColor = System.Drawing.Color.Transparent; + Table2.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + Table2.Font = new System.Drawing.Font("Arial", 7F); + Table2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + Table2.Name = "xrTable2"; + Table2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + Table2.Rows.Add(Row2); + Table2.SizeF = new System.Drawing.SizeF(1109F, 20F); + Table2.StylePriority.UseBackColor = false; + Table2.StylePriority.UseBorders = false; + Table2.StylePriority.UseFont = false; + Table2.StylePriority.UsePadding = false; + Table2.StylePriority.UseTextAlignment = false; + Table2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + Table2.CanGrow = false; + + Row1.Name = "xrTableRow1"; + Row1.Weight = 0.47; + + Row2.Name = "xrTableRow2"; + Row2.Weight = 0.47; + Row2.FormattingRules.Add(ruleNotApprovedAndExpiringNext4Months); + Row2.FormattingRules.Add(ruleNotApprovedAndExpiringNext8Months); + + + + var empColumn = CreateColumn(0x0D, "Mitarbeiter", 0.33, false); + + empColumn.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "RosterReportRows.Title") }); + + Title = empColumn; + + Days = new Tuple[31]; + for (int i = 0; i < Days.Length; i++) + { + var dayColumn = CreateColumn(0x0C, $"{i + 1}.", 0.10, false); + monthAndYear = new DateTime(monthAndYear.Year, monthAndYear.Month, i + 1); + dayColumn.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, $"RosterReportRows.Day{ i + 1 }") }); + dayColumn.Item2.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding); + Days[i] = dayColumn; + } + + Weeks = new Tuple[6]; + for (int i = 0; i < Weeks.Length; i++) + { + var weekColumns = CreateColumn(0x0C, "Wo.", 0.10, false); + + weekColumns.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, $"RosterReportRows.Week{ i + 1 }", "{0:F2}") }); + weekColumns.Item2.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding); + + Weeks[i] = weekColumns; + } + var monthColumn = CreateColumn(0x0D, "Monat", 0.16, false); + monthColumn.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "RosterReportRows.MonthSum", "{0:F2}") }); + Month = monthColumn; + + PageHeader.Controls.Add(Table1); + + Detail1.Controls.Add(Table2); + Detail1.HeightF = 20; + + + + Table1.EndInit(); + Table2.EndInit(); + } + + private Tuple CreateColumn(byte border, string text, double weight, bool canGrow) + { + var res = new Tuple(new XRTableCell(), new XRTableCell()); + + res.Item1.Borders = DevExpress.XtraPrinting.BorderSide.All; + res.Item1.CanGrow = canGrow; + res.Item1.Text = text; + res.Item1.Weight = weight; + + res.Item2.Borders = (DevExpress.XtraPrinting.BorderSide)border; + res.Item2.CanGrow = canGrow; + res.Item2.Weight = weight; + + return res; + } + + + public int EvalCount { get; set; } + private void Cell_EvaluateBinding(object sender, BindingEventArgs e) + { + EvalCount++; + + var cell = sender as XRTableCell; + var sv = e.Value as DienstInfoDC; + if (sv != null && !string.IsNullOrEmpty(sv.Farbe)) + { + int argb = Int32.Parse(sv.Farbe.Replace("#", ""), NumberStyles.HexNumber); + var clr = Color.FromArgb(argb); + var clr2 = System.Windows.Media.Color.FromRgb(clr.R, clr.G, clr.B); + + cell.BackColor = clr; + cell.ForeColor = clr2.IsBrighter(70) ? Color.Black : Color.White; + } + else + { + cell.BackColor = Color.Transparent; + cell.ForeColor = Color.Black; + + var index = cell.Index; + + if (Table1.Rows[0].Cells[index].Text.Contains("Wo")) + { + if (!WoIndexes.Contains(index)) + WoIndexes.Add(index); + return; + } + if (WoIndexes.Any(i => i - 1 == index)) + cell.Row.Cells[index].BackColor = Color.LightGray; + if (Feiertage != null) + { + if (Feiertage.Count > 0) + { + var header = Table1.Rows[0].Cells[index].Text; + int tag = 0; + if (header.Length == 4) + { + tag = int.Parse(header.Remove(2, 2)); + } + else + { + tag = int.Parse(header.Remove(1, 2)); + } + + foreach (var feiertag in Feiertage) + { + if (tag == feiertag) + cell.Row.Cells[index].BackColor = Color.LightPink; + + } + } + } + if (Abwesenheiten.Count > 0) + { + var header = Table1.Rows[0].Cells[index].Text; + int tag = 0; + if (header.Length == 4) + { + tag = int.Parse(header.Remove(2, 2)); + } + else + { + tag = int.Parse(header.Remove(1, 2)); + } + foreach (var abwesenheit in Abwesenheiten) + { + if (abwesenheit.AbsenceSpan.ContainsDate(new DateTime(monthAndYear.Year, monthAndYear.Month, tag))) + { + cell.Row.Cells[index].BackColor = Color.White; + cell.Row.Cells[index].Text = abwesenheit.Reason.Description[0].ToString(); // Der Text erscheint nicht, scheint überschrieben zu werden + cell.Row.Cells[index].ForeColor = Color.Red; + } + } + } + + + //if (index > LastIndex) + // Modifier = 0; + + //if (index <= DateTime.DaysInMonth(monthAndYear.Year, monthAndYear.Month)) + //{ + // DateTime date = new DateTime(monthAndYear.Year, monthAndYear.Month, index); + + // if (date.DayOfWeek == DayOfWeek.Sunday) + // { + // cell.Row.Cells[index].BackColor = Color.LightPink; + // Modifier++; + // } + // LastIndex = index; + + //else if (Feiertage != null) + //{ + // if (Feiertage.Contains(date.Day)) + // cell.BackColor = Color.LightPink; + //} + //} + } + } + private void SetWeekDayNames(int year, int month, int numberOfDays) + { + int skipper = 0; + for (int i = 1; i <= numberOfDays; i++) + { + if (!Table1.Rows[0].Cells[i + skipper].Text.Contains("Wo")) + { + DateTime date = new DateTime(year, month, i); + CultureInfo c = new CultureInfo("de-DE"); + string weekday = c.DateTimeFormat.GetAbbreviatedDayName(date.DayOfWeek); + weekday = weekday.Remove(weekday.Length - 1, 1); + + Table1.Rows[0].Cells[i + skipper].Text += weekday; + } + else + { + skipper++; + i--; + } + } + + } + + private System.Windows.Media.Color TransformStringToColor(string colorString) + { + //Hier bei keiner Farbe String weiß machen(Übergangslösung) + if (colorString == null) + colorString = "#FF7B68EE"; + + + int argb = Int32.Parse(colorString.Replace("#", ""), NumberStyles.HexNumber); + var clr = Color.FromArgb(argb); + + return System.Windows.Media.Color.FromRgb(clr.R, clr.G, clr.B); + } + } +} diff --git a/ReportImp/ArcheTecklenburg/RosterReport.resx b/ReportImp/ArcheTecklenburg/RosterReport.resx new file mode 100644 index 000000000..d25f3eba2 --- /dev/null +++ b/ReportImp/ArcheTecklenburg/RosterReport.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file From 69a5a57e76237e5fbb1c4d1fb338aa8b7286d392 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Fri, 4 Jul 2025 12:52:55 +0200 Subject: [PATCH 02/35] LebenshilfeBadKreuznachWohnstaette/Kassenbestand - mit Query --- ...ersicht und Summe aller Kassen im Monat.txt | 9 + .../CustomServiceRecordStatisticFactory.cs | 43 +- .../Kassenbestand.cs | 178 +++++++ .../Kassenbestand.designer.cs | 485 ++++++++++++++++++ .../Kassenbestand.resx | 123 +++++ .../LebenshilfeBadKreuznachWohnstaette.csproj | 9 + 6 files changed, 809 insertions(+), 38 deletions(-) create mode 100644 Queries/Kassenbestand - Übersicht und Summe aller Kassen im Monat.txt create mode 100644 ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.cs create mode 100644 ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.designer.cs create mode 100644 ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.resx diff --git a/Queries/Kassenbestand - Übersicht und Summe aller Kassen im Monat.txt b/Queries/Kassenbestand - Übersicht und Summe aller Kassen im Monat.txt new file mode 100644 index 000000000..f772cec2c --- /dev/null +++ b/Queries/Kassenbestand - Übersicht und Summe aller Kassen im Monat.txt @@ -0,0 +1,9 @@ +-- Bei Lebenshilfe Bad Kreuznach Wohnstätte 9696466498 (APP3) +-- Bericht "Kassenbestand" muss noch in Customer.dll ergänzt und in Query angegeben werden + +SELECT bk.Oid, bk.Kassenname, bt.ZahlungsTyp, bt.Betrag, bt.Zahlungsdatum, bk.ObjectTid, ':Monat_Start', bt.InsTs + FROM bargeldtransaktion bt + JOIN bargeldkasse bk ON bt.BargeldkassenOid = bk.Oid + WHERE bk.isactive = 1 +Query: +'100', '24', '0', 'Kassenbestand', 'SELECT bk.Oid, bk.Kassenname, bt.ZahlungsTyp, bt.Betrag, bt.Zahlungsdatum, bk.ObjectTid, \':Monat_Start\', bt.InsTs\n FROM bargeldtransaktion bt \n JOIN bargeldkasse bk ON bt.BargeldkassenOid = bk.Oid \n where bk.isactive = 1\n \n ', 'direct', NULL, NULL, NULL, '1', '1', NULL, NULL, 'LebenshilfeBadKreuznachWohnstaette.Kassenbestand', NULL, NULL diff --git a/ReportImp/LebenshilfeBadKreuznachFUD/Statistics/CustomServiceRecordStatisticFactory.cs b/ReportImp/LebenshilfeBadKreuznachFUD/Statistics/CustomServiceRecordStatisticFactory.cs index 2351d2b88..bd3b07c4b 100644 --- a/ReportImp/LebenshilfeBadKreuznachFUD/Statistics/CustomServiceRecordStatisticFactory.cs +++ b/ReportImp/LebenshilfeBadKreuznachFUD/Statistics/CustomServiceRecordStatisticFactory.cs @@ -438,30 +438,15 @@ namespace LebenshilfeBadKreuznachFUD.Statistics { decimal preis = 0; - - String sdName = sr.ServiceDescription.Name.ToLower(); - - //if (sdName == "einzelbetreuung") - //{ - //String key = String.Format("{0}_{1}_{2}", sr.ServiceDescription.ServiceCategory.Name, sr.ServiceDescription.Name, sr.Start.m); - - //if (!preisFuerEinzelbetreuung.ContainsKey(key)) - //{ - //var neuerPreis = GetPreisVonServiceDescription(sr.ServiceDescription, sr.Start.Value); - //} - - preis = GetPreisVonServiceDescription(sr.ServiceDescription, sr.Start.Value) ?? 0; - preis *= (sr.RoundedDuration/60); - //} - //} - - var fahrtkosten = GetPreis("Fahrtkostenpauschale", sr.Start.Value); //Einmal Fahrtkosten pro Termin - + preis = GetPreisVonServiceDescription(sr.ServiceDescription, sr.Start.Value) ?? 0; + preis *= (sr.RoundedDuration/60); + var fahrtkosten = GetPreis("Hausbesuchspauschale", sr.Start.Value); //Einmal Fahrtkosten pro Tag an dem ein Termin stattgefunden hat var firstOfMonthDt = new DateTime(statisticsDate.Year, statisticsDate.Month, 1); if (sr.Start >= firstOfMonthDt && sr.Start < firstOfMonthDt.AddMonths(1)) { periodStats.AmountConsumedThisInterval += preis; + if (!periodStats.ServiceRecords.Any(r => r.ServiceRecordOid != sr.Oid && r.ServiceDescription.CategoryName.ToLower().StartsWith("entlastung") && r.Start.HasValue && r.Start.Value.Date == sr.Start.Value.Date)) periodStats.AmountConsumedThisInterval += fahrtkosten; } if (sr.GroupEmployeeCount.HasValue) @@ -469,8 +454,6 @@ namespace LebenshilfeBadKreuznachFUD.Statistics preis /= sr.GroupEmployeeCount.Value; } - - periodStats.AmountConsumedTotal += preis; periodStats.AmountConsumedTotal += fahrtkosten; @@ -484,23 +467,7 @@ namespace LebenshilfeBadKreuznachFUD.Statistics { periodStats.Custom4 = preis + (periodStats.Custom4 ?? 0); } - //var oidKey = periodStats.SupportConceptApprovalPeriod.SupportConceptApprovalPeriodOid.Value; - - - - - // if (!oid2BetragVorjahrAb17.ContainsKey(oidKey) && periodStats.SupportConceptApprovalPeriod.ServiceCategory != null) - //{ - // decimal restVorjahr = 0; - // decimal restVorVorjahr = 0; - // BerechneRestBetragVorjahr(sr.CustomerOid.Value, periodStats.SupportConceptApprovalPeriod.StartDate.Value.Year, periodStats.SupportConceptApprovalPeriod.ServiceCategory.Name, out restVorjahr, out restVorVorjahr); - // oid2BetragVorjahrAb17[oidKey] = restVorjahr; - // oid2BetragVorjahr16[oidKey] = restVorVorjahr; - // } - - - - } + } } public decimal GetPreis(String preisBezeichnung, DateTime datum) diff --git a/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.cs b/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.cs new file mode 100644 index 000000000..0a930acfa --- /dev/null +++ b/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.cs @@ -0,0 +1,178 @@ +using System; +using System.Linq; +using System.Text; +using BS.Shared; +using BS.Shared.Extensions; +using BeWo.Report; +using BeWo.Report.ReportObjects; +using BeWo.Data.Entities; +using BeWo.Data.Access; +using System.Collections.Generic; +using System.Windows.Forms.VisualStyles; +using BS.Shared.Core; +using BS.Shared.Services; +using BS.Shared.DataContracts; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; +using BeWo.Service.ServiceImplementations; + +namespace LebenshilfeBadKreuznachWohnstaette +{ + [IDSpecificClass(Identifier = "Kassenbestand")] + public partial class Kassenbestand : DevExpress.XtraReports.UI.XtraReport, IBeWoReport + { + + public Kassenbestand() + { + InitializeComponent(); + } + + public void SetReportDataSource(QueryRO pRO) + { + DateTime abfrageMonat = new DateTime(DateTime.Now.Year, 1, 1); + DateTime letztesDatum = DateTime.MinValue; + + Dictionary oid2Kasse = new Dictionary(); + List kassen = new List(); + + + if (pRO.Rows != null) + { + if (pRO.Rows.Count > 0 && pRO.Rows[0].Field7 != null) + { + DateTime.TryParse(pRO.Rows[0].Field7.ToString(), out abfrageMonat); + } + foreach (var row in pRO.Rows) + { + + long oid = Int64.Parse(row.Field1.ToString()); + + Kasse kto = null; + + if (!oid2Kasse.ContainsKey(oid)) + { + kto = new Kasse(); + kto.Transaktionen = new List(); + kto.Name = String.Format("{0}", row.Field2); + + kassen.Add(kto); + + oid2Kasse.Add(oid, kto); + } + else + { + kto = oid2Kasse[oid]; + } + + BargeldtransaktionDC dc = new BargeldtransaktionDC(); + + if (row.Field3 != null && (bool) row.Field3) + { + dc.Zahlungstyp = Zahlungstyp.Auszahlung; + + } + else + { + dc.Zahlungstyp = Zahlungstyp.Einzahlung; + } + decimal betrag = 0; + if (row.Field4 != null) + { + Decimal.TryParse(row.Field4.ToString(), out betrag); + } + dc.Betrag = betrag; + + + + DateTime zahlungsdatum = DateTime.MinValue; + if (row.Field5 != null) + { + if (DateTime.TryParse(row.Field5.ToString(), out zahlungsdatum)) + { + dc.Zahlungsdatum = zahlungsdatum; + } + + } + DateTime insts = DateTime.MinValue; + if (row.Field8 != null) + { + if (DateTime.TryParse(row.Field8.ToString(), out insts)) + { + if (insts > letztesDatum) + { + letztesDatum = insts; + } + } + + } + + kto.Transaktionen.Add(dc); + + } + } + + decimal gesamt = 0; + decimal hauptkassegesamt = 0; + int rowIdx = 1; + QueryRO newRo = new QueryRO(); + + var stichtag = abfrageMonat.AddMonths(1); + + foreach (var kto in kassen.OrderBy(k => k.Name)) + { + QueryRO.Row row = new QueryRO.Row(); + newRo.Rows.Add(row); + + row.Field1 = String.Format("{0}", rowIdx++); + row.Field2 = kto.Name; + + decimal kassenBetrag = GetGesamtBetrag(kto, stichtag); + + gesamt += kassenBetrag; + row.Field3 = String.Format("{0:c}", kassenBetrag); + } + + + if (letztesDatum == DateTime.MinValue) + { + letztesDatum = DateTime.Now; + } + lblLetzterStand.Text = String.Format("{0:MMMM yyyy}", abfrageMonat); + + + lblGesamt.Text = String.Format("{0:c}", gesamt); + + this.bindingSource1.DataSource = newRo; + } + + private decimal GetGesamtBetrag(Kasse kto, DateTime stichtag) + { + decimal kassenBetrag = 0; + foreach (var t in kto.Transaktionen) + { + if (t.Zahlungsdatum.HasValue && t.Zahlungsdatum < stichtag) + { + if (t.Zahlungstyp == Zahlungstyp.Einzahlung) + { + kassenBetrag += t.Betrag ?? 0; + } + else + { + kassenBetrag -= t.Betrag ?? 0; + } + } + } + + return kassenBetrag; + } + + internal class Kasse + { + public String Name { get; set; } + public decimal Betrag { get; set; } + public List Transaktionen { get; set; } + } + + } + +} diff --git a/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.designer.cs b/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.designer.cs new file mode 100644 index 000000000..b3318bd62 --- /dev/null +++ b/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.designer.cs @@ -0,0 +1,485 @@ +using BeWo.Report.ReportObjects; +namespace LebenshilfeBadKreuznachWohnstaette +{ + partial class Kassenbestand + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); + this.xrTable5 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel(); + this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); + this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrTable3 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.lblLetzterStand = new DevExpress.XtraReports.UI.XRLabel(); + this.pageFooterBand1 = new DevExpress.XtraReports.UI.PageFooterBand(); + this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); + this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); + this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); + this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); + this.DataField = new DevExpress.XtraReports.UI.XRControlStyle(); + this.fieldFLS = new DevExpress.XtraReports.UI.CalculatedField(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.fieldStdWoche = new DevExpress.XtraReports.UI.CalculatedField(); + this.fieldHilfebedarf = new DevExpress.XtraReports.UI.CalculatedField(); + this.fieldDirLeiProzent = new DevExpress.XtraReports.UI.CalculatedField(); + this.fieldFachkraftProzent = new DevExpress.XtraReports.UI.CalculatedField(); + this.GroupHeader2 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.lblGesamt = new DevExpress.XtraReports.UI.XRLabel(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.HeightF = 0F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // Detail1 + // + this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTable5}); + this.Detail1.HeightF = 25F; + this.Detail1.KeepTogetherWithDetailReports = true; + this.Detail1.Name = "Detail1"; + this.Detail1.StylePriority.UseFont = false; + // + // xrTable5 + // + this.xrTable5.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTable5.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrTable5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrTable5.Name = "xrTable5"; + this.xrTable5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F); + this.xrTable5.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow5}); + this.xrTable5.SizeF = new System.Drawing.SizeF(550F, 25F); + this.xrTable5.StylePriority.UseBorders = false; + this.xrTable5.StylePriority.UseFont = false; + this.xrTable5.StylePriority.UsePadding = false; + this.xrTable5.StylePriority.UseTextAlignment = false; + this.xrTable5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // xrTableRow5 + // + this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell21, + this.xrTableCell22, + this.xrTableCell24}); + this.xrTableRow5.Name = "xrTableRow5"; + this.xrTableRow5.Weight = 1D; + // + // xrTableCell21 + // + this.xrTableCell21.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field1")}); + this.xrTableCell21.Multiline = true; + this.xrTableCell21.Name = "xrTableCell21"; + this.xrTableCell21.StylePriority.UseTextAlignment = false; + this.xrTableCell21.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell21.Weight = 0.22156566730822536D; + // + // xrTableCell22 + // + this.xrTableCell22.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field2")}); + this.xrTableCell22.Name = "xrTableCell22"; + this.xrTableCell22.StylePriority.UseTextAlignment = false; + this.xrTableCell22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell22.Weight = 1.7725253587178085D; + // + // xrTableCell24 + // + this.xrTableCell24.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Rows.Field3")}); + this.xrTableCell24.Name = "xrTableCell24"; + this.xrTableCell24.StylePriority.UseFont = false; + this.xrTableCell24.StylePriority.UseTextAlignment = false; + this.xrTableCell24.Text = "xrTableCell14"; + this.xrTableCell24.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell24.Weight = 0.44313129888000868D; + // + // xrLabel13 + // + this.xrLabel13.Font = new System.Drawing.Font("Arial", 14F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline)))); + this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00001F); + this.xrLabel13.Name = "xrLabel13"; + this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel13.SizeF = new System.Drawing.SizeF(550.0002F, 23F); + this.xrLabel13.StylePriority.UseFont = false; + this.xrLabel13.StylePriority.UseTextAlignment = false; + this.xrLabel13.Text = "Bargeldkassenbestand"; + this.xrLabel13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // DetailReport + // + this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail1, + this.GroupFooter1}); + this.DetailReport.DataMember = "Rows"; + this.DetailReport.DataSource = this.bindingSource1; + this.DetailReport.Level = 0; + this.DetailReport.Name = "DetailReport"; + // + // GroupFooter1 + // + this.GroupFooter1.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.GroupFooter1.HeightF = 0F; + this.GroupFooter1.Name = "GroupFooter1"; + this.GroupFooter1.StylePriority.UseFont = false; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.QueryRO); + // + // xrTable3 + // + this.xrTable3.BackColor = System.Drawing.Color.LightGray; + this.xrTable3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTable3.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0.0002543131F, 0F); + this.xrTable3.Name = "xrTable3"; + this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F); + this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow3}); + this.xrTable3.SizeF = new System.Drawing.SizeF(550F, 40F); + this.xrTable3.StylePriority.UseBackColor = false; + this.xrTable3.StylePriority.UseBorders = false; + this.xrTable3.StylePriority.UseFont = false; + this.xrTable3.StylePriority.UsePadding = false; + this.xrTable3.StylePriority.UseTextAlignment = false; + this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // xrTableRow3 + // + this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell2, + this.xrTableCell3, + this.xrTableCell8}); + this.xrTableRow3.Name = "xrTableRow3"; + this.xrTableRow3.Weight = 1.1162794658854165D; + // + // xrTableCell2 + // + this.xrTableCell2.Multiline = true; + this.xrTableCell2.Name = "xrTableCell2"; + this.xrTableCell2.Text = "Nr."; + this.xrTableCell2.Weight = 0.22156572539016617D; + // + // xrTableCell3 + // + this.xrTableCell3.Multiline = true; + this.xrTableCell3.Name = "xrTableCell3"; + this.xrTableCell3.StylePriority.UseTextAlignment = false; + this.xrTableCell3.Text = "Kassenname"; + this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell3.Weight = 1.7725258540908375D; + // + // xrTableCell8 + // + this.xrTableCell8.Name = "xrTableCell8"; + this.xrTableCell8.StylePriority.UseTextAlignment = false; + this.xrTableCell8.Text = "Betrag"; + this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell8.Weight = 0.44313146335503756D; + // + // ReportHeader + // + this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.lblLetzterStand, + this.xrLabel13}); + this.ReportHeader.HeightF = 80F; + this.ReportHeader.Name = "ReportHeader"; + // + // lblLetzterStand + // + this.lblLetzterStand.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.lblLetzterStand.LocationFloat = new DevExpress.Utils.PointFloat(0.0002543131F, 32.99999F); + this.lblLetzterStand.Name = "lblLetzterStand"; + this.lblLetzterStand.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblLetzterStand.SizeF = new System.Drawing.SizeF(550.0002F, 23F); + this.lblLetzterStand.StylePriority.UseFont = false; + this.lblLetzterStand.StylePriority.UseTextAlignment = false; + this.lblLetzterStand.Text = "Übersicht Treuhandkonten ABW"; + this.lblLetzterStand.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + // + // pageFooterBand1 + // + this.pageFooterBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrPageInfo2, + this.xrPageInfo1}); + this.pageFooterBand1.HeightF = 48F; + this.pageFooterBand1.Name = "pageFooterBand1"; + // + // xrPageInfo2 + // + this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F); + this.xrPageInfo2.Format = "Seite {0} von {1}"; + this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(450F, 25F); + this.xrPageInfo2.Name = "xrPageInfo2"; + this.xrPageInfo2.SizeF = new System.Drawing.SizeF(100.0001F, 23F); + this.xrPageInfo2.StyleName = "PageInfo"; + this.xrPageInfo2.StylePriority.UseFont = false; + this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + // + // xrPageInfo1 + // + this.xrPageInfo1.Font = new System.Drawing.Font("Arial", 8F); + this.xrPageInfo1.Format = "Abfragedatum: {0:dddd, d. MMMM yyyy}"; + this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 25F); + this.xrPageInfo1.Name = "xrPageInfo1"; + this.xrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime; + this.xrPageInfo1.SizeF = new System.Drawing.SizeF(450.0002F, 23F); + this.xrPageInfo1.StyleName = "PageInfo"; + this.xrPageInfo1.StylePriority.UseFont = false; + // + // Title + // + this.Title.BackColor = System.Drawing.Color.White; + this.Title.BorderColor = System.Drawing.SystemColors.ControlText; + this.Title.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.Title.BorderWidth = 1F; + this.Title.Font = new System.Drawing.Font("Times New Roman", 24F); + this.Title.ForeColor = System.Drawing.Color.Black; + this.Title.Name = "Title"; + // + // FieldCaption + // + this.FieldCaption.BackColor = System.Drawing.Color.White; + this.FieldCaption.BorderColor = System.Drawing.SystemColors.ControlText; + this.FieldCaption.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.FieldCaption.BorderWidth = 1F; + this.FieldCaption.Font = new System.Drawing.Font("Times New Roman", 10F, System.Drawing.FontStyle.Bold); + this.FieldCaption.ForeColor = System.Drawing.Color.Black; + this.FieldCaption.Name = "FieldCaption"; + // + // PageInfo + // + this.PageInfo.BackColor = System.Drawing.Color.White; + this.PageInfo.BorderColor = System.Drawing.SystemColors.ControlText; + this.PageInfo.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.PageInfo.BorderWidth = 1F; + this.PageInfo.Font = new System.Drawing.Font("Times New Roman", 8F); + this.PageInfo.ForeColor = System.Drawing.Color.Black; + this.PageInfo.Name = "PageInfo"; + // + // DataField + // + this.DataField.BackColor = System.Drawing.Color.White; + this.DataField.BorderColor = System.Drawing.SystemColors.ControlText; + this.DataField.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.DataField.BorderWidth = 1F; + this.DataField.Font = new System.Drawing.Font("Times New Roman", 8F); + this.DataField.ForeColor = System.Drawing.SystemColors.ControlText; + this.DataField.Name = "DataField"; + // + // fieldFLS + // + this.fieldFLS.DataMember = "FLSReportGroups"; + this.fieldFLS.DataSource = this.bindingSource1; + this.fieldFLS.Expression = "[TotalFLM] / 60"; + this.fieldFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldFLS.Name = "fieldFLS"; + // + // topMarginBand1 + // + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 50F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // fieldStdWoche + // + this.fieldStdWoche.DataMember = "Rows.ChildRows1"; + this.fieldStdWoche.Expression = "[Field4]"; + this.fieldStdWoche.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldStdWoche.Name = "fieldStdWoche"; + // + // fieldHilfebedarf + // + this.fieldHilfebedarf.DataMember = "Rows.ChildRows1"; + this.fieldHilfebedarf.Expression = "[Field5]"; + this.fieldHilfebedarf.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldHilfebedarf.Name = "fieldHilfebedarf"; + // + // fieldDirLeiProzent + // + this.fieldDirLeiProzent.DataMember = "Rows.ChildRows1"; + this.fieldDirLeiProzent.Expression = "[Field8]"; + this.fieldDirLeiProzent.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldDirLeiProzent.Name = "fieldDirLeiProzent"; + // + // fieldFachkraftProzent + // + this.fieldFachkraftProzent.DataMember = "Rows.ChildRows1"; + this.fieldFachkraftProzent.Expression = "[Field11]"; + this.fieldFachkraftProzent.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldFachkraftProzent.Name = "fieldFachkraftProzent"; + // + // GroupHeader2 + // + this.GroupHeader2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTable3}); + this.GroupHeader2.HeightF = 40F; + this.GroupHeader2.Name = "GroupHeader2"; + // + // GroupFooter2 + // + this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel2, + this.lblGesamt}); + this.GroupFooter2.HeightF = 23F; + this.GroupFooter2.Level = 1; + this.GroupFooter2.Name = "GroupFooter2"; + // + // xrLabel2 + // + this.xrLabel2.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(449.9999F, 23F); + this.xrLabel2.StylePriority.UseBorders = false; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.StylePriority.UsePadding = false; + this.xrLabel2.StylePriority.UseTextAlignment = false; + this.xrLabel2.Text = "Gesamt:"; + this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + // + // lblGesamt + // + this.lblGesamt.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold); + this.lblGesamt.LocationFloat = new DevExpress.Utils.PointFloat(450F, 0F); + this.lblGesamt.Name = "lblGesamt"; + this.lblGesamt.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F); + this.lblGesamt.SizeF = new System.Drawing.SizeF(100.0002F, 23F); + this.lblGesamt.StylePriority.UseBorders = false; + this.lblGesamt.StylePriority.UseFont = false; + this.lblGesamt.StylePriority.UsePadding = false; + this.lblGesamt.StylePriority.UseTextAlignment = false; + this.lblGesamt.Text = "0,00"; + this.lblGesamt.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + // + // Bargeldkassensaldo + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.DetailReport, + this.ReportHeader, + this.pageFooterBand1, + this.topMarginBand1, + this.bottomMarginBand1, + this.GroupHeader2, + this.GroupFooter2}); + this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { + this.fieldStdWoche, + this.fieldHilfebedarf, + this.fieldDirLeiProzent, + this.fieldFachkraftProzent}); + this.DataSource = this.bindingSource1; + this.DisplayName = "Bargeldkassensaldo"; + this.Margins = new System.Drawing.Printing.Margins(100, 100, 100, 50); + this.PageHeight = 1169; + this.PageWidth = 827; + this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; + this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] { + this.Title, + this.FieldCaption, + this.PageInfo, + this.DataField}); + this.Version = "13.2"; + ((System.ComponentModel.ISupportInitialize)(this.xrTable5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.DetailBand Detail1; + private DevExpress.XtraReports.UI.DetailReportBand DetailReport; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.PageFooterBand pageFooterBand1; + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2; + private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1; + private DevExpress.XtraReports.UI.XRControlStyle Title; + private DevExpress.XtraReports.UI.XRControlStyle FieldCaption; + private DevExpress.XtraReports.UI.XRControlStyle PageInfo; + private DevExpress.XtraReports.UI.XRControlStyle DataField; + private DevExpress.XtraReports.UI.CalculatedField fieldFLS; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1; + private DevExpress.XtraReports.UI.XRLabel xrLabel13; + private DevExpress.XtraReports.UI.XRTable xrTable3; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow3; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; + private DevExpress.XtraReports.UI.XRTable xrTable5; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell21; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell22; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell24; + private DevExpress.XtraReports.UI.CalculatedField fieldStdWoche; + private DevExpress.XtraReports.UI.CalculatedField fieldHilfebedarf; + private DevExpress.XtraReports.UI.CalculatedField fieldDirLeiProzent; + private DevExpress.XtraReports.UI.CalculatedField fieldFachkraftProzent; + private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader2; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2; + private DevExpress.XtraReports.UI.XRLabel lblGesamt; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRLabel lblLetzterStand; + } +} diff --git a/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.resx b/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.resx new file mode 100644 index 000000000..d25f3eba2 --- /dev/null +++ b/ReportImp/LebenshilfeBadKreuznachWohnstaette/Kassenbestand.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/ReportImp/LebenshilfeBadKreuznachWohnstaette/LebenshilfeBadKreuznachWohnstaette.csproj b/ReportImp/LebenshilfeBadKreuznachWohnstaette/LebenshilfeBadKreuznachWohnstaette.csproj index ff28b5d30..eb4b355b0 100644 --- a/ReportImp/LebenshilfeBadKreuznachWohnstaette/LebenshilfeBadKreuznachWohnstaette.csproj +++ b/ReportImp/LebenshilfeBadKreuznachWohnstaette/LebenshilfeBadKreuznachWohnstaette.csproj @@ -61,6 +61,12 @@ AdditionalServiceBookingReport.cs + + Component + + + Kassenbestand.cs + Component @@ -97,6 +103,9 @@ AdditionalServiceBookingReport.cs + + Kassenbestand.cs + NotizenReport.cs Designer From 180f7a04f7f29fad9b8d56809694f7eb7d28a225 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Fri, 4 Jul 2025 12:53:43 +0200 Subject: [PATCH 03/35] VereinBeratungTherapie/Invoicing/CollectiveInvoiceCreation - KA auf halbe Stunden runden --- .../Invoicing/CollectiveInvoiceCreation.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReportImp/VereinBeratungTherapie/Invoicing/CollectiveInvoiceCreation.cs b/ReportImp/VereinBeratungTherapie/Invoicing/CollectiveInvoiceCreation.cs index 170395c3a..732724c5f 100644 --- a/ReportImp/VereinBeratungTherapie/Invoicing/CollectiveInvoiceCreation.cs +++ b/ReportImp/VereinBeratungTherapie/Invoicing/CollectiveInvoiceCreation.cs @@ -229,6 +229,8 @@ namespace VereinBeratungTherapie.Invoicing } else { + // KA wird auf nächste halbe Stunde gerundet... + lgMin = Math.Round(lgMin / 30) * 30; preisLG = data[0].AmountTotal.Value; preis = Math.Round(preisLG / 60, 4, MidpointRounding.AwayFromZero); ii.AmountPerUnit = Math.Round(preis * lgMin, 2, MidpointRounding.AwayFromZero); From 5fcd895c1232c4c287b1ec2efd1b87882f953412 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Fri, 4 Jul 2025 15:33:15 +0200 Subject: [PATCH 04/35] gkv hotfix: tooltip- + validierungsfehler behoben --- BeWo/Converter/TooltipTextConverter.cs | 5 +++-- Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/BeWo/Converter/TooltipTextConverter.cs b/BeWo/Converter/TooltipTextConverter.cs index f38cde2fe..d8ff1d8f1 100644 --- a/BeWo/Converter/TooltipTextConverter.cs +++ b/BeWo/Converter/TooltipTextConverter.cs @@ -1,4 +1,5 @@ using BeWo.ViewModel; +using BeWo.ViewModel.Light; using System; using System.Collections.Generic; using System.Globalization; @@ -18,7 +19,7 @@ namespace BeWo.Converter return val_bool ? null : parameter; } - if (value is GkvAbrechnungVM gkv) + if (value is GkvAbrechnungLightVM gkv) { if (parameter is string s) { @@ -29,7 +30,7 @@ namespace BeWo.Converter } } - if (value is InvoiceBaseVM invoice) + if (value is InvoiceBaseLightVM invoice) { return invoice.IsGkvValidError; } diff --git a/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs b/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs index 7f4af9783..f0339cd64 100644 --- a/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs +++ b/Service/DCEntityMapper/GkvAbrechnungDC_GkvAbrechnung.cs @@ -72,7 +72,7 @@ namespace BeWo.Service.DCEntityMapper isReady = false; tooltip = "Organisation ist nicht Gkv Ready"; } - else if (!DAOFactory.FinanceDAO.HaveIKDatenannahmestelleChanged(gkvAbrechnung, orga.IKDatenannahmestelle)) + else if (DAOFactory.FinanceDAO.HaveIKDatenannahmestelleChanged(gkvAbrechnung, orga.IKDatenannahmestelle)) { isReady = false; tooltip = "Datenannahmestelle hat sich geändert. Bitte neue Abrechnung erstellen."; From c4eb3e80836f734eff1086ed5f7a2bcb9a7615b0 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Mon, 7 Jul 2025 09:47:01 +0200 Subject: [PATCH 05/35] gkv: additional error message --- Service/ServiceImplementations/GkvAccountingServiceImp.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Service/ServiceImplementations/GkvAccountingServiceImp.cs b/Service/ServiceImplementations/GkvAccountingServiceImp.cs index 8b26c1bbd..94d8feea9 100644 --- a/Service/ServiceImplementations/GkvAccountingServiceImp.cs +++ b/Service/ServiceImplementations/GkvAccountingServiceImp.cs @@ -534,7 +534,7 @@ namespace BeWo.Service.ServiceImplementations var response_app8 = SendApp8Request(request_app8); if (!response_app8.Success) - throw new GkvException(response_app8.Message); + throw new GkvException("app8: " + response_app8.Message); return response_app8; } From 3f6a1df20b6fcf41c0e701555958bcce3f41ccce Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Mon, 7 Jul 2025 09:56:06 +0200 Subject: [PATCH 06/35] =?UTF-8?q?Wenn=20er=20InvoiceItems=20findet,=20soll?= =?UTF-8?q?=20er=20nicht=20=C3=BCberspringen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Shared/Core/ValidatorExtended.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared/Core/ValidatorExtended.cs b/Shared/Core/ValidatorExtended.cs index a91221ef3..e8b008b28 100644 --- a/Shared/Core/ValidatorExtended.cs +++ b/Shared/Core/ValidatorExtended.cs @@ -56,7 +56,7 @@ namespace BS.Shared.Core public static IInvoiceItem GetInvalidUnitDescription(IEnumerable invoiceBases){ foreach(var invoiceBase in invoiceBases) { - if (invoiceBase?.IInvoiceItems?.Any() ?? true) + if (invoiceBase.IInvoiceItems is null && !invoiceBase.IInvoiceItems.Any()) continue; foreach (var invoiceitem in invoiceBase.IInvoiceItems) From 84690332db0f8f7d924aa3531d51b60526a4821f Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Mon, 7 Jul 2025 10:58:13 +0200 Subject: [PATCH 07/35] =?UTF-8?q?Zus=C3=A4tzliche=20Exception=20NAchrichte?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/GkvAbrechnungServer.aspx.cs | 2 +- .../GkvAccountingServiceImp.cs | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Host/GkvAbrechnungServer.aspx.cs b/Host/GkvAbrechnungServer.aspx.cs index 262afe45b..6a9111b6f 100644 --- a/Host/GkvAbrechnungServer.aspx.cs +++ b/Host/GkvAbrechnungServer.aspx.cs @@ -79,7 +79,7 @@ namespace Host catch (Exception ex) { var ex_text = ex.Message + "\n" + ex.StackTrace; - SendErrorResponse(ex_text); + SendErrorResponse("Exception: " + ex_text); } Response.End(); diff --git a/Service/ServiceImplementations/GkvAccountingServiceImp.cs b/Service/ServiceImplementations/GkvAccountingServiceImp.cs index 94d8feea9..c942763f3 100644 --- a/Service/ServiceImplementations/GkvAccountingServiceImp.cs +++ b/Service/ServiceImplementations/GkvAccountingServiceImp.cs @@ -22,6 +22,7 @@ using Dakota.Logic; using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.Serialization; @@ -533,8 +534,20 @@ namespace BeWo.Service.ServiceImplementations var response_app8 = SendApp8Request(request_app8); + if (response_app8 == null) + throw new GkvException("response null", "App8"); + if (!response_app8.Success) - throw new GkvException("app8: " + response_app8.Message); + { + if(string.IsNullOrWhiteSpace(response_app8.TitleMessage) && string.IsNullOrWhiteSpace(response_app8.Message)) + { + throw new GkvException("no success", "App8"); + } + else + { + throw new GkvException(response_app8.TitleMessage + ":" + response_app8.Message, "App8"); + } + } return response_app8; } From 25c5bf4945a92e0c0928ebd9c1835c4aac0fa5fa Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Mon, 7 Jul 2025 10:58:46 +0200 Subject: [PATCH 08/35] Gkv Einstellungen: Farben korrekt gesetzt --- .../View/Detail/Administration/SoziotherapieSettingsView.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BeWo/View/Detail/Administration/SoziotherapieSettingsView.xaml b/BeWo/View/Detail/Administration/SoziotherapieSettingsView.xaml index 3d54d5a81..716cb6fe6 100644 --- a/BeWo/View/Detail/Administration/SoziotherapieSettingsView.xaml +++ b/BeWo/View/Detail/Administration/SoziotherapieSettingsView.xaml @@ -98,7 +98,7 @@ Grid.Row="0" Grid.Column="1" Margin="3" - SelectedColor="{Binding ColorWaitTooLong, Mode=TwoWay}" /> + SelectedColor="{Binding ColorSendUrbelege, Mode=TwoWay}" />