diff --git a/ReportImp/HausDuelken/Klientenstammblatt.cs b/ReportImp/HausDuelken/Klientenstammblatt.cs index 5cf21c3f5..36b334ad7 100644 --- a/ReportImp/HausDuelken/Klientenstammblatt.cs +++ b/ReportImp/HausDuelken/Klientenstammblatt.cs @@ -139,14 +139,26 @@ namespace BeWo.HPHBersenbrueck { var cbr = supportConcept.CostBearerRelations[0]; lblKostentraegerName.Text = cbr.CostBearer.Name; - + if (cbr.ApprovalPeriodList != null && cbr.ApprovalPeriodList.Count > 0) { decimal gesamtBewilligt = 0m; + DateTime? startdate = null; + DateTime? enddate = null; foreach (var ap in cbr.ApprovalPeriodList) { + if (startdate == null) + startdate = ap.StartDate; + else if (startdate > ap.StartDate) + startdate = ap.StartDate; + if (ap.EndDate != null) { + if (enddate == null) + enddate = ap.EndDate; + else if (enddate < ap.EndDate) + enddate = ap.EndDate; + var days = (ap.EndDate.Value - ap.StartDate.Value).TotalDays; if (ap.ApprovedBEInterval != null) { @@ -160,7 +172,8 @@ namespace BeWo.HPHBersenbrueck } } } - lblWichtigeInfosFlsBewilligt.Text = string.Format("{0:0.00} Gesamt = {1:0.00} FLS / Woche", gesamtBewilligt, gesamtBewilligt / 52); + var gesamteBewilligteWochen = Convert.ToDecimal((enddate.Value - startdate.Value).TotalDays / 7); + lblWichtigeInfosFlsBewilligt.Text = string.Format("{0:0.00} Gesamt = {1:0.00} FLS / Woche", gesamtBewilligt, gesamtBewilligt / gesamteBewilligteWochen); SetzeBewilligungen(cbr); diff --git a/ReportImp/VivaAVidaReports/ServicesOverviewReport.Designer.cs b/ReportImp/VivaAVidaReports/ServicesOverviewReport.Designer.cs index d5d9bb82c..5928d3e6d 100644 --- a/ReportImp/VivaAVidaReports/ServicesOverviewReport.Designer.cs +++ b/ReportImp/VivaAVidaReports/ServicesOverviewReport.Designer.cs @@ -36,6 +36,7 @@ namespace BeWo.VivaAVidaReports this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand(); this.Detail1 = new DevExpress.XtraReports.UI.DetailBand(); this.xrTable3 = new DevExpress.XtraReports.UI.XRTable(); @@ -43,7 +44,7 @@ namespace BeWo.VivaAVidaReports this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrLabel29 = new DevExpress.XtraReports.UI.XRLabel(); @@ -76,8 +77,7 @@ namespace BeWo.VivaAVidaReports this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldBillableFLS = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldAbrechenbareFLS = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -137,7 +137,7 @@ namespace BeWo.VivaAVidaReports this.xrTableCell1.Multiline = true; this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.Text = "Uhrzeit\r\nvon ....... bis"; - this.xrTableCell1.Weight = 0.49747272699811873D; + this.xrTableCell1.Weight = 0.57306907282285724D; // // xrTableCell11 // @@ -147,7 +147,13 @@ namespace BeWo.VivaAVidaReports this.xrTableCell11.StylePriority.UseFont = false; this.xrTableCell11.StylePriority.UseTextAlignment = false; this.xrTableCell11.Text = "Anzahl Minuten"; - this.xrTableCell11.Weight = 0.41456060540630946D; + this.xrTableCell11.Weight = 0.33896425958157095D; + // + // xrTableCell4 + // + this.xrTableCell4.Name = "xrTableCell4"; + this.xrTableCell4.Text = "Art"; + this.xrTableCell4.Weight = 0.34140285174704571D; // // DetailReport // @@ -218,7 +224,7 @@ namespace BeWo.VivaAVidaReports this.xrTableCell2.StylePriority.UseTextAlignment = false; this.xrTableCell2.Text = "xrTableCell2"; this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell2.Weight = 0.25757570920794276D; + this.xrTableCell2.Weight = 0.29671711604393608D; // // xrTableCell15 // @@ -231,11 +237,17 @@ namespace BeWo.VivaAVidaReports this.xrTableCell15.StylePriority.UseTextAlignment = false; this.xrTableCell15.Text = "xrTableCell15"; this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell15.Weight = 0.2146464239976143D; + this.xrTableCell15.Weight = 0.17550501716162098D; // - // bindingSource1 + // xrTableCell5 // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); + this.xrTableCell5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.ServiceCategory")}); + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.StylePriority.UseTextAlignment = false; + this.xrTableCell5.Text = "xrTableCell5"; + this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell5.Weight = 0.17676764348202109D; // // formattingRuleStartDate // @@ -586,21 +598,9 @@ namespace BeWo.VivaAVidaReports this.fieldAbrechenbareFLS.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; this.fieldAbrechenbareFLS.Name = "fieldAbrechenbareFLS"; // - // xrTableCell4 + // bindingSource1 // - this.xrTableCell4.Name = "xrTableCell4"; - this.xrTableCell4.Text = "Art"; - this.xrTableCell4.Weight = 0.34140285174704571D; - // - // xrTableCell5 - // - this.xrTableCell5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.ServiceCategory")}); - this.xrTableCell5.Name = "xrTableCell5"; - this.xrTableCell5.StylePriority.UseTextAlignment = false; - this.xrTableCell5.Text = "xrTableCell5"; - this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell5.Weight = 0.17676764348202109D; + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); // // Stundenzettel // diff --git a/ReportImp/VivaAVidaReports/ServicesOverviewReport.cs b/ReportImp/VivaAVidaReports/ServicesOverviewReport.cs index 5a9066d9d..b0ecc370a 100644 --- a/ReportImp/VivaAVidaReports/ServicesOverviewReport.cs +++ b/ReportImp/VivaAVidaReports/ServicesOverviewReport.cs @@ -26,8 +26,11 @@ namespace BeWo.VivaAVidaReports double minuten = 0; foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services) { - if (s.IsBillable) + if (s.IsBillable || s.ServiceDescription.ToLower().Contains("fehlkontakt")) { + if (s.ServiceDescription.ToLower().Contains("fehlkontakt")) + s.TimeRangeString = ("(Fehlkontakt) " ) + s.TimeRangeString; + if (s.ServiceCategory.ToLower().IndexOf("assistenz") < 0) { servicesBillable.Add(s);