diff --git a/ReportImp/Mittelpunkt/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/Mittelpunkt/CustomMitarbeiterstundenkontoBerechnung.cs index c8bc3c304..99db926d8 100644 --- a/ReportImp/Mittelpunkt/CustomMitarbeiterstundenkontoBerechnung.cs +++ b/ReportImp/Mittelpunkt/CustomMitarbeiterstundenkontoBerechnung.cs @@ -69,7 +69,11 @@ namespace Mittelpunkt else if (IsKrankAbsenceServiceRecord(sr) || IsUrlaubAbsenceServiceRecord(sr)) { decimal duration = GetDuration(sr, ed) / 60; - dd.Custom1 = sr.ServiceDescription.Name; + if (sr.Start != null && sr.End != null) + dd.Custom1 = string.Format("{0} {1:HH:mm} - {2:HH:mm}", sr.ServiceDescription.Name, sr.Start, sr.End); + else + dd.Custom1 = sr.ServiceDescription.Name; + dd.Custom2 = sr.Notice; if (IsKrankAbsenceServiceRecord(sr)) @@ -222,7 +226,7 @@ namespace Mittelpunkt } public bool IsUrlaubAbsenceServiceRecord(ServiceRecord item) { - if (!item.CustomerOid.HasValue && item.ServiceDescription != null && item.ServiceDescription.Name.Trim().ToLower() == "urlaub (x)") + if (item.ServiceDescription != null && item.ServiceDescription.Name.Trim().ToLower() == "urlaub (x)") return true; return false; @@ -230,7 +234,7 @@ namespace Mittelpunkt public bool IsKrankAbsenceServiceRecord(ServiceRecord item) { - if (!item.CustomerOid.HasValue && item.ServiceDescription != null && item.ServiceDescription.Name.Trim().ToLower() == "krank (x)") + if (item.ServiceDescription != null && item.ServiceDescription.Name.Trim().ToLower() == "krank (x)") return true; return false; diff --git a/ReportImp/Mittelpunkt/CustomReportCreator.cs b/ReportImp/Mittelpunkt/CustomReportCreator.cs index a18c5513c..54d110adb 100644 --- a/ReportImp/Mittelpunkt/CustomReportCreator.cs +++ b/ReportImp/Mittelpunkt/CustomReportCreator.cs @@ -15,6 +15,20 @@ namespace Mittelpunkt { public class CustomReportCreator : DefaultReportCreator { + + //public override XtraReport CreateAuslastungReport(long? employeeOid, IList teamOids, DateTime startDate, DateTime endDate) + //{ + // IBeWoReport report; + // if (teamOids != null && teamOids.Count > 0) + // report = FindReportImp("TeamauslastungNachMitarbeiter"); + // else + // report = FindReportImp("Mitarbeiterauslastung"); + + // var x = MitarbeiterauslastungRO.Create(employeeOid, teamOids, startDate, endDate); + // report.SetReportDataSource(x); + + // return report as XtraReport; + //} public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay) { List lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false);