From a522be2b1777c58ef13ba6dac8dc199fb178054a Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 13 Jul 2026 08:48:43 +0200 Subject: [PATCH] LebenshilfeBadKreuznach/Validation/ServiceRecordValidator.cs - entfernt, da Gesamtbew jetzt relevant ist SupportOID=167711 --- .../LebenshilfeBadKreuznach.csproj | 1 - .../Validation/ServiceRecordValidator.cs | 64 ------------------- 2 files changed, 65 deletions(-) delete mode 100644 ReportImp/LebenshilfeBadKreuznach/Validation/ServiceRecordValidator.cs diff --git a/ReportImp/LebenshilfeBadKreuznach/LebenshilfeBadKreuznach.csproj b/ReportImp/LebenshilfeBadKreuznach/LebenshilfeBadKreuznach.csproj index cd423bffa..8deb5eb3e 100644 --- a/ReportImp/LebenshilfeBadKreuznach/LebenshilfeBadKreuznach.csproj +++ b/ReportImp/LebenshilfeBadKreuznach/LebenshilfeBadKreuznach.csproj @@ -89,7 +89,6 @@ ServiceInvoiceReport.cs - diff --git a/ReportImp/LebenshilfeBadKreuznach/Validation/ServiceRecordValidator.cs b/ReportImp/LebenshilfeBadKreuznach/Validation/ServiceRecordValidator.cs deleted file mode 100644 index e0ba842c2..000000000 --- a/ReportImp/LebenshilfeBadKreuznach/Validation/ServiceRecordValidator.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using BeWo.Data.Access; -using BeWo.Data.Entities; -using BeWo.Service.Plugins; -using BS.Shared; -using BS.Shared.DataContracts; - -namespace LebenshilfeBadKreuznach.Validation -{ - public class CustomServiceRecordValidator : ServiceRecordValidator - { - - public override List ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics, - int maxDaysEditServiceRecordsAllowed, IList employeeOids, IList cb2scOids) - { - var list = base.ValidateServiceRecord(newServiceRecord, statistics, maxDaysEditServiceRecordsAllowed, employeeOids, cb2scOids); - var newResult = new List(); - - foreach (var item in list) - { - if (item.ResultType != ServiceRecordValidationResult.ApprovedFLSOverspending && (String.IsNullOrEmpty(item.Message) || !item.Message.Contains("liegt außerhalb des Hilfeplanzeitraums"))) - { - newResult.Add(item); - } - } - if (statistics != null && statistics.PeriodStatistics != null) - { - foreach (var stat in statistics.PeriodStatistics) - { - if (stat.SupportConceptApprovalPeriod != null && stat.SupportConceptApprovalPeriod.ServiceCategory != null) - { - if (stat.SupportConceptApprovalPeriod.ServiceCategory.ServiceCategoryOid == newServiceRecord.ServiceDescription.Category.ServiceCategoryOid) - { - decimal newMinutes = newServiceRecord.RoundedDuration; - - if (newMinutes + stat.MinutesProvidedThisMonth > stat.MinutesApprovedPerMonth) - { - var klient = "diesen Hilfeplan"; - if (newServiceRecord.Customer != null) - { - klient = BS.Shared.Translation.Translator.Translate("Klient/in") + " " + newServiceRecord.Customer.LastNameFirstName; - } - - var msg = string.Format("Die für {2} genehmigten FLS ({0:N}) werden mit diesem Eintrag ({1:N}) überschritten.", stat.MinutesApprovedPerMonth / 60, newMinutes / 60, klient); - - var dc = new ServiceRecordValidationResultDC - { - ResultType = ServiceRecordValidationResult.Custom, - Message = msg, - Allow = false - }; - - newResult.Add(dc); - } - } - } - } - } - - return newResult; - } - } -} \ No newline at end of file