MH: Mittelpunkt/CustomMitarbeiterstundenkontoBerechnung verbessert

This commit is contained in:
2026-02-26 17:12:43 +01:00
parent 99f3e44c07
commit 414bfc0fce
2 changed files with 21 additions and 3 deletions

View File

@@ -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;

View File

@@ -15,6 +15,20 @@ namespace Mittelpunkt
{
public class CustomReportCreator : DefaultReportCreator
{
//public override XtraReport CreateAuslastungReport(long? employeeOid, IList<long> teamOids, DateTime startDate, DateTime endDate)
//{
// IBeWoReport<MitarbeiterauslastungRO> report;
// if (teamOids != null && teamOids.Count > 0)
// report = FindReportImp<MitarbeiterauslastungRO>("TeamauslastungNachMitarbeiter");
// else
// report = FindReportImp<MitarbeiterauslastungRO>("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<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid, false);