LebenshilfeStade/Service/CustomServiceRecordValidator.cs - Anpassung auf deren Leistungsnamen

SupportOID=164787
This commit is contained in:
2026-06-09 13:36:19 +02:00
parent d6ff67a3d2
commit 404dfeb580

View File

@@ -49,7 +49,7 @@ namespace LebenshilfeStade.Service
var now = newServiceRecord.Start ?? DateTime.Now;
var since90Days = now.AddDays(-90);
var recentRecords = DAOFactory.SearchDAO.FindServiceRecordsDetailsForLastDaysWithStartEndDate(fehlkontaktCb2ScOid.Value, since90Days, now);
int fehlkontaktCount = recentRecords.Count(r => r.ServiceDescription?.Name == "Fehlkontakt" && r.Oid != newServiceRecord.ServiceRecordOid);
int fehlkontaktCount = recentRecords.Count(r => r.ServiceDescription?.Name.Contains("Fehlb") == true && r.Oid != newServiceRecord.ServiceRecordOid);
if (fehlkontaktCount >= 3)
{
validation.Add(new ServiceRecordValidationResultDC