From 91d67f19debdef33563b74fa9b287ffed06693a9 Mon Sep 17 00:00:00 2001 From: HirschleM Date: Mon, 6 Jul 2026 12:10:57 +0200 Subject: [PATCH] MH: HwHilfswerkInklusionUndTeilhabe Restbudgetstunden auf QB Zwischenstand SupportOID=167176 --- .../QuittierungsbelegJugendamt.cs | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/ReportImp/HwHilfswerkInklusionUndTeilhabe/QuittierungsbelegJugendamt.cs b/ReportImp/HwHilfswerkInklusionUndTeilhabe/QuittierungsbelegJugendamt.cs index f1858c29b..cdc2c4195 100644 --- a/ReportImp/HwHilfswerkInklusionUndTeilhabe/QuittierungsbelegJugendamt.cs +++ b/ReportImp/HwHilfswerkInklusionUndTeilhabe/QuittierungsbelegJugendamt.cs @@ -1,12 +1,14 @@ +using BeWo.Report.ReportObjects; +using BeWo.Service.DCEntityMapper; +using BS.Shared; +using BS.Shared.Core; +using DevExpress.XtraReports.UI; using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Text.RegularExpressions; -using BeWo.Report.ReportObjects; -using BS.Shared.Core; -using DevExpress.XtraReports.UI; namespace BeWo.Report.DefaultReports { @@ -64,7 +66,31 @@ namespace BeWo.Report.DefaultReports pRO.Services = servicesBillable; } - + if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0) + { + var c2s = pRO.CostBearer2SupportConceptList[0]; + var dc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(c2s); + + foreach (var scap in dc.ApprovalPeriodList) + { + if (scap.ApprovedBEPerInterval.HasValue && scap.ApprovedBEInterval.HasValue) + { + if (scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Weekly) + pRO.ApprovedFLSTotal = Convert.ToDecimal((scap.EndDate.Value - scap.StartDate.Value).TotalDays / 7) * scap.ApprovedBEPerInterval.Value; + else if (scap.ApprovedBEInterval.HasValue && scap.ApprovedBEInterval.Value == SupportConceptApprovalInterval.Monthly) + pRO.ApprovedFLSTotal = Convert.ToDecimal(((scap.EndDate.Value - scap.StartDate.Value).TotalDays + 1) / 30.44) * scap.ApprovedBEPerInterval.Value; + } + } + } + + + foreach (var s in pRO.Services) + s.FLSQualified = s.MinutesQualified / 60; + pRO.TotalFLSQualified = pRO.TotalFLMQualified / 60; + + pRO.CalculateFLSSollIst2(); + lblReststunden.Text += String.Format(" {0:0.00}", pRO.ApprovedFLSTotal - pRO.MinutenGeleistetBisVormonat / 60 /*- pRO.TotalFLS*/); + bindingSource1.DataSource = pRO; }