From cdc9416b7f34d6add32378ffe5ab9283105d3b96 Mon Sep 17 00:00:00 2001 From: Marcel Hirschle Date: Tue, 28 Feb 2023 12:29:16 +0100 Subject: [PATCH] =?UTF-8?q?MH:=20Nochmal=20hph=20Bersenbr=C3=BCck,=20sie?= =?UTF-8?q?=20hatte=20was=20vergessen..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detail/Report/DienstplanerView.xaml.cs | 5 +- .../Mitarbeiterarbeitszeitkonto.designer.cs | 10 +- .../Quittierungsbeleg.Designer.cs | 15 ++- Report/DefaultReports/RosterReport.cs | 57 +++++++-- Report/ReportObjects/RosterIstRO.cs | 42 +++++-- Report/ReportObjects/RosterRO.cs | 111 ++++++++++++++++-- .../BHVBergischeHauspflege.csproj | 2 +- .../Invoicing/SettlementInvoiceCreation.cs | 6 +- .../ServicesOverviewReport.Designer.cs | 47 +------- .../ServicesOverviewReport.resx | 3 - Service/Plugins/PluginLoader.cs | 7 +- 11 files changed, 207 insertions(+), 98 deletions(-) diff --git a/BeWo/View/Detail/Report/DienstplanerView.xaml.cs b/BeWo/View/Detail/Report/DienstplanerView.xaml.cs index 69116cf6f..a54dd8c4b 100644 --- a/BeWo/View/Detail/Report/DienstplanerView.xaml.cs +++ b/BeWo/View/Detail/Report/DienstplanerView.xaml.cs @@ -2232,9 +2232,8 @@ namespace BeWo.View.Detail.Report + "&wid=" + wOid + "&dt=" + date.ToString("dd.MM.yyyy") + "&si=" + sortingIndex - + "&order=" + Convert.ToInt32(aufsteigend) - + "&creator=" + employeeOid; - + + "&order=" + Convert.ToInt32(aufsteigend) + + "&creator=" + employeeOid; if (sollOderIst == "soll") { List tage = new List(); diff --git a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs index 511418058..a65a8d0f8 100644 --- a/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs +++ b/Report/DefaultReports/Mitarbeiterarbeitszeitkonto.designer.cs @@ -97,6 +97,7 @@ namespace BeWo.Report.DefaultReports this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.Title = new DevExpress.XtraReports.UI.XRControlStyle(); this.FieldCaption = new DevExpress.XtraReports.UI.XRControlStyle(); this.PageInfo = new DevExpress.XtraReports.UI.XRControlStyle(); @@ -114,7 +115,6 @@ namespace BeWo.Report.DefaultReports this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); @@ -844,6 +844,10 @@ namespace BeWo.Report.DefaultReports this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell26.Weight = 0.11143081848591821D; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); + // // Title // this.Title.BackColor = System.Drawing.Color.White; @@ -973,10 +977,6 @@ namespace BeWo.Report.DefaultReports this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); - // // Mitarbeiterarbeitszeitkonto // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { diff --git a/Report/DefaultReports/Quittierungsbeleg.Designer.cs b/Report/DefaultReports/Quittierungsbeleg.Designer.cs index 9a897f95c..72c75fec8 100644 --- a/Report/DefaultReports/Quittierungsbeleg.Designer.cs +++ b/Report/DefaultReports/Quittierungsbeleg.Designer.cs @@ -29,7 +29,6 @@ namespace BeWo.Report.DefaultReports /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Quittierungsbeleg)); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); @@ -62,6 +61,7 @@ namespace BeWo.Report.DefaultReports this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell43 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel(); @@ -118,13 +118,12 @@ namespace BeWo.Report.DefaultReports this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -535,6 +534,10 @@ namespace BeWo.Report.DefaultReports 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]"; @@ -1226,10 +1229,6 @@ namespace BeWo.Report.DefaultReports this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldKontaktArt.Name = "fieldKontaktArt"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); - // // Quittierungsbeleg // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -1255,10 +1254,10 @@ namespace BeWo.Report.DefaultReports this.Version = "17.1"; ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } diff --git a/Report/DefaultReports/RosterReport.cs b/Report/DefaultReports/RosterReport.cs index 5facf9dc9..d8962d679 100644 --- a/Report/DefaultReports/RosterReport.cs +++ b/Report/DefaultReports/RosterReport.cs @@ -27,6 +27,7 @@ namespace BeWo.Report.DefaultReports 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() @@ -37,11 +38,21 @@ namespace BeWo.Report.DefaultReports InitializeComponent2(); } - public void SetReportDataSource(RosterRO pRO) + 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(); @@ -60,14 +71,14 @@ namespace BeWo.Report.DefaultReports 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); @@ -145,16 +156,16 @@ namespace BeWo.Report.DefaultReports } } - + } - + 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]; } @@ -210,7 +221,7 @@ namespace BeWo.Report.DefaultReports 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")}); + empColumn.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "RosterReportRows.Title") }); Title = empColumn; @@ -229,13 +240,13 @@ namespace BeWo.Report.DefaultReports { 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.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}" )}); + 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); @@ -289,7 +300,7 @@ namespace BeWo.Report.DefaultReports var index = cell.Index; - if (Table1.Rows[0].Cells[index].Text.Contains("Wo")) + if (Table1.Rows[0].Cells[index].Text.Contains("Wo")) { if (!WoIndexes.Contains(index)) WoIndexes.Add(index); @@ -320,8 +331,30 @@ namespace BeWo.Report.DefaultReports } } } + 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(); + cell.Row.Cells[index].ForeColor = Color.Red; + } + } + } + - //if (index > LastIndex) // Modifier = 0; @@ -376,7 +409,7 @@ namespace BeWo.Report.DefaultReports 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/Report/ReportObjects/RosterIstRO.cs b/Report/ReportObjects/RosterIstRO.cs index 17042bf7e..071254967 100644 --- a/Report/ReportObjects/RosterIstRO.cs +++ b/Report/ReportObjects/RosterIstRO.cs @@ -13,8 +13,8 @@ namespace BeWo.Report.ReportObjects { public List PageObjects { get; set; } - public static RosterIstRO Create(List dienstEintragDCs, List dienstvertretungDCs, List employee, - List dienstInfoDCs, CompactWohnheimDC compactWohnheimDC, int year, int month, List feiertage, List absences, + public static RosterIstRO Create(List dienstEintragDCs, List dienstvertretungDCs, List employee, + List dienstInfoDCs, CompactWohnheimDC compactWohnheimDC, int year, int month, List feiertage, List absences, Dictionary stundenBeiAbwesenheit) { RosterIstRO ro = new RosterIstRO(); @@ -40,6 +40,7 @@ namespace BeWo.Report.ReportObjects var diensteFuerTag = mitarbeiterDesWohnheims ? dienstEintragDCs.Where(e => e.EmployeeOid == emp.EmployeeOid && e.Datum == datum).ToList() : null; var vertretungenFuerTag = !mitarbeiterDesWohnheims ? dienstvertretungDCs.Where(e => e.EmployeeOid == emp.EmployeeOid && e.Datum == datum).ToList() : null; + var abwesenheitenFuerTag = absences.Where(a => datum >= a.AbsenceSpan.StartDate && datum <= a.AbsenceSpan.EndDate && a.EmployeeOid == emp.EmployeeOid).ToList(); string kr = null; string ur = null; @@ -56,6 +57,30 @@ namespace BeWo.Report.ReportObjects if (mitarbeiterDesWohnheims) { List listeneintraege = new List(); + foreach (var abs in abwesenheitenFuerTag) + { + string[] urlaubKrankheit = new string[2]; + if (!diensteFuerTag.Any(d => d.Datum.Date == datum.Date)) + { + // AUSPROGRAMMIEREN + if (abs.Reason.Description.ToLower().Contains("krank")) + urlaubKrankheit[0] = string.Format("{0:0.00}", stundenBeiAbwesenheit[abs.EmployeeOid]); + else if (abs.Reason.Description.ToLower().Contains("urlaub")) + urlaubKrankheit[1] = string.Format("{0:0.00}", stundenBeiAbwesenheit[abs.EmployeeOid]); + + listeneintraege.Add(new Listeneintrag() + { + Position = pos, + Datum = datum, + EmployeeOid = (long)emp.EmployeeOid, + Notice = feiertage.Any(f => f.Datum == datum) ? feiertage.First(f => f.Datum == datum).Name : abs.Reason.Description, + Krankheit = urlaubKrankheit[0], + Urlaub = urlaubKrankheit[1] + }); + pos++; + } + } + foreach (var item in diensteFuerTag) { string[] urlaubKrankheit = UrlaubUndKrankheitUeberpruefen(item, null, absences, stundenBeiAbwesenheit); @@ -207,8 +232,8 @@ namespace BeWo.Report.ReportObjects }); } //else - foreach (var v in item.Value) - liste.Add(v); + foreach (var v in item.Value) + liste.Add(v); } ro.PageObjects.Add(new PageObject() @@ -233,9 +258,9 @@ namespace BeWo.Report.ReportObjects { if (eintrag.Datum >= absence.Start && eintrag.Datum <= absence.End.Value && eintrag.EmployeeOid == absence.EmployeeOid) { - if (absence.Reason.Description.ToLower().Contains("urlaub")) + if (absence.Reason.Description.ToLower().Contains("krank")) urlaubKrankheit[0] = string.Format("{0:0.00}", stundenBeiAbwesenheit[absence.EmployeeOid]); - else if (absence.Reason.Description.ToLower().Contains("krank")) + else if (absence.Reason.Description.ToLower().Contains("urlaub")) urlaubKrankheit[1] = string.Format("{0:0.00}", stundenBeiAbwesenheit[absence.EmployeeOid]); } } @@ -246,9 +271,9 @@ namespace BeWo.Report.ReportObjects { if (vertretung.Datum >= absence.Start && vertretung.Datum <= absence.End.Value && vertretung.EmployeeOid == absence.EmployeeOid) { - if (absence.Reason.Description.ToLower().Contains("urlaub")) + if (absence.Reason.Description.ToLower().Contains("krank")) urlaubKrankheit[0] = string.Format("{0:0.00}", stundenBeiAbwesenheit[absence.EmployeeOid]); - else if (absence.Reason.Description.ToLower().Contains("krank")) + else if (absence.Reason.Description.ToLower().Contains("urlaub")) urlaubKrankheit[1] = string.Format("{0:0.00}", stundenBeiAbwesenheit[absence.EmployeeOid]); } } @@ -280,3 +305,4 @@ namespace BeWo.Report.ReportObjects public List EintraegeProMitarbeiter { get; set; } } } + diff --git a/Report/ReportObjects/RosterRO.cs b/Report/ReportObjects/RosterRO.cs index 4b857815b..7ed4ec437 100644 --- a/Report/ReportObjects/RosterRO.cs +++ b/Report/ReportObjects/RosterRO.cs @@ -16,11 +16,12 @@ namespace BeWo.Report.ReportObjects public int FirstWeekDay { get; set; } public List Feiertage { get; set; } public EmployeeDC Creator { get; set; } + public RosterRO() { RosterReportRows = new List(); } - + public static RosterRO Create(List dienstBlockDCs, List dienstInfoDCs, BS.Shared.DataContracts.Compact.CompactWohnheimDC compactWohnheimDC, int year, int month) { var dt = new DateTime(year, month, 1); @@ -62,7 +63,7 @@ namespace BeWo.Report.ReportObjects Title = i == 0 ? block.Employee.LastNameFirstName : null, DienstDict = new Dictionary() }; - + foreach (var kv in dict) { var dienst = infoDict[kv.Value]; @@ -83,7 +84,7 @@ namespace BeWo.Report.ReportObjects return res; } - public static RosterRO CreateNew(List dienstEintragDCs, List dienstvertretungDCs, List employee, + public static RosterRO CreateNew(List dienstEintragDCs, List dienstvertretungDCs, List employee, List dienstInfoDCs, BS.Shared.DataContracts.Compact.CompactWohnheimDC compactWohnheimDC, int year, int month, List feiertage, int sortingIndex, bool aufsteigend, EmployeeDC creator) { var dt = new DateTime(year, month, 1); @@ -112,11 +113,11 @@ namespace BeWo.Report.ReportObjects List> alleEintraegeSortiert = EintraegeSortieren(dienstEintragDCs); List> alleVertretungenSortiert = VertretungenSortieren(dienstvertretungDCs); - res = EintraegeEinfuegen(res, alleEintraegeSortiert, employee, infoDict); + res = EintraegeEinfuegen(res, alleEintraegeSortiert, employee, infoDict, year, month); res = VertretungenEinfuegen(res, alleVertretungenSortiert, employee, infoDict); // Hier sortieren nach DienstDict-Count. Sortier-Art aus Parameterliste nehmen - + if (sortingIndex == 0) // Alphabetisch { if (aufsteigend) @@ -188,8 +189,9 @@ namespace BeWo.Report.ReportObjects return allevertretungenSortiert; } - private static RosterRO EintraegeEinfuegen(RosterRO res, List> alleEintraegeSortiert, List employee, Dictionary infoDict) + private static RosterRO EintraegeEinfuegen(RosterRO res, List> alleEintraegeSortiert, List employee, Dictionary infoDict, int year, int month) { + infoDict = AddAbwesenheitseinträgeToInfoDict(infoDict); foreach (var block in alleEintraegeSortiert) { int lastRowIndex = 0; @@ -197,7 +199,7 @@ namespace BeWo.Report.ReportObjects { if (item.Zeile > lastRowIndex) lastRowIndex = item.Zeile; - } + } RosterReportRow row = null; double[] sum = new double[6]; @@ -215,7 +217,62 @@ namespace BeWo.Report.ReportObjects if (zeile.Count > 0) currentEmployee = employee.First(e => e.EmployeeOid == zeile[0].EmployeeOid); } - + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ContractDC currentContract = null; + var reportDate = new DateTime(year, month, 1); + foreach (var c in currentEmployee.Contracts) + { + if (c.ContractEndDate.HasValue) + { + if (c.EntryDate.Value <= reportDate && c.ContractEndDate.Value >= reportDate) + currentContract = c; + } + else + { + if (c.EntryDate.Value <= reportDate) + currentContract = c; + } + } + + // HIER URLAUB UND KRANKHEIT ALS DIENST ANLEGEN UND IN INFODICT EINFÜGEN, UM DIENSTEINTRÄGE MIT ENTSPRECHENDEM ABWESENHEITSDIENST ZU ERSTELLEN + + + foreach (var abwesenheit in currentEmployee.AbsenceTimes) + { + long absOid = 0; + if (abwesenheit.Reason.Description.ToLower().Contains("urlaub")) + absOid = -1; + else if (abwesenheit.Reason.Description.ToLower().Contains("krank")) + absOid = -2; + else if (abwesenheit.Reason.Description.ToLower().Contains("krank")) + absOid = -3; + + if (abwesenheit.Start.Value.Month == month && abwesenheit.Start.Value.Year == year || abwesenheit.End.Value.Month == month && abwesenheit.End.Value.Year == year) + { + + var start = abwesenheit.Start.Value; + + while (start <= abwesenheit.End.Value) + { + + DienstEintragDC absEintrag = new DienstEintragDC() + { + Datum = start, + DauerInStunden = Convert.ToDouble(currentContract.WeeklyTotalHours / currentContract.WeeklyDays), + EmployeeOid = currentEmployee.EmployeeOid.Value, + Notice = abwesenheit.Notice, + Zeile = 0, + DienstOid = absOid + }; + eintraegeNachZeilen[0].Add(absEintrag); + + start = start.AddDays(1); + } + + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// double monthlyHours = 0; for (int i = 0; i < eintraegeNachZeilen.Length; i++) @@ -248,7 +305,7 @@ namespace BeWo.Report.ReportObjects break; } } - + row.Employee = currentEmployee; @@ -379,15 +436,45 @@ namespace BeWo.Report.ReportObjects row.WeekSum = sum; row.MonthSum = (double)monthlyHours; - + } res.RosterReportRows = res.RosterReportRows.OrderBy(r => r.Employee.LastNameFirstName).ThenBy(r => r.Pos).ToList(); return res; } + + private static Dictionary AddAbwesenheitseinträgeToInfoDict(Dictionary infoDict) + { + infoDict.Add(-1, new DienstInfoDC() + { + //Dauer = Convert.ToDouble(currentContract.WeeklyTotalHours / currentContract.WeeklyDays), + DienstName = "Urlaub", + Farbe = "#FFFFFF", + Kurz = "U", + Oid = -1 + }); + infoDict.Add(-2, new DienstInfoDC() + { + //Dauer = Convert.ToDouble(currentContract.WeeklyTotalHours / currentContract.WeeklyDays), + DienstName = "Krankheit", + Farbe = "#FFFFFF", + Kurz = "K", + Oid = -2 + }); + infoDict.Add(-3, new DienstInfoDC() + { + //Dauer = Convert.ToDouble(currentContract.WeeklyTotalHours / currentContract.WeeklyDays), + DienstName = "Fortbildung", + Farbe = "#FFFFFF", + Kurz = "F", + Oid = -3 + }); + + return infoDict; + } } - + public class RosterReportRow { @@ -416,7 +503,7 @@ namespace BeWo.Report.ReportObjects public double? Week5 => WeekSum?[4]; public double? Week6 => WeekSum?[5]; - + public DienstInfoDC Day1 => GetDienst(1); public DienstInfoDC Day2 => GetDienst(2); diff --git a/ReportImp/BHVBergischeHauspflege/BHVBergischeHauspflege.csproj b/ReportImp/BHVBergischeHauspflege/BHVBergischeHauspflege.csproj index 1ba1aead1..788991ef3 100644 --- a/ReportImp/BHVBergischeHauspflege/BHVBergischeHauspflege.csproj +++ b/ReportImp/BHVBergischeHauspflege/BHVBergischeHauspflege.csproj @@ -4,7 +4,7 @@ Debug AnyCPU - {F63DB13E-7930-4D8D-8C2F-B83B25502A9D} + {375E3B1B-633A-477B-B0CF-C3A430B4A62D} Library Properties BHVBergischeHauspflege diff --git a/ReportImp/BetreutesWohnenAmRheinReports/Invoicing/SettlementInvoiceCreation.cs b/ReportImp/BetreutesWohnenAmRheinReports/Invoicing/SettlementInvoiceCreation.cs index 0c15f18b9..4230249e7 100644 --- a/ReportImp/BetreutesWohnenAmRheinReports/Invoicing/SettlementInvoiceCreation.cs +++ b/ReportImp/BetreutesWohnenAmRheinReports/Invoicing/SettlementInvoiceCreation.cs @@ -58,5 +58,9 @@ namespace BetreutesWohnenAmRheinReports.Invoicing } return true; } - } + public override IList GetBillableServiceRecords(CostBearer2SupportConcept c2s) + { + return c2s.ServiceRecords.Where(IsServiceRecordBillable).ToList(); + } + } } diff --git a/ReportImp/HPHBersenbrueck/ServicesOverviewReport.Designer.cs b/ReportImp/HPHBersenbrueck/ServicesOverviewReport.Designer.cs index c226c6072..a58cb7631 100644 --- a/ReportImp/HPHBersenbrueck/ServicesOverviewReport.Designer.cs +++ b/ReportImp/HPHBersenbrueck/ServicesOverviewReport.Designer.cs @@ -30,7 +30,6 @@ namespace BeWo.HPHBersenbrueck private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Stundenzettel)); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrTableServiceRecords1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -54,11 +53,9 @@ namespace BeWo.HPHBersenbrueck this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); - this.lblGlobalziel = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel(); @@ -77,7 +74,6 @@ namespace BeWo.HPHBersenbrueck ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -358,11 +354,9 @@ namespace BeWo.HPHBersenbrueck // ReportHeader // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.lblGlobalziel, this.xrLabel15, this.xrLabel14, this.xrLabel5, - this.xrRichText1, this.xrLabel8, this.xrLabel6, this.xrLabel13, @@ -377,24 +371,6 @@ namespace BeWo.HPHBersenbrueck this.ReportHeader.Name = "ReportHeader"; this.ReportHeader.StylePriority.UseFont = false; // - // lblGlobalziel - // - this.lblGlobalziel.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) - | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.lblGlobalziel.Font = new System.Drawing.Font("Arial", 9F); - this.lblGlobalziel.LocationFloat = new DevExpress.Utils.PointFloat(443.0832F, 45F); - this.lblGlobalziel.Multiline = true; - this.lblGlobalziel.Name = "lblGlobalziel"; - this.lblGlobalziel.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 5, 0, 100F); - this.lblGlobalziel.SizeF = new System.Drawing.SizeF(346.875F, 60F); - this.lblGlobalziel.StylePriority.UseBorders = false; - this.lblGlobalziel.StylePriority.UseBorderWidth = false; - this.lblGlobalziel.StylePriority.UseFont = false; - this.lblGlobalziel.StylePriority.UsePadding = false; - this.lblGlobalziel.StylePriority.UseTextAlignment = false; - this.lblGlobalziel.Text = "Ziele der Hilfe (laut Hilfeplan)"; - this.lblGlobalziel.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; - // // xrLabel15 // this.xrLabel15.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom))); @@ -426,28 +402,19 @@ namespace BeWo.HPHBersenbrueck // // xrLabel5 // - this.xrLabel5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrLabel5.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrLabel5.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold); - this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(789.9582F, 25F); + this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(443.0832F, 25F); this.xrLabel5.Multiline = true; this.xrLabel5.Name = "xrLabel5"; this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel5.SizeF = new System.Drawing.SizeF(244.0418F, 80F); + this.xrLabel5.SizeF = new System.Drawing.SizeF(590.9168F, 80F); this.xrLabel5.StylePriority.UseBorders = false; this.xrLabel5.StylePriority.UseFont = false; this.xrLabel5.StylePriority.UseTextAlignment = false; this.xrLabel5.Text = "Wohnassistenz\r\nFranz-Hecker Str. 20\r\n49593 Bersenbrück"; - this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft; - // - // xrRichText1 - // - this.xrRichText1.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right))); - this.xrRichText1.Font = new System.Drawing.Font("Arial", 9F); - this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(443.0832F, 24.99997F); - this.xrRichText1.Name = "xrRichText1"; - this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString"); - this.xrRichText1.SizeF = new System.Drawing.SizeF(346.8749F, 20.00003F); - this.xrRichText1.StylePriority.UseBorders = false; + this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // // xrLabel8 // @@ -645,7 +612,6 @@ namespace BeWo.HPHBersenbrueck ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } @@ -686,15 +652,12 @@ namespace BeWo.HPHBersenbrueck private DevExpress.XtraReports.UI.XRLabel xrLabel15; private DevExpress.XtraReports.UI.XRLabel xrLabel14; private DevExpress.XtraReports.UI.XRLabel xrLabel5; - private DevExpress.XtraReports.UI.XRRichText xrRichText1; private DevExpress.XtraReports.UI.XRLabel xrLabel8; private DevExpress.XtraReports.UI.XRLabel xrLabel6; private DevExpress.XtraReports.UI.XRLabel xrLabel7; private DevExpress.XtraReports.UI.XRLabel lblMinutesTotal; - private DevExpress.XtraReports.UI.XRLabel lblGlobalziel; private DevExpress.XtraReports.UI.XRLabel lblFLSGesamt; private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1; private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2; - } } diff --git a/ReportImp/HPHBersenbrueck/ServicesOverviewReport.resx b/ReportImp/HPHBersenbrueck/ServicesOverviewReport.resx index 89e4c3e28..f6606300d 100644 --- a/ReportImp/HPHBersenbrueck/ServicesOverviewReport.resx +++ b/ReportImp/HPHBersenbrueck/ServicesOverviewReport.resx @@ -120,7 +120,4 @@ 21, 17 - - ewBcAHIAdABmADEAXABhAG4AcwBpAFwAYQBuAHMAaQBjAHAAZwAxADIANQAyAFwAZABlAGYAZgAwAHsAXABmAG8AbgB0AHQAYgBsAHsAXABmADAAXABmAG4AaQBsAFwAZgBjAGgAYQByAHMAZQB0ADAAIABBAHIAaQBhAGwAOwB9AHsAXABmADEAXABmAG4AaQBsACAAVABpAG0AZQBzACAATgBlAHcAIABSAG8AbQBhAG4AOwB9AH0ADQAKAHsAXABjAG8AbABvAHIAdABiAGwAIAA7AFwAcgBlAGQAMABcAGcAcgBlAGUAbgAwAFwAYgBsAHUAZQAwADsAfQANAAoAXAB2AGkAZQB3AGsAaQBuAGQANABcAHUAYwAxAFwAcABhAHIAZABcAHEAYwBcAGMAZgAxAFwAbABhAG4AZwAxADAAMwAxAFwAYgBcAGYAcwAxADgAIABHAGwAbwBiAGEAbAB6AGkAZQBsAFwAYgAwACAAIAAoAGwAYQB1AHQAIABIAGkAbABmAGUAcABsAGEAbgApAFwAYwBmADAAXABmADEAXABmAHMAMgA0AFwAcABhAHIADQAKAH0ADQAKAA== - \ No newline at end of file diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index 706380227..70b27d2a8 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -44,7 +44,7 @@ namespace BeWo.Service.Plugins //t = "2301474784"; // Hauskrankenpflege Leiendecker //t = "8243565510"; // Der Karren //t = "7709306800"; // Der Karren SBD - //t = "2499262621"; // HPH Bersenbrück + t = "2499262621"; // HPH Bersenbrück //t = "4950382346"; // Holsinger //t = "5973016645"; // Verein Lebensgestaltung Hanau //t = "7375324044"; // Diakonie KK Kleve @@ -167,7 +167,7 @@ namespace BeWo.Service.Plugins //t = "3614251071"; // Pusteblume //t = "7755740484"; // Sawo //t = "8275654834"; // Twg Jonathan - //t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V. + t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V. (FFS) //t = "2632162696"; // Hand in Hand (ehemals Pro BeWo Düren) //t = "6340891020"; // Caritas Ahlen //t = "3659854106"; // alpha e.V. @@ -299,7 +299,7 @@ namespace BeWo.Service.Plugins //t = "8251343124"; // Rat Plus Tat //t = "6819347851"; // Awo Kreisverband Plön //t = "2385915144"; // AKGG GmbHd - t = "8002913382"; // AKGG GmbH (MID) + //t = "8002913382"; // AKGG GmbH (MID) //t = "5155880294"; // BHV Bergische Hauspflege //t = "8366649557"; // Münchner Aids-Hilfe e.V. //t = "2976949196"; // WHB Refrath gGmbH @@ -341,6 +341,7 @@ namespace BeWo.Service.Plugins //t = "7396826106"; // SKF Sozialdienst katholischer Frauen e.V. Leverkusen //t = "4748304562"; // BeWo Darmstadt //t = "5315865694"; // Wismarer Werkstätten GmbH + //t = "6971328056"; // SKM Krefeld return t;