diff --git a/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.cs b/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.cs index d11240d88..6cc3b4c00 100644 --- a/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.cs +++ b/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.cs @@ -66,11 +66,11 @@ namespace BeWoDarmstadt } scRo.AmountInReportTimeSpan /= 60; scRo.AmountPaidInReportTimeSpan /= 60; - scRo.AmountPaidInReportTimeSpan /= 60; + scRo.BillableAmountInReportTimeSpan /= 60; if (scRo.BillableHoursInReportTimeSpan != 0) { - scRo.AmountPaid = scRo.AmountInReportTimeSpan ?? 0 / scRo.BillableHoursInReportTimeSpan; + scRo.AmountPaid = scRo.AmountInReportTimeSpan / scRo.BillableHoursInReportTimeSpan ?? 0 ; scRo.AmountTotal = scRo.AmountPaidInReportTimeSpan / scRo.BillableHoursInReportTimeSpan; scRo.BillableAmountUntilNow = scRo.BillableAmountInReportTimeSpan / scRo.BillableHoursInReportTimeSpan; } diff --git a/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.designer.cs b/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.designer.cs index 4c00a7305..bbebdfb88 100644 --- a/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.designer.cs +++ b/ReportImp/BeWoDarmstadt/JahresuebersichtFLS.designer.cs @@ -217,7 +217,7 @@ namespace BeWoDarmstadt // cellGeleistetImBereich // this.cellGeleistetImBereich.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.AmountPaid", "{0:0.00}")}); + new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.AmountPaid", "{0:.00%}")}); this.cellGeleistetImBereich.Name = "cellGeleistetImBereich"; this.cellGeleistetImBereich.StylePriority.UseTextAlignment = false; this.cellGeleistetImBereich.Text = "cellGeleistetImBereich"; @@ -237,7 +237,7 @@ namespace BeWoDarmstadt // xrTableCell26 // this.xrTableCell26.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.AmountTotal")}); + new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.AmountTotal", "{0:.00%}")}); this.xrTableCell26.Name = "xrTableCell26"; this.xrTableCell26.StylePriority.UseTextAlignment = false; this.xrTableCell26.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; @@ -255,7 +255,7 @@ namespace BeWoDarmstadt // xrTableCell31 // this.xrTableCell31.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.BillableAmountUntilNow")}); + new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.BillableAmountUntilNow", "{0:.00%}")}); this.xrTableCell31.Name = "xrTableCell31"; this.xrTableCell31.StylePriority.UseTextAlignment = false; this.xrTableCell31.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; @@ -568,9 +568,10 @@ namespace BeWoDarmstadt new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.AmountPaid")}); this.xrTableCell22.Name = "xrTableCell22"; this.xrTableCell22.StylePriority.UseTextAlignment = false; - xrSummary5.FormatString = "{0:0.00}"; + xrSummary5.FormatString = "{0:.00%}"; xrSummary5.Func = DevExpress.XtraReports.UI.SummaryFunc.Avg; xrSummary5.IgnoreNullValues = true; + xrSummary5.Running = DevExpress.XtraReports.UI.SummaryRunning.Report; this.xrTableCell22.Summary = xrSummary5; this.xrTableCell22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell22.Weight = 0.35450516993088627D; @@ -596,6 +597,7 @@ namespace BeWoDarmstadt new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.AmountTotal")}); this.xrTableCell24.Name = "xrTableCell24"; this.xrTableCell24.StylePriority.UseTextAlignment = false; + xrSummary7.FormatString = "{0:.00%}"; xrSummary7.Func = DevExpress.XtraReports.UI.SummaryFunc.Avg; xrSummary7.IgnoreNullValues = true; xrSummary7.Running = DevExpress.XtraReports.UI.SummaryRunning.Report; @@ -620,6 +622,7 @@ namespace BeWoDarmstadt new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptFinanceList.BillableAmountUntilNow")}); this.xrTableCell33.Name = "xrTableCell33"; this.xrTableCell33.StylePriority.UseTextAlignment = false; + xrSummary9.FormatString = "{0:.00%}"; xrSummary9.Func = DevExpress.XtraReports.UI.SummaryFunc.Avg; xrSummary9.Running = DevExpress.XtraReports.UI.SummaryRunning.Report; this.xrTableCell33.Summary = xrSummary9; diff --git a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/CustomMitarbeiterstundenkontoBerechnung.cs index f115f5046..d9defcb85 100644 --- a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/CustomMitarbeiterstundenkontoBerechnung.cs @@ -7,29 +7,13 @@ using BeWo.Report.ReportObjects; namespace KoelnerBeWoSelbstbestimmtLeben { - public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung - { - public override bool ShouldCreateDayDetails() - { - return true; - } - - public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed) - { - var dd = base.CreateDayDetail(date, ed); - dd.MaxHoursUntilBreak = null; - dd.MaxHoursUntilBreak2 = null; - dd.BreakMinutes = null; - dd.BreakMinutes2 = null; - - return dd; - } - + public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung + { public override bool AddServiceRecordToDuration(ServiceRecord item) { if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null) { - if (item.ServiceDescription.Name != "Pause") + if (item.ServiceDescription.Name != "Pause" && item.ServiceDescription.ServiceCategory.Name != "Pause") { return true; } @@ -69,13 +53,13 @@ namespace KoelnerBeWoSelbstbestimmtLeben if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null) { - if (item.ServiceDescription.Name != "Pause") + if (item.ServiceDescription.Name != "Pause" && item.ServiceDescription.ServiceCategory.Name != "Pause") { arbeitszeit += duration; - } - else if (item.ServiceDescription.ServiceCategory.IsBillable) - { - flsGesamt += duration; + if (item.ServiceDescription.ServiceCategory.IsBillable) + { + flsGesamt += duration; + } } } sum.RecordsImBerichtszeitraum.Add(item); @@ -88,6 +72,13 @@ namespace KoelnerBeWoSelbstbestimmtLeben return sum; } + + public override MitarbeiterstundenkontoRO.EmployeeDetail BerechneUeberstundenBis(MitarbeiterstundenkontoRO.EmployeeDetail edOrig, IList records, DateTime monat, out decimal? ueberstunden, + out decimal alteExtraUeberstunden) + { + return base.BerechneUeberstundenBis(edOrig, records, monat, out ueberstunden, out alteExtraUeberstunden); + } + public override IList CreateDayDetails(DateTime berichtStart, DateTime berichtEnde, MitarbeiterstundenkontoRO.EmployeeDetail ed, IList recordsAll) { var list = base.CreateDayDetails(berichtStart, berichtEnde, ed, recordsAll); @@ -103,19 +94,18 @@ namespace KoelnerBeWoSelbstbestimmtLeben { decimal duration = GetDuration(sr); - if (sr.ServiceDescription.Name == "Pause") + if (sr.ServiceDescription.Name == "Pause" || sr.ServiceDescription.ServiceCategory.Name == "Pause") { dd.PauseInMinuten += (decimal)sr.DurationMinutes; } - else if (sr.ServiceDescription.Name != "Pause") + else + dd.MinutesTotal += duration; + + if (sr.ServiceDescription.Name != "Pause" && + sr.ServiceDescription.ServiceCategory.IsBillable) { - dd.MinutesTotal += (decimal)sr.DurationMinutes; + dd.SpecialHours += duration; } - //else if (sr.ServiceDescription.Name != "Pause" && - // sr.ServiceDescription.ServiceCategory.IsBillable) - //{ - // dd.SpecialHours += (decimal)sr.DurationMinutes; - //} } } @@ -152,15 +142,32 @@ namespace KoelnerBeWoSelbstbestimmtLeben return true; } - public override decimal BerechnePauseMinuten(IList srListAlle) + public override bool ShouldCreateDayDetails() { + return true; + } + + public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed) + { + var dd = base.CreateDayDetail(date, ed); + dd.MaxHoursUntilBreak = null; + dd.MaxHoursUntilBreak2 = null; + dd.BreakMinutes = null; + dd.BreakMinutes2 = null; + return dd; + } + + public override decimal BerechnePauseMinuten(IList srList) + { + //var srList = srListAlle.Where(s => s.ServiceDescription.ServiceCategory.Name == "Arbeitszeit"); decimal pausenZeit = 0; + List pausen = new List(); List nichtpausen = new List(); - foreach (var sr in srListAlle) + foreach (var sr in srList) { - if (sr.ServiceDescription.Name == "Pause") + if (sr.ServiceDescription.Name == "Pause" || sr.ServiceDescription.ServiceCategory.Name == "Pause") { pausen.Add(sr); } diff --git a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.cs b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.cs index 449792d3a..891c50838 100644 --- a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.cs +++ b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.cs @@ -47,16 +47,8 @@ namespace KoelnerBeWoSelbstbestimmtLeben foreach (var d in ed.Days) { - if (d.ServiceRecords != null && d.ServiceRecords.Count > 0) - foreach (var sr in d.ServiceRecords) - { - if (sr.ServiceDescription.ServiceCategory.Name.Contains("Pause")) - { - if (d.Custom8 != null && d.Custom8.Length != 0) - d.Custom8 += ", "; - d.Custom8 += String.Format("{0:HH:mm} - {1:HH:mm}", sr.Start, sr.End); - } - } + if (d.PauseInMinuten > 0) + d.PauseInMinuten = d.PauseInMinuten / 60; } } this.bindingSource1.DataSource = pRO; diff --git a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.designer.cs b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.designer.cs index 311408b62..bb5fff7f8 100644 --- a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.designer.cs +++ b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/Mitarbeiterarbeitszeitkonto.designer.cs @@ -40,6 +40,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.xrTableRowDetail = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell67 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -52,6 +53,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.xrTableRowHeader = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -97,7 +99,6 @@ namespace KoelnerBeWoSelbstbestimmtLeben 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(); @@ -115,8 +116,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell(); + 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(); @@ -190,6 +190,15 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.xrTableCell20.Text = "xrTableCell20"; this.xrTableCell20.Weight = 0.25078900590355818D; // + // xrTableCell12 + // + this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.PauseInMinuten", "{0:0.00}")}); + this.xrTableCell12.Name = "xrTableCell12"; + this.xrTableCell12.StylePriority.UseTextAlignment = false; + this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell12.Weight = 0.072137059520902352D; + // // xrTableCell31 // this.xrTableCell31.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { @@ -315,6 +324,14 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell2.Weight = 0.25078899889040257D; // + // xrTableCell11 + // + this.xrTableCell11.Name = "xrTableCell11"; + this.xrTableCell11.StylePriority.UseTextAlignment = false; + this.xrTableCell11.Text = "Pause"; + this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell11.Weight = 0.072137116496357886D; + // // xrTableCell7 // this.xrTableCell7.Name = "xrTableCell7"; @@ -512,12 +529,12 @@ namespace KoelnerBeWoSelbstbestimmtLeben // xrTable4 // this.xrTable4.Borders = DevExpress.XtraPrinting.BorderSide.None; - this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(110F, 0F); + this.xrTable4.LocationFloat = new DevExpress.Utils.PointFloat(1.525879E-05F, 0F); this.xrTable4.Name = "xrTable4"; this.xrTable4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTable4.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow9}); - this.xrTable4.SizeF = new System.Drawing.SizeF(560F, 22F); + this.xrTable4.SizeF = new System.Drawing.SizeF(700.0001F, 22F); this.xrTable4.StylePriority.UseBorders = false; this.xrTable4.StylePriority.UseFont = false; this.xrTable4.StylePriority.UsePadding = false; @@ -542,7 +559,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.xrTableCell64.StylePriority.UseTextAlignment = false; this.xrTableCell64.Text = "Summe:"; this.xrTableCell64.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell64.Weight = 0.26149405118689462D; + this.xrTableCell64.Weight = 0.39567516470037095D; // // cellSumMinutesTotalDecimal // @@ -556,7 +573,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.cellSumMinutesTotalDecimal.Summary = xrSummary1; this.cellSumMinutesTotalDecimal.Text = "cellSumMinutesTotalDecimal"; this.cellSumMinutesTotalDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellSumMinutesTotalDecimal.Weight = 0.081153321921416444D; + this.cellSumMinutesTotalDecimal.Weight = 0.089554165267056729D; // // cellSumHoursSickDecimal // @@ -571,7 +588,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.cellSumHoursSickDecimal.Summary = xrSummary2; this.cellSumHoursSickDecimal.Text = "cellSumHoursSickDecimal"; this.cellSumHoursSickDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellSumHoursSickDecimal.Weight = 0.081153328404945282D; + this.cellSumHoursSickDecimal.Weight = 0.072136182204477692D; // // cellSumHoursInVacationDecimal // @@ -587,7 +604,7 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.cellSumHoursInVacationDecimal.Summary = xrSummary3; this.cellSumHoursInVacationDecimal.Text = "cellSumHoursInVacationDecimal"; this.cellSumHoursInVacationDecimal.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellSumHoursInVacationDecimal.Weight = 0.081153321723263658D; + this.cellSumHoursInVacationDecimal.Weight = 0.073827151783624062D; // // xrTable1 // @@ -848,10 +865,6 @@ namespace KoelnerBeWoSelbstbestimmtLeben 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; @@ -981,22 +994,9 @@ namespace KoelnerBeWoSelbstbestimmtLeben this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt"; // - // xrTableCell11 + // bindingSource1 // - this.xrTableCell11.Name = "xrTableCell11"; - this.xrTableCell11.StylePriority.UseTextAlignment = false; - this.xrTableCell11.Text = "Pause"; - this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell11.Weight = 0.072137116496357886D; - // - // xrTableCell12 - // - this.xrTableCell12.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeDetailList.Days.Custom8")}); - this.xrTableCell12.Name = "xrTableCell12"; - this.xrTableCell12.StylePriority.UseTextAlignment = false; - this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell12.Weight = 0.072137059520902352D; + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.MitarbeiterstundenkontoRO); // // Mitarbeiterarbeitszeitkonto //