MH: Frei Pro Woche in Basis der Mitarbeiterauslastung eingebaut
This commit is contained in:
@@ -11,8 +11,7 @@ using BS.Shared.Core;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
|
||||
|
||||
using System.Linq;
|
||||
|
||||
namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
@@ -417,6 +416,17 @@ namespace BeWo.Report.ReportObjects
|
||||
scDC.SupportConceptApprovalPeriod = scap;
|
||||
scDC.CostBearer2SupportConcept = DAOFactory.GenericDAO.Unproxy(cb2sc);
|
||||
|
||||
// "Frei pro Woche" aus der Zeiterfassungsstatistik hinzufügen
|
||||
var stats = new ServiceRecordStatisticFactory().CreateSupportConceptStatisticsImpl(cb2sc.Oid.Value, DateTime.Now);
|
||||
if (stats.PeriodStatistics != null && stats.PeriodStatistics.Any(s => s.SupportConceptApprovalPeriod.SupportConceptApprovalPeriodOid == scap.Oid))
|
||||
scDC.FreiProWoche = stats.PeriodStatistics.First(s => s.SupportConceptApprovalPeriod.SupportConceptApprovalPeriodOid == scap.Oid).MinutesFreePerWeek / 60;
|
||||
// Prozentwert aus der Bewilligung einbeziehen
|
||||
if (scap.SupportConceptApprovalPeriod2Employee != null && scap.SupportConceptApprovalPeriod2Employee.Any(s2e => s2e.Employee.Oid == emp.Oid))
|
||||
{
|
||||
var faktor = scap.SupportConceptApprovalPeriod2Employee.First(s2e => s2e.Employee.Oid == emp.Oid).Betreuungsschluessel;
|
||||
scDC.FreiProWoche *= faktor / 100;
|
||||
}
|
||||
|
||||
DateTime end = ende;
|
||||
if (realEnd.HasValue && realEnd.Value < end)
|
||||
{
|
||||
|
||||
@@ -217,6 +217,7 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public decimal MittelbarIst { get; set; }
|
||||
|
||||
|
||||
public decimal RelationDirectToMittelbar { get; set; }
|
||||
|
||||
public decimal RelationIstSoll { get; set; }
|
||||
@@ -296,6 +297,8 @@ namespace BeWo.Report.ReportObjects
|
||||
public decimal MinutesSoll { get; set; }
|
||||
|
||||
public decimal MittelbarIst { get; set; }
|
||||
|
||||
public decimal FreiProWoche { get; set; }
|
||||
|
||||
public decimal RelationDirectToMittelbar { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user