MH: Basis ServicesOverviewRO MainAttendant-Setzung um Start-End-Datum erweitert

This commit is contained in:
2026-06-18 14:17:48 +02:00
parent 50e2f2a19d
commit 1b168f507d

View File

@@ -749,6 +749,19 @@ namespace BeWo.Report.ReportObjects
{
if (valueEntry.Entry.SystemEntryID != null && valueEntry.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)
{
if (item.StartDate.HasValue || item.EndDate.HasValue)
{
// Claude: Name nur setzen, wenn sich der Gültigkeitszeitraum des Employee2Customer-Eintrags mit span überschneidet (Eintrag noch aktiv)
bool ueberschneidetSichMitSpan =
(!item.StartDate.HasValue || item.StartDate.Value <= span.EndDate)
&& (!item.EndDate.HasValue || item.EndDate.Value >= span.StartDate);
if (!ueberschneidetSichMitSpan)
{
continue;
}
}
var empName = item.Employee.Person.FirstName + " " + item.Employee.Person.LastName;
var empName2 = string.Format("{0}, {1}", item.Employee.Person.LastName, item.Employee.Person.FirstName);